-/* $OpenBSD: ssl_clnt.c,v 1.130 2022/01/09 15:29:42 jsing Exp $ */
+/* $OpenBSD: ssl_clnt.c,v 1.131 2022/01/09 15:34:21 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
size_t msglen;
unsigned int md_len;
EVP_MD_CTX *ukm_hash;
- int ret = -1;
int nid;
CBB gostblob;
+ int ret = 0;
/* Get server sertificate PKEY and create ctx from it */
peer_cert = s->session->peer_pkeys[SSL_PKEY_GOST01].x509;
explicit_bzero(premaster_secret, sizeof(premaster_secret));
EVP_PKEY_free(pub_key);
- return (ret);
+ return ret;
}
int
if (!ssl3_send_client_kex_ecdhe(s, &kex))
goto err;
} else if (alg_k & SSL_kGOST) {
- if (ssl3_send_client_kex_gost(s, &kex) != 1)
+ if (!ssl3_send_client_kex_gost(s, &kex))
goto err;
} else {
ssl3_send_alert(s, SSL3_AL_FATAL,
-/* $OpenBSD: ssl_srvr.c,v 1.135 2022/01/09 15:28:47 jsing Exp $ */
+/* $OpenBSD: ssl_srvr.c,v 1.136 2022/01/09 15:34:21 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
SSLerror(s, SSL_R_BAD_PACKET_LENGTH);
ssl3_send_alert(s, SSL3_AL_FATAL, al);
err:
- return (-1);
+ return 0;
}
int
if (!ssl3_get_client_kex_ecdhe(s, &cbs))
goto err;
} else if (alg_k & SSL_kGOST) {
- if (ssl3_get_client_kex_gost(s, &cbs) != 1)
+ if (!ssl3_get_client_kex_gost(s, &cbs))
goto err;
} else {
al = SSL_AD_HANDSHAKE_FAILURE;