mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-08-07 21:53:41 +08:00
fix ssl bugs
This commit is contained in:
@@ -566,7 +566,7 @@ int tls_get_message_body(SSL *s, unsigned long *len)
|
|||||||
#ifndef OPENSSL_NO_SM2
|
#ifndef OPENSSL_NO_SM2
|
||||||
static int ssl_cert_type_ecc(const X509 *x, const EVP_PKEY *pk)
|
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)
|
if (X509_get_key_usage((X509 *)x) & X509v3_KU_DIGITAL_SIGNATURE)
|
||||||
return SSL_PKEY_SM2;
|
return SSL_PKEY_SM2;
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -690,7 +690,7 @@ int ossl_statem_server_construct_message(SSL *s)
|
|||||||
case TLS_ST_SW_CERT:
|
case TLS_ST_SW_CERT:
|
||||||
#ifndef OPENSSL_NO_GMTLS
|
#ifndef OPENSSL_NO_GMTLS
|
||||||
if (SSL_IS_GMTLS(s))
|
if (SSL_IS_GMTLS(s))
|
||||||
return tls_construct_server_certificate(s);
|
return gmtls_construct_server_certificate(s);
|
||||||
#endif
|
#endif
|
||||||
return tls_construct_server_certificate(s);
|
return tls_construct_server_certificate(s);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user