Fossil SCM
Use the SSL_set_tlsext_host_name() function only if it is available.
Commit
cb52442608ce154d6469a66cacf1c7db0ba31021
Parent
e8f15c0dce8e23f…
1 file changed
+2
+2
| --- src/http_ssl.c | ||
| +++ src/http_ssl.c | ||
| @@ -210,14 +210,16 @@ | ||
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | iBio = BIO_new_ssl_connect(sslCtx); |
| 213 | 213 | BIO_get_ssl(iBio, &ssl); |
| 214 | 214 | |
| 215 | +#if (SSLEAY_VERSION_NUMBER >= 0x00908070) && !defined(OPENSSL_NO_TLSEXT) | |
| 215 | 216 | if( !SSL_set_tlsext_host_name(ssl, g.urlName) ){ |
| 216 | 217 | fossil_warning("WARNING: failed to set server name indication (SNI), " |
| 217 | 218 | "continuing without it.\n"); |
| 218 | 219 | } |
| 220 | +#endif | |
| 219 | 221 | |
| 220 | 222 | SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); |
| 221 | 223 | if( iBio==NULL ) { |
| 222 | 224 | ssl_set_errmsg("SSL: cannot open SSL (%s)", |
| 223 | 225 | ERR_reason_error_string(ERR_get_error())); |
| 224 | 226 |
| --- src/http_ssl.c | |
| +++ src/http_ssl.c | |
| @@ -210,14 +210,16 @@ | |
| 210 | } |
| 211 | |
| 212 | iBio = BIO_new_ssl_connect(sslCtx); |
| 213 | BIO_get_ssl(iBio, &ssl); |
| 214 | |
| 215 | if( !SSL_set_tlsext_host_name(ssl, g.urlName) ){ |
| 216 | fossil_warning("WARNING: failed to set server name indication (SNI), " |
| 217 | "continuing without it.\n"); |
| 218 | } |
| 219 | |
| 220 | SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); |
| 221 | if( iBio==NULL ) { |
| 222 | ssl_set_errmsg("SSL: cannot open SSL (%s)", |
| 223 | ERR_reason_error_string(ERR_get_error())); |
| 224 |
| --- src/http_ssl.c | |
| +++ src/http_ssl.c | |
| @@ -210,14 +210,16 @@ | |
| 210 | } |
| 211 | |
| 212 | iBio = BIO_new_ssl_connect(sslCtx); |
| 213 | BIO_get_ssl(iBio, &ssl); |
| 214 | |
| 215 | #if (SSLEAY_VERSION_NUMBER >= 0x00908070) && !defined(OPENSSL_NO_TLSEXT) |
| 216 | if( !SSL_set_tlsext_host_name(ssl, g.urlName) ){ |
| 217 | fossil_warning("WARNING: failed to set server name indication (SNI), " |
| 218 | "continuing without it.\n"); |
| 219 | } |
| 220 | #endif |
| 221 | |
| 222 | SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); |
| 223 | if( iBio==NULL ) { |
| 224 | ssl_set_errmsg("SSL: cannot open SSL (%s)", |
| 225 | ERR_reason_error_string(ERR_get_error())); |
| 226 |