summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/sha
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/sha')
-rw-r--r--src/lib/libcrypto/sha/sha1_one.c4
-rw-r--r--src/lib/libcrypto/sha/sha256.c6
-rw-r--r--src/lib/libcrypto/sha/sha512.c6
-rw-r--r--src/lib/libcrypto/sha/sha_one.c4
4 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/libcrypto/sha/sha1_one.c b/src/lib/libcrypto/sha/sha1_one.c
index f6b5e4bacf..91602ee503 100644
--- a/src/lib/libcrypto/sha/sha1_one.c
+++ b/src/lib/libcrypto/sha/sha1_one.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sha1_one.c,v 1.11 2014/07/10 22:45:58 jsing Exp $ */ 1/* $OpenBSD: sha1_one.c,v 1.12 2015/09/10 15:56:26 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 *
@@ -75,7 +75,7 @@ unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md)
75 return NULL; 75 return NULL;
76 SHA1_Update(&c,d,n); 76 SHA1_Update(&c,d,n);
77 SHA1_Final(md,&c); 77 SHA1_Final(md,&c);
78 OPENSSL_cleanse(&c,sizeof(c)); 78 explicit_bzero(&c,sizeof(c));
79 return(md); 79 return(md);
80 } 80 }
81#endif 81#endif
diff --git a/src/lib/libcrypto/sha/sha256.c b/src/lib/libcrypto/sha/sha256.c
index c5ab56852f..d584660369 100644
--- a/src/lib/libcrypto/sha/sha256.c
+++ b/src/lib/libcrypto/sha/sha256.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sha256.c,v 1.8 2014/08/18 19:11:48 bcook Exp $ */ 1/* $OpenBSD: sha256.c,v 1.9 2015/09/10 15:56:26 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2004 The OpenSSL Project. All rights reserved 3 * Copyright (c) 2004 The OpenSSL Project. All rights reserved
4 * according to the OpenSSL license [found in ../../LICENSE]. 4 * according to the OpenSSL license [found in ../../LICENSE].
@@ -49,7 +49,7 @@ unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md)
49 SHA224_Init(&c); 49 SHA224_Init(&c);
50 SHA256_Update(&c,d,n); 50 SHA256_Update(&c,d,n);
51 SHA256_Final(md,&c); 51 SHA256_Final(md,&c);
52 OPENSSL_cleanse(&c,sizeof(c)); 52 explicit_bzero(&c,sizeof(c));
53 return(md); 53 return(md);
54 } 54 }
55 55
@@ -62,7 +62,7 @@ unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md)
62 SHA256_Init(&c); 62 SHA256_Init(&c);
63 SHA256_Update(&c,d,n); 63 SHA256_Update(&c,d,n);
64 SHA256_Final(md,&c); 64 SHA256_Final(md,&c);
65 OPENSSL_cleanse(&c,sizeof(c)); 65 explicit_bzero(&c,sizeof(c));
66 return(md); 66 return(md);
67 } 67 }
68 68
diff --git a/src/lib/libcrypto/sha/sha512.c b/src/lib/libcrypto/sha/sha512.c
index ad72b7e6f1..7a55c0acc9 100644
--- a/src/lib/libcrypto/sha/sha512.c
+++ b/src/lib/libcrypto/sha/sha512.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sha512.c,v 1.13 2014/07/11 08:44:49 jsing Exp $ */ 1/* $OpenBSD: sha512.c,v 1.14 2015/09/10 15:56:26 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2004 The OpenSSL Project. All rights reserved 3 * Copyright (c) 2004 The OpenSSL Project. All rights reserved
4 * according to the OpenSSL license [found in ../../LICENSE]. 4 * according to the OpenSSL license [found in ../../LICENSE].
@@ -248,7 +248,7 @@ unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md)
248 SHA384_Init(&c); 248 SHA384_Init(&c);
249 SHA512_Update(&c,d,n); 249 SHA512_Update(&c,d,n);
250 SHA512_Final(md,&c); 250 SHA512_Final(md,&c);
251 OPENSSL_cleanse(&c,sizeof(c)); 251 explicit_bzero(&c,sizeof(c));
252 return(md); 252 return(md);
253 } 253 }
254 254
@@ -261,7 +261,7 @@ unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md)
261 SHA512_Init(&c); 261 SHA512_Init(&c);
262 SHA512_Update(&c,d,n); 262 SHA512_Update(&c,d,n);
263 SHA512_Final(md,&c); 263 SHA512_Final(md,&c);
264 OPENSSL_cleanse(&c,sizeof(c)); 264 explicit_bzero(&c,sizeof(c));
265 return(md); 265 return(md);
266 } 266 }
267 267
diff --git a/src/lib/libcrypto/sha/sha_one.c b/src/lib/libcrypto/sha/sha_one.c
index 1d3fc35f05..ad04021eb1 100644
--- a/src/lib/libcrypto/sha/sha_one.c
+++ b/src/lib/libcrypto/sha/sha_one.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sha_one.c,v 1.8 2014/07/10 22:45:58 jsing Exp $ */ 1/* $OpenBSD: sha_one.c,v 1.9 2015/09/10 15:56:26 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 *
@@ -75,7 +75,7 @@ unsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md)
75 return NULL; 75 return NULL;
76 SHA_Update(&c,d,n); 76 SHA_Update(&c,d,n);
77 SHA_Final(md,&c); 77 SHA_Final(md,&c);
78 OPENSSL_cleanse(&c,sizeof(c)); 78 explicit_bzero(&c,sizeof(c));
79 return(md); 79 return(md);
80 } 80 }
81#endif 81#endif