summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_rsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/ssl_rsa.c')
-rw-r--r--src/lib/libssl/ssl_rsa.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/libssl/ssl_rsa.c b/src/lib/libssl/ssl_rsa.c
index bada2482f8..e3a1e5dc4b 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.33 2021/05/16 14:10:43 jsing Exp $ */ 1/* $OpenBSD: ssl_rsa.c,v 1.34 2021/06/11 11:13:53 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 *
@@ -120,7 +120,7 @@ SSL_use_certificate_file(SSL *ssl, const char *file, int type)
120 } 120 }
121 121
122 ret = SSL_use_certificate(ssl, x); 122 ret = SSL_use_certificate(ssl, x);
123end: 123 end:
124 X509_free(x); 124 X509_free(x);
125 BIO_free(in); 125 BIO_free(in);
126 return (ret); 126 return (ret);
@@ -243,7 +243,7 @@ SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type)
243 } 243 }
244 ret = SSL_use_RSAPrivateKey(ssl, rsa); 244 ret = SSL_use_RSAPrivateKey(ssl, rsa);
245 RSA_free(rsa); 245 RSA_free(rsa);
246end: 246 end:
247 BIO_free(in); 247 BIO_free(in);
248 return (ret); 248 return (ret);
249} 249}
@@ -312,7 +312,7 @@ SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type)
312 } 312 }
313 ret = SSL_use_PrivateKey(ssl, pkey); 313 ret = SSL_use_PrivateKey(ssl, pkey);
314 EVP_PKEY_free(pkey); 314 EVP_PKEY_free(pkey);
315end: 315 end:
316 BIO_free(in); 316 BIO_free(in);
317 return (ret); 317 return (ret);
318} 318}
@@ -436,7 +436,7 @@ SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type)
436 } 436 }
437 437
438 ret = SSL_CTX_use_certificate(ctx, x); 438 ret = SSL_CTX_use_certificate(ctx, x);
439end: 439 end:
440 X509_free(x); 440 X509_free(x);
441 BIO_free(in); 441 BIO_free(in);
442 return (ret); 442 return (ret);
@@ -517,7 +517,7 @@ SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type)
517 } 517 }
518 ret = SSL_CTX_use_RSAPrivateKey(ctx, rsa); 518 ret = SSL_CTX_use_RSAPrivateKey(ctx, rsa);
519 RSA_free(rsa); 519 RSA_free(rsa);
520end: 520 end:
521 BIO_free(in); 521 BIO_free(in);
522 return (ret); 522 return (ret);
523} 523}
@@ -583,7 +583,7 @@ SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type)
583 } 583 }
584 ret = SSL_CTX_use_PrivateKey(ctx, pkey); 584 ret = SSL_CTX_use_PrivateKey(ctx, pkey);
585 EVP_PKEY_free(pkey); 585 EVP_PKEY_free(pkey);
586end: 586 end:
587 BIO_free(in); 587 BIO_free(in);
588 return (ret); 588 return (ret);
589} 589}
@@ -674,7 +674,7 @@ use_certificate_chain_file(const char *file, CERT *cert,
674 674
675 ret = use_certificate_chain_bio(in, cert, passwd_cb, passwd_arg); 675 ret = use_certificate_chain_bio(in, cert, passwd_cb, passwd_arg);
676 676
677end: 677 end:
678 BIO_free(in); 678 BIO_free(in);
679 return (ret); 679 return (ret);
680} 680}
@@ -711,7 +711,7 @@ SSL_CTX_use_certificate_chain_mem(SSL_CTX *ctx, void *buf, int len)
711 ctx->default_passwd_callback, 711 ctx->default_passwd_callback,
712 ctx->default_passwd_callback_userdata); 712 ctx->default_passwd_callback_userdata);
713 713
714end: 714 end:
715 BIO_free(in); 715 BIO_free(in);
716 return (ret); 716 return (ret);
717} 717}