summaryrefslogtreecommitdiff
path: root/src/lib/libssl/s3_lib.c
diff options
context:
space:
mode:
authorjsing <>2018-11-08 20:55:18 +0000
committerjsing <>2018-11-08 20:55:18 +0000
commit282c11bdbc9506966def8e70d943547afeec3c63 (patch)
treea970ddfd423ef6778696482b13ad31cb6984e3f0 /src/lib/libssl/s3_lib.c
parentd1d568e5589418aecc7cdb33ca2338d20ce7c5d8 (diff)
downloadopenbsd-282c11bdbc9506966def8e70d943547afeec3c63.tar.gz
openbsd-282c11bdbc9506966def8e70d943547afeec3c63.tar.bz2
openbsd-282c11bdbc9506966def8e70d943547afeec3c63.zip
Stop pretending that a cert member in a SSL and SSL_CTX can be NULL.
ok beck@ tb@
Diffstat (limited to 'src/lib/libssl/s3_lib.c')
-rw-r--r--src/lib/libssl/s3_lib.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c
index 6ca08774b0..356f43a356 100644
--- a/src/lib/libssl/s3_lib.c
+++ b/src/lib/libssl/s3_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s3_lib.c,v 1.174 2018/11/07 01:53:36 jsing Exp $ */ 1/* $OpenBSD: s3_lib.c,v 1.175 2018/11/08 20:55:18 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -1728,11 +1728,6 @@ _SSL_set_tmp_dh(SSL *s, DH *dh)
1728{ 1728{
1729 DH *dh_tmp; 1729 DH *dh_tmp;
1730 1730
1731 if (!ssl_cert_inst(&s->cert)) {
1732 SSLerror(s, ERR_R_MALLOC_FAILURE);
1733 return 0;
1734 }
1735
1736 if (dh == NULL) { 1731 if (dh == NULL) {
1737 SSLerror(s, ERR_R_PASSED_NULL_PARAMETER); 1732 SSLerror(s, ERR_R_PASSED_NULL_PARAMETER);
1738 return 0; 1733 return 0;
@@ -1762,11 +1757,6 @@ _SSL_set_tmp_ecdh(SSL *s, EC_KEY *ecdh)
1762 const EC_GROUP *group; 1757 const EC_GROUP *group;
1763 int nid; 1758 int nid;
1764 1759
1765 if (!ssl_cert_inst(&s->cert)) {
1766 SSLerror(s, ERR_R_MALLOC_FAILURE);
1767 return 0;
1768 }
1769
1770 if (ecdh == NULL) 1760 if (ecdh == NULL)
1771 return 0; 1761 return 0;
1772 if ((group = EC_KEY_get0_group(ecdh)) == NULL) 1762 if ((group = EC_KEY_get0_group(ecdh)) == NULL)
@@ -1994,13 +1984,6 @@ ssl3_ctrl(SSL *s, int cmd, long larg, void *parg)
1994long 1984long
1995ssl3_callback_ctrl(SSL *s, int cmd, void (*fp)(void)) 1985ssl3_callback_ctrl(SSL *s, int cmd, void (*fp)(void))
1996{ 1986{
1997 if (cmd == SSL_CTRL_SET_TMP_DH_CB || cmd == SSL_CTRL_SET_TMP_ECDH_CB) {
1998 if (!ssl_cert_inst(&s->cert)) {
1999 SSLerror(s, ERR_R_MALLOC_FAILURE);
2000 return 0;
2001 }
2002 }
2003
2004 switch (cmd) { 1987 switch (cmd) {
2005 case SSL_CTRL_SET_TMP_RSA_CB: 1988 case SSL_CTRL_SET_TMP_RSA_CB:
2006 SSLerror(s, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); 1989 SSLerror(s, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);