diff options
Diffstat (limited to 'src/lib/libcrypto/pem/pem_pk8.c')
-rw-r--r-- | src/lib/libcrypto/pem/pem_pk8.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/pem/pem_pk8.c b/src/lib/libcrypto/pem/pem_pk8.c index 5b0fcc236b..d02dec1546 100644 --- a/src/lib/libcrypto/pem/pem_pk8.c +++ b/src/lib/libcrypto/pem/pem_pk8.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: pem_pk8.c,v 1.9 2014/10/18 17:20:40 jsing Exp $ */ | 1 | /* $OpenBSD: pem_pk8.c,v 1.10 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 | * |
@@ -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/buffer.h> | 62 | #include <openssl/buffer.h> |
62 | #include <openssl/err.h> | 63 | #include <openssl/err.h> |
@@ -135,7 +136,7 @@ do_pk8pkey(BIO *bp, EVP_PKEY *x, int isder, int nid, const EVP_CIPHER *enc, | |||
135 | } | 136 | } |
136 | p8 = PKCS8_encrypt(nid, enc, kstr, klen, NULL, 0, 0, p8inf); | 137 | p8 = PKCS8_encrypt(nid, enc, kstr, klen, NULL, 0, 0, p8inf); |
137 | if (kstr == buf) | 138 | if (kstr == buf) |
138 | OPENSSL_cleanse(buf, klen); | 139 | explicit_bzero(buf, klen); |
139 | PKCS8_PRIV_KEY_INFO_free(p8inf); | 140 | PKCS8_PRIV_KEY_INFO_free(p8inf); |
140 | if (isder) | 141 | if (isder) |
141 | ret = i2d_PKCS8_bio(bp, p8); | 142 | ret = i2d_PKCS8_bio(bp, p8); |