diff options
| author | jsing <> | 2015-09-10 15:56:26 +0000 |
|---|---|---|
| committer | jsing <> | 2015-09-10 15:56:26 +0000 |
| commit | 1b9402de2dd1b97eca2be1996ed51c82f0663c92 (patch) | |
| tree | 27c1922db8e3f519794fe6a13a1dfba3d4759090 /src/lib/libcrypto/pkcs12 | |
| parent | e1b77a3f14ebb06ead650e78b43ddd6546237b0a (diff) | |
| download | openbsd-1b9402de2dd1b97eca2be1996ed51c82f0663c92.tar.gz openbsd-1b9402de2dd1b97eca2be1996ed51c82f0663c92.tar.bz2 openbsd-1b9402de2dd1b97eca2be1996ed51c82f0663c92.zip | |
Correct spelling of OPENSSL_cleanse.
ok miod@
Diffstat (limited to 'src/lib/libcrypto/pkcs12')
| -rw-r--r-- | src/lib/libcrypto/pkcs12/p12_crpt.c | 7 | ||||
| -rw-r--r-- | src/lib/libcrypto/pkcs12/p12_decr.c | 7 | ||||
| -rw-r--r-- | src/lib/libcrypto/pkcs12/p12_key.c | 4 |
3 files changed, 10 insertions, 8 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_crpt.c b/src/lib/libcrypto/pkcs12/p12_crpt.c index 288c93c49f..0f215d2fe2 100644 --- a/src/lib/libcrypto/pkcs12/p12_crpt.c +++ b/src/lib/libcrypto/pkcs12/p12_crpt.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p12_crpt.c,v 1.11 2014/07/11 08:44:49 jsing Exp $ */ | 1 | /* $OpenBSD: p12_crpt.c,v 1.12 2015/09/10 15:56:25 jsing Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| @@ -57,6 +57,7 @@ | |||
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #include <stdio.h> | 59 | #include <stdio.h> |
| 60 | #include <string.h> | ||
| 60 | 61 | ||
| 61 | #include <openssl/err.h> | 62 | #include <openssl/err.h> |
| 62 | #include <openssl/pkcs12.h> | 63 | #include <openssl/pkcs12.h> |
| @@ -111,7 +112,7 @@ PKCS12_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, | |||
| 111 | } | 112 | } |
| 112 | PBEPARAM_free(pbe); | 113 | PBEPARAM_free(pbe); |
| 113 | ret = EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, en_de); | 114 | ret = EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, en_de); |
| 114 | OPENSSL_cleanse(key, EVP_MAX_KEY_LENGTH); | 115 | explicit_bzero(key, EVP_MAX_KEY_LENGTH); |
| 115 | OPENSSL_cleanse(iv, EVP_MAX_IV_LENGTH); | 116 | explicit_bzero(iv, EVP_MAX_IV_LENGTH); |
| 116 | return ret; | 117 | return ret; |
| 117 | } | 118 | } |
diff --git a/src/lib/libcrypto/pkcs12/p12_decr.c b/src/lib/libcrypto/pkcs12/p12_decr.c index 4cccf43d3f..00195f0a98 100644 --- a/src/lib/libcrypto/pkcs12/p12_decr.c +++ b/src/lib/libcrypto/pkcs12/p12_decr.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p12_decr.c,v 1.15 2015/05/15 11:00:14 jsg Exp $ */ | 1 | /* $OpenBSD: p12_decr.c,v 1.16 2015/09/10 15:56:25 jsing Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| @@ -57,6 +57,7 @@ | |||
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #include <stdio.h> | 59 | #include <stdio.h> |
| 60 | #include <string.h> | ||
| 60 | 61 | ||
| 61 | #include <openssl/err.h> | 62 | #include <openssl/err.h> |
| 62 | #include <openssl/pkcs12.h> | 63 | #include <openssl/pkcs12.h> |
| @@ -137,7 +138,7 @@ PKCS12_item_decrypt_d2i(X509_ALGOR *algor, const ASN1_ITEM *it, | |||
| 137 | p = out; | 138 | p = out; |
| 138 | ret = ASN1_item_d2i(NULL, &p, outlen, it); | 139 | ret = ASN1_item_d2i(NULL, &p, outlen, it); |
| 139 | if (zbuf) | 140 | if (zbuf) |
| 140 | OPENSSL_cleanse(out, outlen); | 141 | explicit_bzero(out, outlen); |
| 141 | if (!ret) | 142 | if (!ret) |
| 142 | PKCS12err(PKCS12_F_PKCS12_ITEM_DECRYPT_D2I, | 143 | PKCS12err(PKCS12_F_PKCS12_ITEM_DECRYPT_D2I, |
| 143 | PKCS12_R_DECODE_ERROR); | 144 | PKCS12_R_DECODE_ERROR); |
| @@ -176,7 +177,7 @@ PKCS12_item_i2d_encrypt(X509_ALGOR *algor, const ASN1_ITEM *it, | |||
| 176 | goto err; | 177 | goto err; |
| 177 | } | 178 | } |
| 178 | if (zbuf) | 179 | if (zbuf) |
| 179 | OPENSSL_cleanse(in, inlen); | 180 | explicit_bzero(in, inlen); |
| 180 | free(in); | 181 | free(in); |
| 181 | return oct; | 182 | return oct; |
| 182 | 183 | ||
diff --git a/src/lib/libcrypto/pkcs12/p12_key.c b/src/lib/libcrypto/pkcs12/p12_key.c index 0b3547a6fb..38f8a8194c 100644 --- a/src/lib/libcrypto/pkcs12/p12_key.c +++ b/src/lib/libcrypto/pkcs12/p12_key.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p12_key.c,v 1.22 2015/02/07 13:19:15 doug Exp $ */ | 1 | /* $OpenBSD: p12_key.c,v 1.23 2015/09/10 15:56:25 jsing Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| @@ -89,7 +89,7 @@ PKCS12_key_gen_asc(const char *pass, int passlen, unsigned char *salt, | |||
| 89 | if (ret <= 0) | 89 | if (ret <= 0) |
| 90 | return 0; | 90 | return 0; |
| 91 | if (unipass) { | 91 | if (unipass) { |
| 92 | OPENSSL_cleanse(unipass, uniplen); | 92 | explicit_bzero(unipass, uniplen); |
| 93 | free(unipass); | 93 | free(unipass); |
| 94 | } | 94 | } |
| 95 | return ret; | 95 | return ret; |
