diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index d8964fb7..2e7c1c4d 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -4219,6 +4219,12 @@ long ssl_get_algorithm2(SSL *s) } else if (s->s3->tmp.new_cipher->algorithm_mkey & SSL_PSK) { if (alg2 == (SSL_HANDSHAKE_MAC_SHA384 | TLS1_PRF_SHA384)) return SSL_HANDSHAKE_MAC_DEFAULT | TLS1_PRF; + } else{ + // in the end of finish msg of gmssl handshake, to get the correct hash algo + printf("ssl_get_algorithm2=0x08x\n", ssl_get_algorithm2); + if (alg2 == 0x909){ + return SSL_HANDSHAKE_MAC_SM3 | TLS1_PRF_SM3; + } } return alg2; }