summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsing <>2018-11-05 03:49:44 +0000
committerjsing <>2018-11-05 03:49:44 +0000
commit1747118e379623d86b5f53dcc99d185f9868ce43 (patch)
treec72465402f2125bfc4bcab84c889fd61159a09aa
parent009394a143463f10ae13a2824025c0c746eaa268 (diff)
downloadopenbsd-1747118e379623d86b5f53dcc99d185f9868ce43.tar.gz
openbsd-1747118e379623d86b5f53dcc99d185f9868ce43.tar.bz2
openbsd-1747118e379623d86b5f53dcc99d185f9868ce43.zip
Mop up ecdh_tmp, since it is no longer used.
ok bluhm@ tb@
-rw-r--r--src/lib/libssl/ssl_cert.c12
-rw-r--r--src/lib/libssl/ssl_locl.h4
-rw-r--r--src/lib/libssl/t1_lib.c13
3 files changed, 4 insertions, 25 deletions
diff --git a/src/lib/libssl/ssl_cert.c b/src/lib/libssl/ssl_cert.c
index a01f484578..567d8ea21f 100644
--- a/src/lib/libssl/ssl_cert.c
+++ b/src/lib/libssl/ssl_cert.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_cert.c,v 1.67 2018/04/25 07:10:39 tb Exp $ */ 1/* $OpenBSD: ssl_cert.c,v 1.68 2018/11/05 03:49:44 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 *
@@ -234,14 +234,6 @@ ssl_cert_dup(CERT *cert)
234 ret->dh_tmp_cb = cert->dh_tmp_cb; 234 ret->dh_tmp_cb = cert->dh_tmp_cb;
235 ret->dh_tmp_auto = cert->dh_tmp_auto; 235 ret->dh_tmp_auto = cert->dh_tmp_auto;
236 236
237 if (cert->ecdh_tmp) {
238 ret->ecdh_tmp = EC_KEY_dup(cert->ecdh_tmp);
239 if (ret->ecdh_tmp == NULL) {
240 SSLerrorx(ERR_R_EC_LIB);
241 goto err;
242 }
243 }
244
245 for (i = 0; i < SSL_PKEY_NUM; i++) { 237 for (i = 0; i < SSL_PKEY_NUM; i++) {
246 if (cert->pkeys[i].x509 != NULL) { 238 if (cert->pkeys[i].x509 != NULL) {
247 ret->pkeys[i].x509 = cert->pkeys[i].x509; 239 ret->pkeys[i].x509 = cert->pkeys[i].x509;
@@ -297,7 +289,6 @@ ssl_cert_dup(CERT *cert)
297 289
298err: 290err:
299 DH_free(ret->dh_tmp); 291 DH_free(ret->dh_tmp);
300 EC_KEY_free(ret->ecdh_tmp);
301 292
302 for (i = 0; i < SSL_PKEY_NUM; i++) { 293 for (i = 0; i < SSL_PKEY_NUM; i++) {
303 X509_free(ret->pkeys[i].x509); 294 X509_free(ret->pkeys[i].x509);
@@ -321,7 +312,6 @@ ssl_cert_free(CERT *c)
321 return; 312 return;
322 313
323 DH_free(c->dh_tmp); 314 DH_free(c->dh_tmp);
324 EC_KEY_free(c->ecdh_tmp);
325 315
326 for (i = 0; i < SSL_PKEY_NUM; i++) { 316 for (i = 0; i < SSL_PKEY_NUM; i++) {
327 X509_free(c->pkeys[i].x509); 317 X509_free(c->pkeys[i].x509);
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h
index 9a018547ab..8cedc29490 100644
--- a/src/lib/libssl/ssl_locl.h
+++ b/src/lib/libssl/ssl_locl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_locl.h,v 1.216 2018/10/24 18:04:50 jsing Exp $ */ 1/* $OpenBSD: ssl_locl.h,v 1.217 2018/11/05 03:49:44 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 *
@@ -947,8 +947,6 @@ typedef struct cert_st {
947 DH *(*dh_tmp_cb)(SSL *ssl, int is_export, int keysize); 947 DH *(*dh_tmp_cb)(SSL *ssl, int is_export, int keysize);
948 int dh_tmp_auto; 948 int dh_tmp_auto;
949 949
950 EC_KEY *ecdh_tmp;
951
952 CERT_PKEY pkeys[SSL_PKEY_NUM]; 950 CERT_PKEY pkeys[SSL_PKEY_NUM];
953 951
954 int references; /* >1 only if SSL_copy_session_id is used */ 952 int references; /* >1 only if SSL_copy_session_id is used */
diff --git a/src/lib/libssl/t1_lib.c b/src/lib/libssl/t1_lib.c
index 0a00e4da7f..30305e6b2f 100644
--- a/src/lib/libssl/t1_lib.c
+++ b/src/lib/libssl/t1_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_lib.c,v 1.144 2018/08/24 18:10:25 jsing Exp $ */ 1/* $OpenBSD: t1_lib.c,v 1.145 2018/11/05 03:49:44 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 *
@@ -608,20 +608,11 @@ tls1_check_ec_server_key(SSL *s)
608int 608int
609tls1_check_ec_tmp_key(SSL *s) 609tls1_check_ec_tmp_key(SSL *s)
610{ 610{
611 EC_KEY *ec = s->cert->ecdh_tmp;
612 uint16_t curve_id;
613
614 /* Need a shared curve. */ 611 /* Need a shared curve. */
615 if (tls1_get_shared_curve(s) != NID_undef) 612 if (tls1_get_shared_curve(s) != NID_undef)
616 return (1); 613 return (1);
617 614
618 if (ec == NULL) 615 return (0);
619 return (0);
620
621 if (tls1_set_ec_id(&curve_id, NULL, ec) != 1)
622 return (0);
623
624 return tls1_check_ec_key(s, &curve_id, NULL);
625} 616}
626 617
627/* 618/*