diff options
Diffstat (limited to 'src/lib/libcrypto/rsa')
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_eay.c | 11 | ||||
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_saos.c | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_sign.c | 6 |
3 files changed, 12 insertions, 11 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_eay.c b/src/lib/libcrypto/rsa/rsa_eay.c index 940964cac3..76863e7220 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.39 2015/06/13 08:38:10 doug Exp $ */ | 1 | /* $OpenBSD: rsa_eay.c,v 1.40 2015/09/10 15:56:25 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 | * |
| @@ -110,6 +110,7 @@ | |||
| 110 | */ | 110 | */ |
| 111 | 111 | ||
| 112 | #include <stdio.h> | 112 | #include <stdio.h> |
| 113 | #include <string.h> | ||
| 113 | 114 | ||
| 114 | #include <openssl/opensslconf.h> | 115 | #include <openssl/opensslconf.h> |
| 115 | 116 | ||
| @@ -242,7 +243,7 @@ err: | |||
| 242 | BN_CTX_free(ctx); | 243 | BN_CTX_free(ctx); |
| 243 | } | 244 | } |
| 244 | if (buf != NULL) { | 245 | if (buf != NULL) { |
| 245 | OPENSSL_cleanse(buf, num); | 246 | explicit_bzero(buf, num); |
| 246 | free(buf); | 247 | free(buf); |
| 247 | } | 248 | } |
| 248 | return r; | 249 | return r; |
| @@ -472,7 +473,7 @@ err: | |||
| 472 | BN_CTX_free(ctx); | 473 | BN_CTX_free(ctx); |
| 473 | } | 474 | } |
| 474 | if (buf != NULL) { | 475 | if (buf != NULL) { |
| 475 | OPENSSL_cleanse(buf, num); | 476 | explicit_bzero(buf, num); |
| 476 | free(buf); | 477 | free(buf); |
| 477 | } | 478 | } |
| 478 | return r; | 479 | return r; |
| @@ -607,7 +608,7 @@ err: | |||
| 607 | BN_CTX_free(ctx); | 608 | BN_CTX_free(ctx); |
| 608 | } | 609 | } |
| 609 | if (buf != NULL) { | 610 | if (buf != NULL) { |
| 610 | OPENSSL_cleanse(buf, num); | 611 | explicit_bzero(buf, num); |
| 611 | free(buf); | 612 | free(buf); |
| 612 | } | 613 | } |
| 613 | return r; | 614 | return r; |
| @@ -712,7 +713,7 @@ err: | |||
| 712 | BN_CTX_free(ctx); | 713 | BN_CTX_free(ctx); |
| 713 | } | 714 | } |
| 714 | if (buf != NULL) { | 715 | if (buf != NULL) { |
| 715 | OPENSSL_cleanse(buf, num); | 716 | explicit_bzero(buf, num); |
| 716 | free(buf); | 717 | free(buf); |
| 717 | } | 718 | } |
| 718 | return r; | 719 | return r; |
diff --git a/src/lib/libcrypto/rsa/rsa_saos.c b/src/lib/libcrypto/rsa/rsa_saos.c index 3a07a7af4a..0a4f37a3da 100644 --- a/src/lib/libcrypto/rsa/rsa_saos.c +++ b/src/lib/libcrypto/rsa/rsa_saos.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_saos.c,v 1.17 2015/07/19 18:29:31 miod Exp $ */ | 1 | /* $OpenBSD: rsa_saos.c,v 1.18 2015/09/10 15:56:25 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 | * |
| @@ -97,7 +97,7 @@ RSA_sign_ASN1_OCTET_STRING(int type, const unsigned char *m, unsigned int m_len, | |||
| 97 | else | 97 | else |
| 98 | *siglen = i; | 98 | *siglen = i; |
| 99 | 99 | ||
| 100 | OPENSSL_cleanse(s, (unsigned int)j + 1); | 100 | explicit_bzero(s, (unsigned int)j + 1); |
| 101 | free(s); | 101 | free(s); |
| 102 | return ret; | 102 | return ret; |
| 103 | } | 103 | } |
| @@ -142,7 +142,7 @@ RSA_verify_ASN1_OCTET_STRING(int dtype, const unsigned char *m, | |||
| 142 | err: | 142 | err: |
| 143 | M_ASN1_OCTET_STRING_free(sig); | 143 | M_ASN1_OCTET_STRING_free(sig); |
| 144 | if (s != NULL) { | 144 | if (s != NULL) { |
| 145 | OPENSSL_cleanse(s, (unsigned int)siglen); | 145 | explicit_bzero(s, (unsigned int)siglen); |
| 146 | free(s); | 146 | free(s); |
| 147 | } | 147 | } |
| 148 | return ret; | 148 | return ret; |
diff --git a/src/lib/libcrypto/rsa/rsa_sign.c b/src/lib/libcrypto/rsa/rsa_sign.c index db63c5f038..7be08f544b 100644 --- a/src/lib/libcrypto/rsa/rsa_sign.c +++ b/src/lib/libcrypto/rsa/rsa_sign.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_sign.c,v 1.24 2015/07/19 18:29:31 miod Exp $ */ | 1 | /* $OpenBSD: rsa_sign.c,v 1.25 2015/09/10 15:56:25 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 | * |
| @@ -137,7 +137,7 @@ RSA_sign(int type, const unsigned char *m, unsigned int m_len, | |||
| 137 | *siglen = i; | 137 | *siglen = i; |
| 138 | 138 | ||
| 139 | if (type != NID_md5_sha1) { | 139 | if (type != NID_md5_sha1) { |
| 140 | OPENSSL_cleanse(tmps, (unsigned int)j + 1); | 140 | explicit_bzero(tmps, (unsigned int)j + 1); |
| 141 | free(tmps); | 141 | free(tmps); |
| 142 | } | 142 | } |
| 143 | return (ret); | 143 | return (ret); |
| @@ -237,7 +237,7 @@ err: | |||
| 237 | if (sig != NULL) | 237 | if (sig != NULL) |
| 238 | X509_SIG_free(sig); | 238 | X509_SIG_free(sig); |
| 239 | if (s != NULL) { | 239 | if (s != NULL) { |
| 240 | OPENSSL_cleanse(s, (unsigned int)siglen); | 240 | explicit_bzero(s, (unsigned int)siglen); |
| 241 | free(s); | 241 | free(s); |
| 242 | } | 242 | } |
| 243 | return ret; | 243 | return ret; |
