mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-30 22:44:06 +08:00
SM4/CTR
This commit is contained in:
@@ -74,6 +74,40 @@ IMPLEMENT_gmssl_meth_func(GMSSL1_1_VERSION, GMSSLv1_1_server_method,
|
||||
|
||||
int gm1_send_server_certificate(SSL *s)
|
||||
{
|
||||
return 0;
|
||||
|
||||
CERT_PKEY *cpk;
|
||||
|
||||
if (s->state == SSL3_ST_SW_CERT_A) {
|
||||
cpk = ssl_get_server_send_pkey(s);
|
||||
if (cpk == NULL) {
|
||||
/* VRS: allow null cert if auth == KRB5 */
|
||||
if ((s->s3->tmp.new_cipher->algorithm_auth != SSL_aKRB5) ||
|
||||
(s->s3->tmp.new_cipher->algorithm_mkey & SSL_kKRB5)) {
|
||||
SSLerr(SSL_F_SSL3_SEND_SERVER_CERTIFICATE,
|
||||
ERR_R_INTERNAL_ERROR);
|
||||
s->state = SSL_ST_ERR;
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
if (!ssl3_output_cert_chain(s, cpk)) {
|
||||
SSLerr(SSL_F_SSL3_SEND_SERVER_CERTIFICATE, ERR_R_INTERNAL_ERROR);
|
||||
s->state = SSL_ST_ERR;
|
||||
return (0);
|
||||
}
|
||||
s->state = SSL3_ST_SW_CERT_B;
|
||||
}
|
||||
|
||||
/* SSL3_ST_SW_CERT_B */
|
||||
return ssl_do_write(s);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
s3_srvr.c:s3_send_server_certificate
|
||||
ssl_get_server_send_pkey
|
||||
ssl3_output_cert_chain
|
||||
ssl_add_cert_chain
|
||||
ssl_set_handshake_header
|
||||
ssl_do_write
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user