summaryrefslogtreecommitdiff
path: root/lib/libssl
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2022-08-31 20:20:54 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2022-08-31 20:20:54 +0000
commit62f280c4b64b53f61afa0c73cb4134e0f36fdf4d (patch)
tree6d925f3a50884f5122863ac99cee6d32d341ff91 /lib/libssl
parente1fd567903ad0be85ed970bb80251121d913939b (diff)
Revert r1.46. Causes fireworks in regress.
Diffstat (limited to 'lib/libssl')
-rw-r--r--lib/libssl/ssl_rsa.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/libssl/ssl_rsa.c b/lib/libssl/ssl_rsa.c
index 98c1e1b7b38..28a24f83b3f 100644
--- a/lib/libssl/ssl_rsa.c
+++ b/lib/libssl/ssl_rsa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_rsa.c,v 1.46 2022/08/31 06:51:36 tb Exp $ */
+/* $OpenBSD: ssl_rsa.c,v 1.47 2022/08/31 20:20:53 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -184,13 +184,9 @@ ssl_set_pkey(SSL_CTX *ctx, SSL *ssl, EVP_PKEY *pkey)
if (c->pkeys[i].x509 != NULL) {
EVP_PKEY *pktmp;
-
- if ((pktmp = X509_get0_pubkey(c->pkeys[i].x509)) == NULL)
- return 0;
-
- if (!EVP_PKEY_copy_parameters(pktmp, pkey))
- return 0;
-
+ pktmp = X509_get_pubkey(c->pkeys[i].x509);
+ EVP_PKEY_copy_parameters(pktmp, pkey);
+ EVP_PKEY_free(pktmp);
ERR_clear_error();
/*
@@ -213,7 +209,7 @@ ssl_set_pkey(SSL_CTX *ctx, SSL *ssl, EVP_PKEY *pkey)
c->key = &(c->pkeys[i]);
c->valid = 0;
- return 1;
+ return (1);
}
int