Add support for client-side SNI
This commit is contained in:
parent
8e0deb6a64
commit
3b702e2cb6
2 changed files with 12 additions and 1 deletions
|
@ -2,5 +2,5 @@ OBJOPENSSL_SHARED_LIB = @OBJOPENSSL_SHARED_LIB@
|
||||||
OBJOPENSSL_STATIC_LIB = @OBJOPENSSL_STATIC_LIB@
|
OBJOPENSSL_STATIC_LIB = @OBJOPENSSL_STATIC_LIB@
|
||||||
OBJOPENSSL_FRAMEWORK = @OBJOPENSSL_FRAMEWORK@
|
OBJOPENSSL_FRAMEWORK = @OBJOPENSSL_FRAMEWORK@
|
||||||
|
|
||||||
OBJFW_LIBS = @OBJFW_LIBS@
|
|
||||||
OBJFW_FRAMEWORK_LIBS = @OBJFW_FRAMEWORK_LIBS@
|
OBJFW_FRAMEWORK_LIBS = @OBJFW_FRAMEWORK_LIBS@
|
||||||
|
OBJFW_LIBS = @OBJFW_LIBS@
|
||||||
|
|
|
@ -199,6 +199,17 @@ locking_callback(int mode, int n, const char *file, int line)
|
||||||
SSLError: error];
|
SSLError: error];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (SSL_set_tlsext_host_name(_SSL, [host UTF8String]) != 1) {
|
||||||
|
unsigned long error = ERR_get_error();
|
||||||
|
|
||||||
|
[self close];
|
||||||
|
|
||||||
|
@throw [SSLConnectionFailedException exceptionWithHost: host
|
||||||
|
port: port
|
||||||
|
socket: self
|
||||||
|
SSLError: error];
|
||||||
|
}
|
||||||
|
|
||||||
if (_certificateVerificationEnabled) {
|
if (_certificateVerificationEnabled) {
|
||||||
X509_VERIFY_PARAM *param = SSL_get0_param(_SSL);
|
X509_VERIFY_PARAM *param = SSL_get0_param(_SSL);
|
||||||
|
|
||||||
|
|
Reference in a new issue