diff options
Diffstat (limited to 'src/lib/libcrypto/pem/pvkfmt.c')
-rw-r--r-- | src/lib/libcrypto/pem/pvkfmt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/pem/pvkfmt.c b/src/lib/libcrypto/pem/pvkfmt.c index 025381bcc0..f5a9de39fc 100644 --- a/src/lib/libcrypto/pem/pvkfmt.c +++ b/src/lib/libcrypto/pem/pvkfmt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: pvkfmt.c,v 1.13 2015/05/15 11:00:14 jsg Exp $ */ | 1 | /* $OpenBSD: pvkfmt.c,v 1.14 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 2005. | 3 | * project 2005. |
4 | */ | 4 | */ |
@@ -765,7 +765,7 @@ do_PVK_body(const unsigned char **in, unsigned int saltlen, | |||
765 | if (!EVP_DecryptInit_ex(&cctx, EVP_rc4(), NULL, keybuf, | 765 | if (!EVP_DecryptInit_ex(&cctx, EVP_rc4(), NULL, keybuf, |
766 | NULL)) | 766 | NULL)) |
767 | goto err; | 767 | goto err; |
768 | OPENSSL_cleanse(keybuf, 20); | 768 | explicit_bzero(keybuf, 20); |
769 | if (!EVP_DecryptUpdate(&cctx, q, &enctmplen, p, inlen)) | 769 | if (!EVP_DecryptUpdate(&cctx, q, &enctmplen, p, inlen)) |
770 | goto err; | 770 | goto err; |
771 | if (!EVP_DecryptFinal_ex(&cctx, q + enctmplen, | 771 | if (!EVP_DecryptFinal_ex(&cctx, q + enctmplen, |
@@ -777,7 +777,7 @@ do_PVK_body(const unsigned char **in, unsigned int saltlen, | |||
777 | goto err; | 777 | goto err; |
778 | } | 778 | } |
779 | } else | 779 | } else |
780 | OPENSSL_cleanse(keybuf, 20); | 780 | explicit_bzero(keybuf, 20); |
781 | p = enctmp; | 781 | p = enctmp; |
782 | } | 782 | } |
783 | 783 | ||
@@ -823,7 +823,7 @@ b2i_PVK_bio(BIO *in, pem_password_cb *cb, void *u) | |||
823 | 823 | ||
824 | err: | 824 | err: |
825 | if (buf) { | 825 | if (buf) { |
826 | OPENSSL_cleanse(buf, buflen); | 826 | explicit_bzero(buf, buflen); |
827 | free(buf); | 827 | free(buf); |
828 | } | 828 | } |
829 | return ret; | 829 | return ret; |
@@ -894,7 +894,7 @@ i2b_PVK(unsigned char **out, EVP_PKEY*pk, int enclevel, pem_password_cb *cb, | |||
894 | p = salt + PVK_SALTLEN + 8; | 894 | p = salt + PVK_SALTLEN + 8; |
895 | if (!EVP_EncryptInit_ex(&cctx, EVP_rc4(), NULL, keybuf, NULL)) | 895 | if (!EVP_EncryptInit_ex(&cctx, EVP_rc4(), NULL, keybuf, NULL)) |
896 | goto error; | 896 | goto error; |
897 | OPENSSL_cleanse(keybuf, 20); | 897 | explicit_bzero(keybuf, 20); |
898 | if (!EVP_DecryptUpdate(&cctx, p, &enctmplen, p, pklen - 8)) | 898 | if (!EVP_DecryptUpdate(&cctx, p, &enctmplen, p, pklen - 8)) |
899 | goto error; | 899 | goto error; |
900 | if (!EVP_DecryptFinal_ex(&cctx, p + enctmplen, &enctmplen)) | 900 | if (!EVP_DecryptFinal_ex(&cctx, p + enctmplen, &enctmplen)) |