fix ssl bugs

This commit is contained in:
Zhi Guan
2018-03-13 12:44:00 +08:00
parent 0f0d392760
commit 056130c053
2 changed files with 2 additions and 2 deletions

View File

@@ -566,7 +566,7 @@ int tls_get_message_body(SSL *s, unsigned long *len)
#ifndef OPENSSL_NO_SM2
static int ssl_cert_type_ecc(const X509 *x, const EVP_PKEY *pk)
{
if (x && X509_get_signature_nid(x) == NID_sm2sign) {
if (x && X509_get_signature_nid(x) == NID_sm2sign_with_sm3) {
if (X509_get_key_usage((X509 *)x) & X509v3_KU_DIGITAL_SIGNATURE)
return SSL_PKEY_SM2;
else

View File

@@ -690,7 +690,7 @@ int ossl_statem_server_construct_message(SSL *s)
case TLS_ST_SW_CERT:
#ifndef OPENSSL_NO_GMTLS
if (SSL_IS_GMTLS(s))
return tls_construct_server_certificate(s);
return gmtls_construct_server_certificate(s);
#endif
return tls_construct_server_certificate(s);