summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_rsa.c
diff options
context:
space:
mode:
authormarkus <>2003-11-11 22:15:20 +0000
committermarkus <>2003-11-11 22:15:20 +0000
commit38a053f575d6faf05903707a8e835dc231c7eca9 (patch)
tree6f8ff7f2313c890e1f52fd53451e7af46dad58b2 /src/lib/libssl/ssl_rsa.c
parent76b1d16ba9a90ba98e7cfdc332eb843f02c06a1c (diff)
downloadopenbsd-38a053f575d6faf05903707a8e835dc231c7eca9.tar.gz
openbsd-38a053f575d6faf05903707a8e835dc231c7eca9.tar.bz2
openbsd-38a053f575d6faf05903707a8e835dc231c7eca9.zip
merge 0.9.7c; minor bugsfixes;
API addition: ERR_release_err_state_table [make includes before you build libssl/libcrypto]
Diffstat (limited to 'src/lib/libssl/ssl_rsa.c')
-rw-r--r--src/lib/libssl/ssl_rsa.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_rsa.c b/src/lib/libssl/ssl_rsa.c
index 03828b6632..330390519b 100644
--- a/src/lib/libssl/ssl_rsa.c
+++ b/src/lib/libssl/ssl_rsa.c
@@ -207,7 +207,7 @@ static int ssl_set_pkey(CERT *c, EVP_PKEY *pkey)
207 ok=1; 207 ok=1;
208 else 208 else
209#endif 209#endif
210 if (!X509_check_private_key(c->pkeys[i].x509,pkey)) 210 if (!X509_check_private_key(c->pkeys[i].x509,pkey))
211 { 211 {
212 if ((i == SSL_PKEY_DH_RSA) || (i == SSL_PKEY_DH_DSA)) 212 if ((i == SSL_PKEY_DH_RSA) || (i == SSL_PKEY_DH_DSA))
213 { 213 {
@@ -241,6 +241,8 @@ static int ssl_set_pkey(CERT *c, EVP_PKEY *pkey)
241 return(0); 241 return(0);
242 } 242 }
243 243
244 ERR_clear_error(); /* make sure no error from X509_check_private_key()
245 * is left if we have chosen to ignore it */
244 if (c->pkeys[i].privatekey != NULL) 246 if (c->pkeys[i].privatekey != NULL)
245 EVP_PKEY_free(c->pkeys[i].privatekey); 247 EVP_PKEY_free(c->pkeys[i].privatekey);
246 CRYPTO_add(&pkey->references,1,CRYPTO_LOCK_EVP_PKEY); 248 CRYPTO_add(&pkey->references,1,CRYPTO_LOCK_EVP_PKEY);