Update s3_lib.c

in the end of finish msg of gmssl handshake, to get the correct hash algo, otherwise verify failed
This commit is contained in:
yuanzh78
2019-05-05 09:30:15 +08:00
committed by GitHub
parent 4a20b5f54c
commit b101236292

View File

@@ -4264,6 +4264,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;
}