Changeset - ff42794006fd
[Not reviewed]
0 2 0
Jan Kaluza - 14 years ago 2011-08-31 12:58:09
hanzz.k@gmail.com
Print SSLv23 output
2 files changed with 5 insertions and 4 deletions:
0 comments (0 inline, 0 general)
include/Swiften/TLS/OpenSSL/OpenSSLServerContext.cpp
Show inline comments
 
@@ -30,14 +30,14 @@ static void freeX509Stack(STACK_OF(X509)* stack) {
 
	sk_X509_free(stack);
 
}
 

	
 
static int _sx_ssl_verify_callback(int preverify_ok, X509_STORE_CTX *ctx) {
 
	return 1;
 
}
 
// 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(SSLv23_server_method());
 
	SSL_CTX_set_verify(context_, SSL_VERIFY_PEER, _sx_ssl_verify_callback);
 
// 	SSL_CTX_set_verify(context_, SSL_VERIFY_PEER, _sx_ssl_verify_callback);
 

	
 
	// Load system certs
 
#if defined(SWIFTEN_PLATFORM_WINDOWS)
src/transport.cpp
Show inline comments
 
@@ -73,6 +73,7 @@ Component::Component(Swift::EventLoop *loop, Swift::NetworkFactories *factories,
 
		m_server = new Swift::Server(loop, m_factories, m_userRegistry, m_jid, CONFIG_INT(m_config, "service.port"));
 
		if (!CONFIG_STRING(m_config, "service.cert").empty()) {
 
			LOG4CXX_INFO(logger, "Using PKCS#12 certificate " << CONFIG_STRING(m_config, "service.cert"));
 
			LOG4CXX_INFO(logger, "SSLv23_server_method used.");
 
			TLSServerContextFactory *f = new OpenSSLServerContextFactory();
 
			m_server->addTLSEncryption(f, PKCS12Certificate(CONFIG_STRING(m_config, "service.cert"), createSafeByteArray(CONFIG_STRING(m_config, "service.cert_password"))));
 
		}
0 comments (0 inline, 0 general)