@@ -103,6 +103,7 @@ typedef enum {
103
103
oSSLPeerVerification ,
104
104
oSSLCertPath ,
105
105
oSSLAllowedCipherList ,
106
+ oSSLUseSNI ,
106
107
} OpCodes ;
107
108
108
109
/** @internal
@@ -149,6 +150,7 @@ static const struct {
149
150
"sslpeerverification" , oSSLPeerVerification }, {
150
151
"sslcertpath" , oSSLCertPath }, {
151
152
"sslallowedcipherlist" , oSSLAllowedCipherList }, {
153
+ "sslusesni" , oSSLUseSNI }, {
152
154
NULL , oBadOption },};
153
155
154
156
static void config_notnull (const void * , const char * );
@@ -204,6 +206,7 @@ config_init(void)
204
206
config .deltatraffic = DEFAULT_DELTATRAFFIC ;
205
207
config .ssl_cipher_list = NULL ;
206
208
config .arp_table_path = safe_strdup (DEFAULT_ARPTABLE );
209
+ config .ssl_use_sni = DEFAULT_AUTHSERVSSLSNI ;
207
210
208
211
debugconf .log_stderr = 1 ;
209
212
debugconf .debuglevel = DEFAULT_DEBUGLEVEL ;
@@ -789,6 +792,21 @@ config_read(const char *filename)
789
792
config .ssl_cipher_list = safe_strdup (p1 );
790
793
#ifndef USE_CYASSL
791
794
debug (LOG_WARNING , "SSLAllowedCipherList is set but no SSL compiled in. Ignoring!" );
795
+ #endif
796
+ break ;
797
+ case oSSLUseSNI :
798
+ config .ssl_use_sni = parse_boolean_value (p1 );
799
+ if (config .ssl_use_sni < 0 ) {
800
+ debug (LOG_WARNING , "Bad syntax for Parameter: SSLUseSNI on line %d " "in %s."
801
+ "The syntax is yes or no." , linenum , filename );
802
+ exit (-1 );
803
+ }
804
+ #ifndef USE_CYASSL
805
+ debug (LOG_WARNING , "SSLUseSNI is set but no SSL compiled in. Ignoring!" );
806
+ #else
807
+ #ifndef HAVE_SNI
808
+ debug (LOG_WARNING , "SSLUseSNI is set but no CyaSSL SNI enabled. Ignoring!" );
809
+ #endif
792
810
#endif
793
811
break ;
794
812
case oBadOption :
0 commit comments