summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa/rsa_eay.c
diff options
context:
space:
mode:
authorbeck <>2017-04-28 22:46:40 +0000
committerbeck <>2017-04-28 22:46:40 +0000
commit0e8cbd9898a13fec69ddf5721cdf1137fe077ca5 (patch)
tree3d1f17028c1d6966d7d9ab06847304c2fbde6b98 /src/lib/libcrypto/rsa/rsa_eay.c
parent56efd82fd673bfdc68211c3fedb80c9ce8fdf05b (diff)
downloadopenbsd-0e8cbd9898a13fec69ddf5721cdf1137fe077ca5.tar.gz
openbsd-0e8cbd9898a13fec69ddf5721cdf1137fe077ca5.tar.bz2
openbsd-0e8cbd9898a13fec69ddf5721cdf1137fe077ca5.zip
revert previous accidental commit
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_eay.c')
-rw-r--r--src/lib/libcrypto/rsa/rsa_eay.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_eay.c b/src/lib/libcrypto/rsa/rsa_eay.c
index 128269a81a..f9f620ae23 100644
--- a/src/lib/libcrypto/rsa/rsa_eay.c
+++ b/src/lib/libcrypto/rsa/rsa_eay.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_eay.c,v 1.47 2017/04/28 22:38:51 beck Exp $ */ 1/* $OpenBSD: rsa_eay.c,v 1.48 2017/04/28 22:46:40 beck 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 *
@@ -244,8 +244,10 @@ err:
244 BN_CTX_end(ctx); 244 BN_CTX_end(ctx);
245 BN_CTX_free(ctx); 245 BN_CTX_free(ctx);
246 } 246 }
247 freezero(buf, num); 247 if (buf != NULL) {
248 248 explicit_bzero(buf, num);
249 free(buf);
250 }
249 return r; 251 return r;
250} 252}
251 253
@@ -466,8 +468,10 @@ err:
466 BN_CTX_end(ctx); 468 BN_CTX_end(ctx);
467 BN_CTX_free(ctx); 469 BN_CTX_free(ctx);
468 } 470 }
469 freezero(buf, num); 471 if (buf != NULL) {
470 472 explicit_bzero(buf, num);
473 free(buf);
474 }
471 return r; 475 return r;
472} 476}
473 477
@@ -593,8 +597,10 @@ err:
593 BN_CTX_end(ctx); 597 BN_CTX_end(ctx);
594 BN_CTX_free(ctx); 598 BN_CTX_free(ctx);
595 } 599 }
596 freezero(buf, num); 600 if (buf != NULL) {
597 601 explicit_bzero(buf, num);
602 free(buf);
603 }
598 return r; 604 return r;
599} 605}
600 606
@@ -694,8 +700,10 @@ err:
694 BN_CTX_end(ctx); 700 BN_CTX_end(ctx);
695 BN_CTX_free(ctx); 701 BN_CTX_free(ctx);
696 } 702 }
697 freezero(buf, num); 703 if (buf != NULL) {
698 704 explicit_bzero(buf, num);
705 free(buf);
706 }
699 return r; 707 return r;
700} 708}
701 709