diff options
| -rw-r--r-- | src/lib/libcrypto/evp/evp_key.c | 6 | ||||
| -rw-r--r-- | src/lib/libssl/src/crypto/evp/evp_key.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libcrypto/evp/evp_key.c b/src/lib/libcrypto/evp/evp_key.c index 4718ab6175..0678536ccb 100644 --- a/src/lib/libcrypto/evp/evp_key.c +++ b/src/lib/libcrypto/evp/evp_key.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: evp_key.c,v 1.21 2015/02/10 09:52:35 miod Exp $ */ | 1 | /* $OpenBSD: evp_key.c,v 1.22 2015/02/10 09:55:39 miod 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 | * |
| @@ -149,7 +149,7 @@ EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md, | |||
| 149 | EVP_MD_CTX_init(&c); | 149 | EVP_MD_CTX_init(&c); |
| 150 | for (;;) { | 150 | for (;;) { |
| 151 | if (!EVP_DigestInit_ex(&c, md, NULL)) | 151 | if (!EVP_DigestInit_ex(&c, md, NULL)) |
| 152 | return 0; | 152 | goto err; |
| 153 | if (addmd++) | 153 | if (addmd++) |
| 154 | if (!EVP_DigestUpdate(&c, &(md_buf[0]), mds)) | 154 | if (!EVP_DigestUpdate(&c, &(md_buf[0]), mds)) |
| 155 | goto err; | 155 | goto err; |
| @@ -201,6 +201,6 @@ EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md, | |||
| 201 | 201 | ||
| 202 | err: | 202 | err: |
| 203 | EVP_MD_CTX_cleanup(&c); | 203 | EVP_MD_CTX_cleanup(&c); |
| 204 | OPENSSL_cleanse(&(md_buf[0]), EVP_MAX_MD_SIZE); | 204 | OPENSSL_cleanse(md_buf, sizeof md_buf); |
| 205 | return rv; | 205 | return rv; |
| 206 | } | 206 | } |
diff --git a/src/lib/libssl/src/crypto/evp/evp_key.c b/src/lib/libssl/src/crypto/evp/evp_key.c index 4718ab6175..0678536ccb 100644 --- a/src/lib/libssl/src/crypto/evp/evp_key.c +++ b/src/lib/libssl/src/crypto/evp/evp_key.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: evp_key.c,v 1.21 2015/02/10 09:52:35 miod Exp $ */ | 1 | /* $OpenBSD: evp_key.c,v 1.22 2015/02/10 09:55:39 miod 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 | * |
| @@ -149,7 +149,7 @@ EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md, | |||
| 149 | EVP_MD_CTX_init(&c); | 149 | EVP_MD_CTX_init(&c); |
| 150 | for (;;) { | 150 | for (;;) { |
| 151 | if (!EVP_DigestInit_ex(&c, md, NULL)) | 151 | if (!EVP_DigestInit_ex(&c, md, NULL)) |
| 152 | return 0; | 152 | goto err; |
| 153 | if (addmd++) | 153 | if (addmd++) |
| 154 | if (!EVP_DigestUpdate(&c, &(md_buf[0]), mds)) | 154 | if (!EVP_DigestUpdate(&c, &(md_buf[0]), mds)) |
| 155 | goto err; | 155 | goto err; |
| @@ -201,6 +201,6 @@ EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md, | |||
| 201 | 201 | ||
| 202 | err: | 202 | err: |
| 203 | EVP_MD_CTX_cleanup(&c); | 203 | EVP_MD_CTX_cleanup(&c); |
| 204 | OPENSSL_cleanse(&(md_buf[0]), EVP_MAX_MD_SIZE); | 204 | OPENSSL_cleanse(md_buf, sizeof md_buf); |
| 205 | return rv; | 205 | return rv; |
| 206 | } | 206 | } |
