mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
prevent possible segv if SSL_get_current_cipher() returns NULL in
ssl_var_lookup_ssl_cipher() git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92883 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -552,8 +552,10 @@ static char *ssl_var_lookup_ssl_cipher(apr_pool_t *p, conn_rec *c, char *var)
|
||||
ssl = sslconn->ssl;
|
||||
ssl_var_lookup_ssl_cipher_bits(ssl, &usekeysize, &algkeysize);
|
||||
|
||||
if (strEQ(var, ""))
|
||||
result = (ssl != NULL ? (char *)SSL_get_cipher_name(ssl) : NULL);
|
||||
if (ssl && strEQ(var, "")) {
|
||||
SSL_CIPHER *cipher = SSL_get_current_cipher(ssl);
|
||||
result = (cipher != NULL ? (char *)SSL_CIPHER_get_name(cipher) : NULL);
|
||||
}
|
||||
else if (strcEQ(var, "_EXPORT"))
|
||||
result = (usekeysize < 56 ? "true" : "false");
|
||||
else if (strcEQ(var, "_USEKEYSIZE")) {
|
||||
|
Reference in New Issue
Block a user