提交 a20152bd 编写于 作者: A Andy Polyakov

ssl/ssl_ciph.c: interim solution for assertion in d1_pkt.c(444).

PR: 2778
上级 fd2b65ce
...@@ -616,18 +616,19 @@ int ssl_cipher_get_evp(const SSL_SESSION *s, const EVP_CIPHER **enc, ...@@ -616,18 +616,19 @@ int ssl_cipher_get_evp(const SSL_SESSION *s, const EVP_CIPHER **enc,
{ {
const EVP_CIPHER *evp; const EVP_CIPHER *evp;
if (s->ssl_version >= TLS1_VERSION && if (s->ssl_version>>8 != TLS1_VERSION_MAJOR ||
c->algorithm_enc == SSL_RC4 && s->ssl_version < TLS1_VERSION)
return 1;
if (c->algorithm_enc == SSL_RC4 &&
c->algorithm_mac == SSL_MD5 && c->algorithm_mac == SSL_MD5 &&
(evp=EVP_get_cipherbyname("RC4-HMAC-MD5"))) (evp=EVP_get_cipherbyname("RC4-HMAC-MD5")))
*enc = evp, *md = NULL; *enc = evp, *md = NULL;
else if (s->ssl_version >= TLS1_VERSION && else if (c->algorithm_enc == SSL_AES128 &&
c->algorithm_enc == SSL_AES128 &&
c->algorithm_mac == SSL_SHA1 && c->algorithm_mac == SSL_SHA1 &&
(evp=EVP_get_cipherbyname("AES-128-CBC-HMAC-SHA1"))) (evp=EVP_get_cipherbyname("AES-128-CBC-HMAC-SHA1")))
*enc = evp, *md = NULL; *enc = evp, *md = NULL;
else if (s->ssl_version >= TLS1_VERSION && else if (c->algorithm_enc == SSL_AES256 &&
c->algorithm_enc == SSL_AES256 &&
c->algorithm_mac == SSL_SHA1 && c->algorithm_mac == SSL_SHA1 &&
(evp=EVP_get_cipherbyname("AES-256-CBC-HMAC-SHA1"))) (evp=EVP_get_cipherbyname("AES-256-CBC-HMAC-SHA1")))
*enc = evp, *md = NULL; *enc = evp, *md = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册