Fix crash and latest update.
This commit is contained in:
+1
-3
@@ -1685,6 +1685,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
|
||||
}
|
||||
}
|
||||
OPENSSL_free(co_list); /* Not needed any longer */
|
||||
co_list = NULL;
|
||||
OSSL_TRACE_END(TLS_CIPHER);
|
||||
|
||||
if (!update_cipher_list_by_id(cipher_list_by_id, cipherstack))
|
||||
@@ -1705,9 +1706,6 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
|
||||
*cipher_list = pref_list;
|
||||
pref_list = NULL;
|
||||
|
||||
// sk_SSL_CIPHER_free(*cipher_list);
|
||||
// *cipher_list = cipherstack;
|
||||
|
||||
return cipherstack;
|
||||
|
||||
err:
|
||||
|
||||
+3
-10
@@ -2649,21 +2649,14 @@ STACK_OF(SSL_CIPHER) *SSL_CTX_get_ciphers(const SSL_CTX *ctx)
|
||||
/*
|
||||
* Distinguish between ciphers controlled by set_ciphersuite() and
|
||||
* set_cipher_list() when counting.
|
||||
* Enabled "TLS13+AESGCM+AES128" or the others.
|
||||
*/
|
||||
static int cipher_list_tls12_num(STACK_OF(SSL_CIPHER) *sk)
|
||||
{
|
||||
int i, num = 0;
|
||||
const SSL_CIPHER *c;
|
||||
|
||||
if (sk == NULL)
|
||||
return 0;
|
||||
for (i = 0; i < sk_SSL_CIPHER_num(sk); ++i) {
|
||||
c = sk_SSL_CIPHER_value(sk, i);
|
||||
if (c->min_tls >= TLS1_3_VERSION)
|
||||
continue;
|
||||
num++;
|
||||
}
|
||||
return num;
|
||||
else
|
||||
return sk_SSL_CIPHER_num(sk);
|
||||
}
|
||||
|
||||
/** specify the ciphers to be used by default by the SSL_CTX */
|
||||
|
||||
Reference in New Issue
Block a user