diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-04-07 13:40:51 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-04-07 13:40:51 +0200 |
commit | f71e6bf9cb41811f18864f5d4eecb26e29d03f25 (patch) | |
tree | 88586e73f7ff864081b8831a88637680267b7201 /src/modules/extra | |
parent | ce78080782c261aed2c0314bc8c66babc1369be2 (diff) | |
parent | 493ff75f1f89a7ede2800eff0368740fbaf02aa4 (diff) |
Merge insp20
Diffstat (limited to 'src/modules/extra')
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index ee024318b..7a8bdeeb0 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -109,6 +109,9 @@ namespace OpenSSL { SSL_CTX_set_mode(ctx, SSL_MODE_ENABLE_PARTIAL_WRITE | SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER); SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE, OnVerify); + + const unsigned char session_id[] = "inspircd"; + SSL_CTX_set_session_id_context(ctx, session_id, sizeof(session_id) - 1); } ~Context() @@ -352,8 +355,11 @@ class OpenSSLIOHook : public SSLIOHook certinfo->trusted = false; } - certinfo->dn = X509_NAME_oneline(X509_get_subject_name(cert),0,0); - certinfo->issuer = X509_NAME_oneline(X509_get_issuer_name(cert),0,0); + char buf[512]; + X509_NAME_oneline(X509_get_subject_name(cert), buf, sizeof(buf)); + certinfo->dn = buf; + X509_NAME_oneline(X509_get_issuer_name(cert), buf, sizeof(buf)); + certinfo->issuer = buf; if (!X509_digest(cert, profile->GetDigest(), md, &n)) { |