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/asn1 | |
| 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/asn1')
| -rw-r--r-- | src/lib/libcrypto/asn1/a_sign.c | 7 | ||||
| -rw-r--r-- | src/lib/libcrypto/asn1/a_verify.c | 5 | ||||
| -rw-r--r-- | src/lib/libcrypto/asn1/n_pkey.c | 8 | ||||
| -rw-r--r-- | src/lib/libcrypto/asn1/p8_pkey.c | 5 |
4 files changed, 14 insertions, 11 deletions
diff --git a/src/lib/libcrypto/asn1/a_sign.c b/src/lib/libcrypto/asn1/a_sign.c index d9385312a7..195daa3b9f 100644 --- a/src/lib/libcrypto/asn1/a_sign.c +++ b/src/lib/libcrypto/asn1/a_sign.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: a_sign.c,v 1.20 2015/07/19 18:29:31 miod Exp $ */ | 1 | /* $OpenBSD: a_sign.c,v 1.21 2015/09/10 15:56:24 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 | * |
| @@ -112,6 +112,7 @@ | |||
| 112 | #include <sys/types.h> | 112 | #include <sys/types.h> |
| 113 | 113 | ||
| 114 | #include <stdio.h> | 114 | #include <stdio.h> |
| 115 | #include <string.h> | ||
| 115 | #include <time.h> | 116 | #include <time.h> |
| 116 | 117 | ||
| 117 | #include <openssl/bn.h> | 118 | #include <openssl/bn.h> |
| @@ -229,11 +230,11 @@ ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2, | |||
| 229 | err: | 230 | err: |
| 230 | EVP_MD_CTX_cleanup(ctx); | 231 | EVP_MD_CTX_cleanup(ctx); |
| 231 | if (buf_in != NULL) { | 232 | if (buf_in != NULL) { |
| 232 | OPENSSL_cleanse((char *)buf_in, inl); | 233 | explicit_bzero((char *)buf_in, inl); |
| 233 | free(buf_in); | 234 | free(buf_in); |
| 234 | } | 235 | } |
| 235 | if (buf_out != NULL) { | 236 | if (buf_out != NULL) { |
| 236 | OPENSSL_cleanse((char *)buf_out, outll); | 237 | explicit_bzero((char *)buf_out, outll); |
| 237 | free(buf_out); | 238 | free(buf_out); |
| 238 | } | 239 | } |
| 239 | return (outl); | 240 | return (outl); |
diff --git a/src/lib/libcrypto/asn1/a_verify.c b/src/lib/libcrypto/asn1/a_verify.c index 3fc79b78f6..12b76501e0 100644 --- a/src/lib/libcrypto/asn1/a_verify.c +++ b/src/lib/libcrypto/asn1/a_verify.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: a_verify.c,v 1.21 2015/01/28 04:14:31 beck Exp $ */ | 1 | /* $OpenBSD: a_verify.c,v 1.22 2015/09/10 15:56:24 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 | * |
| @@ -59,6 +59,7 @@ | |||
| 59 | #include <sys/types.h> | 59 | #include <sys/types.h> |
| 60 | 60 | ||
| 61 | #include <stdio.h> | 61 | #include <stdio.h> |
| 62 | #include <string.h> | ||
| 62 | #include <time.h> | 63 | #include <time.h> |
| 63 | 64 | ||
| 64 | #include <openssl/bn.h> | 65 | #include <openssl/bn.h> |
| @@ -152,7 +153,7 @@ ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, | |||
| 152 | goto err; | 153 | goto err; |
| 153 | } | 154 | } |
| 154 | 155 | ||
| 155 | OPENSSL_cleanse(buf_in, (unsigned int)inl); | 156 | explicit_bzero(buf_in, (unsigned int)inl); |
| 156 | free(buf_in); | 157 | free(buf_in); |
| 157 | 158 | ||
| 158 | if (EVP_DigestVerifyFinal(&ctx, signature->data, | 159 | if (EVP_DigestVerifyFinal(&ctx, signature->data, |
diff --git a/src/lib/libcrypto/asn1/n_pkey.c b/src/lib/libcrypto/asn1/n_pkey.c index d3a7431356..491f988e92 100644 --- a/src/lib/libcrypto/asn1/n_pkey.c +++ b/src/lib/libcrypto/asn1/n_pkey.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: n_pkey.c,v 1.26 2015/03/19 14:00:22 tedu Exp $ */ | 1 | /* $OpenBSD: n_pkey.c,v 1.27 2015/09/10 15:56:24 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 | * |
| @@ -277,7 +277,7 @@ i2d_RSA_NET(const RSA *a, unsigned char **pp, | |||
| 277 | i2d_NETSCAPE_PKEY(pkey, &zz); | 277 | i2d_NETSCAPE_PKEY(pkey, &zz); |
| 278 | 278 | ||
| 279 | /* Wipe the private key encoding */ | 279 | /* Wipe the private key encoding */ |
| 280 | OPENSSL_cleanse(pkey->private_key->data, rsalen); | 280 | explicit_bzero(pkey->private_key->data, rsalen); |
| 281 | 281 | ||
| 282 | if (cb == NULL) | 282 | if (cb == NULL) |
| 283 | cb = EVP_read_pw_string; | 283 | cb = EVP_read_pw_string; |
| @@ -297,7 +297,7 @@ i2d_RSA_NET(const RSA *a, unsigned char **pp, | |||
| 297 | 297 | ||
| 298 | if (!EVP_BytesToKey(EVP_rc4(), EVP_md5(), NULL, buf, i,1, key, NULL)) | 298 | if (!EVP_BytesToKey(EVP_rc4(), EVP_md5(), NULL, buf, i,1, key, NULL)) |
| 299 | goto err; | 299 | goto err; |
| 300 | OPENSSL_cleanse(buf, sizeof(buf)); | 300 | explicit_bzero(buf, sizeof(buf)); |
| 301 | 301 | ||
| 302 | /* Encrypt private key in place */ | 302 | /* Encrypt private key in place */ |
| 303 | zz = enckey->enckey->digest->data; | 303 | zz = enckey->enckey->digest->data; |
| @@ -394,7 +394,7 @@ d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os, | |||
| 394 | 394 | ||
| 395 | if (!EVP_BytesToKey(EVP_rc4(), EVP_md5(), NULL, buf, i,1, key, NULL)) | 395 | if (!EVP_BytesToKey(EVP_rc4(), EVP_md5(), NULL, buf, i,1, key, NULL)) |
| 396 | goto err; | 396 | goto err; |
| 397 | OPENSSL_cleanse(buf, sizeof(buf)); | 397 | explicit_bzero(buf, sizeof(buf)); |
| 398 | 398 | ||
| 399 | if (!EVP_DecryptInit_ex(&ctx, EVP_rc4(), NULL, key, NULL)) | 399 | if (!EVP_DecryptInit_ex(&ctx, EVP_rc4(), NULL, key, NULL)) |
| 400 | goto err; | 400 | goto err; |
diff --git a/src/lib/libcrypto/asn1/p8_pkey.c b/src/lib/libcrypto/asn1/p8_pkey.c index 2f7a469673..71d579456a 100644 --- a/src/lib/libcrypto/asn1/p8_pkey.c +++ b/src/lib/libcrypto/asn1/p8_pkey.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p8_pkey.c,v 1.16 2015/07/16 18:21:57 miod Exp $ */ | 1 | /* $OpenBSD: p8_pkey.c,v 1.17 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/asn1t.h> | 62 | #include <openssl/asn1t.h> |
| 62 | #include <openssl/x509.h> | 63 | #include <openssl/x509.h> |
| @@ -71,7 +72,7 @@ pkey_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) | |||
| 71 | if (key->pkey != NULL && | 72 | if (key->pkey != NULL && |
| 72 | key->pkey->type == V_ASN1_OCTET_STRING && | 73 | key->pkey->type == V_ASN1_OCTET_STRING && |
| 73 | key->pkey->value.octet_string != NULL) | 74 | key->pkey->value.octet_string != NULL) |
| 74 | OPENSSL_cleanse(key->pkey->value.octet_string->data, | 75 | explicit_bzero(key->pkey->value.octet_string->data, |
| 75 | key->pkey->value.octet_string->length); | 76 | key->pkey->value.octet_string->length); |
| 76 | } | 77 | } |
| 77 | return 1; | 78 | return 1; |
