summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2022-08-31 20:20:53 +0000
committertb <>2022-08-31 20:20:53 +0000
commite2e4fec4d7b7d40e2bc9316875c41dadae93b1be (patch)
tree17c00ffaf5bac13d8de926059cb91304597568d2
parentcf98f9e716abe3deead192179af160872e58283b (diff)
downloadopenbsd-e2e4fec4d7b7d40e2bc9316875c41dadae93b1be.tar.gz
openbsd-e2e4fec4d7b7d40e2bc9316875c41dadae93b1be.tar.bz2
openbsd-e2e4fec4d7b7d40e2bc9316875c41dadae93b1be.zip
Revert r1.46. Causes fireworks in regress.
-rw-r--r--src/lib/libssl/ssl_rsa.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/lib/libssl/ssl_rsa.c b/src/lib/libssl/ssl_rsa.c
index 98c1e1b7b3..28a24f83b3 100644
--- a/src/lib/libssl/ssl_rsa.c
+++ b/src/lib/libssl/ssl_rsa.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_rsa.c,v 1.46 2022/08/31 06:51:36 tb Exp $ */ 1/* $OpenBSD: ssl_rsa.c,v 1.47 2022/08/31 20:20:53 tb 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 *
@@ -184,13 +184,9 @@ ssl_set_pkey(SSL_CTX *ctx, SSL *ssl, EVP_PKEY *pkey)
184 184
185 if (c->pkeys[i].x509 != NULL) { 185 if (c->pkeys[i].x509 != NULL) {
186 EVP_PKEY *pktmp; 186 EVP_PKEY *pktmp;
187 187 pktmp = X509_get_pubkey(c->pkeys[i].x509);
188 if ((pktmp = X509_get0_pubkey(c->pkeys[i].x509)) == NULL) 188 EVP_PKEY_copy_parameters(pktmp, pkey);
189 return 0; 189 EVP_PKEY_free(pktmp);
190
191 if (!EVP_PKEY_copy_parameters(pktmp, pkey))
192 return 0;
193
194 ERR_clear_error(); 190 ERR_clear_error();
195 191
196 /* 192 /*
@@ -213,7 +209,7 @@ ssl_set_pkey(SSL_CTX *ctx, SSL *ssl, EVP_PKEY *pkey)
213 c->key = &(c->pkeys[i]); 209 c->key = &(c->pkeys[i]);
214 210
215 c->valid = 0; 211 c->valid = 0;
216 return 1; 212 return (1);
217} 213}
218 214
219int 215int