Changeset - 20f5c44de56e
[Not reviewed]
0 1 0
Jan Kaluza - 14 years ago 2011-08-31 10:26:01
hanzz.k@gmail.com
Use SSLv23_server_method to support more SSL methods in server code
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
include/Swiften/TLS/OpenSSL/OpenSSLServerContext.cpp
Show inline comments
 
@@ -33,13 +33,13 @@ static void freeX509Stack(STACK_OF(X509)* stack) {
 
static int _sx_ssl_verify_callback(int preverify_ok, X509_STORE_CTX *ctx) {
 
	return 1;
 
}
 

	
 
OpenSSLServerContext::OpenSSLServerContext() : state_(Start), context_(0), handle_(0), readBIO_(0), writeBIO_(0) {
 
	ensureLibraryInitialized();
 
	context_ = SSL_CTX_new(TLSv1_server_method());
 
	context_ = SSL_CTX_new(SSLv23_server_method());
 
	SSL_CTX_set_verify(context_, SSL_VERIFY_PEER, _sx_ssl_verify_callback);
 

	
 
	// Load system certs
 
#if defined(SWIFTEN_PLATFORM_WINDOWS)
 
	X509_STORE* store = SSL_CTX_get_cert_store(context_);
 
	HCERTSTORE systemStore = CertOpenSystemStore(0, "ROOT");
0 comments (0 inline, 0 general)