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/gost | |
| 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/gost')
| -rw-r--r-- | src/lib/libcrypto/gost/gost2814789.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/gost/gostr341001_key.c | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/gost/gostr341194.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/gost/streebog.c | 6 |
4 files changed, 11 insertions, 9 deletions
diff --git a/src/lib/libcrypto/gost/gost2814789.c b/src/lib/libcrypto/gost/gost2814789.c index b1bef9eae3..e285413ed4 100644 --- a/src/lib/libcrypto/gost/gost2814789.c +++ b/src/lib/libcrypto/gost/gost2814789.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: gost2814789.c,v 1.4 2015/02/10 09:46:30 miod Exp $ */ | 1 | /* $OpenBSD: gost2814789.c,v 1.5 2015/09/10 15:56:25 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> |
| 4 | * Copyright (c) 2005-2006 Cryptocom LTD | 4 | * Copyright (c) 2005-2006 Cryptocom LTD |
| @@ -464,7 +464,7 @@ GOST2814789IMIT(const unsigned char *d, size_t n, unsigned char *md, int nid, | |||
| 464 | Gost2814789_set_key(&c.cipher, key, 256); | 464 | Gost2814789_set_key(&c.cipher, key, 256); |
| 465 | GOST2814789IMIT_Update(&c, d, n); | 465 | GOST2814789IMIT_Update(&c, d, n); |
| 466 | GOST2814789IMIT_Final(md, &c); | 466 | GOST2814789IMIT_Final(md, &c); |
| 467 | OPENSSL_cleanse(&c, sizeof(c)); | 467 | explicit_bzero(&c, sizeof(c)); |
| 468 | return (md); | 468 | return (md); |
| 469 | } | 469 | } |
| 470 | 470 | ||
diff --git a/src/lib/libcrypto/gost/gostr341001_key.c b/src/lib/libcrypto/gost/gostr341001_key.c index dbe360620a..894a189e3b 100644 --- a/src/lib/libcrypto/gost/gostr341001_key.c +++ b/src/lib/libcrypto/gost/gostr341001_key.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: gostr341001_key.c,v 1.5 2015/02/14 06:40:04 jsing Exp $ */ | 1 | /* $OpenBSD: gostr341001_key.c,v 1.6 2015/09/10 15:56:25 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> |
| 4 | * Copyright (c) 2005-2006 Cryptocom LTD | 4 | * Copyright (c) 2005-2006 Cryptocom LTD |
| @@ -49,6 +49,8 @@ | |||
| 49 | * ==================================================================== | 49 | * ==================================================================== |
| 50 | */ | 50 | */ |
| 51 | 51 | ||
| 52 | #include <string.h> | ||
| 53 | |||
| 52 | #include <openssl/opensslconf.h> | 54 | #include <openssl/opensslconf.h> |
| 53 | 55 | ||
| 54 | #ifndef OPENSSL_NO_GOST | 56 | #ifndef OPENSSL_NO_GOST |
| @@ -103,7 +105,7 @@ GOST_KEY_free(GOST_KEY *r) | |||
| 103 | EC_POINT_free(r->pub_key); | 105 | EC_POINT_free(r->pub_key); |
| 104 | BN_clear_free(r->priv_key); | 106 | BN_clear_free(r->priv_key); |
| 105 | 107 | ||
| 106 | OPENSSL_cleanse((void *)r, sizeof(GOST_KEY)); | 108 | explicit_bzero((void *)r, sizeof(GOST_KEY)); |
| 107 | free(r); | 109 | free(r); |
| 108 | } | 110 | } |
| 109 | 111 | ||
diff --git a/src/lib/libcrypto/gost/gostr341194.c b/src/lib/libcrypto/gost/gostr341194.c index 32c166aefa..2a462185aa 100644 --- a/src/lib/libcrypto/gost/gostr341194.c +++ b/src/lib/libcrypto/gost/gostr341194.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: gostr341194.c,v 1.4 2015/07/15 17:13:17 beck Exp $ */ | 1 | /* $OpenBSD: gostr341194.c,v 1.5 2015/09/10 15:56:25 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> |
| 4 | * Copyright (c) 2005-2006 Cryptocom LTD | 4 | * Copyright (c) 2005-2006 Cryptocom LTD |
| @@ -267,7 +267,7 @@ GOSTR341194(const unsigned char *d, size_t n, unsigned char *md, int nid) | |||
| 267 | return 0; | 267 | return 0; |
| 268 | GOSTR341194_Update(&c, d, n); | 268 | GOSTR341194_Update(&c, d, n); |
| 269 | GOSTR341194_Final(md, &c); | 269 | GOSTR341194_Final(md, &c); |
| 270 | OPENSSL_cleanse(&c, sizeof(c)); | 270 | explicit_bzero(&c, sizeof(c)); |
| 271 | return (md); | 271 | return (md); |
| 272 | } | 272 | } |
| 273 | #endif | 273 | #endif |
diff --git a/src/lib/libcrypto/gost/streebog.c b/src/lib/libcrypto/gost/streebog.c index 8060161d11..902472bd9e 100644 --- a/src/lib/libcrypto/gost/streebog.c +++ b/src/lib/libcrypto/gost/streebog.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: streebog.c,v 1.4 2014/12/07 16:33:51 jsing Exp $ */ | 1 | /* $OpenBSD: streebog.c,v 1.5 2015/09/10 15:56:25 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> |
| 4 | * Copyright (c) 2005-2006 Cryptocom LTD | 4 | * Copyright (c) 2005-2006 Cryptocom LTD |
| @@ -1455,7 +1455,7 @@ STREEBOG256(const unsigned char *d, size_t n, unsigned char *md) | |||
| 1455 | STREEBOG256_Init(&c); | 1455 | STREEBOG256_Init(&c); |
| 1456 | STREEBOG256_Update(&c, d, n); | 1456 | STREEBOG256_Update(&c, d, n); |
| 1457 | STREEBOG256_Final(md, &c); | 1457 | STREEBOG256_Final(md, &c); |
| 1458 | OPENSSL_cleanse(&c, sizeof(c)); | 1458 | explicit_bzero(&c, sizeof(c)); |
| 1459 | return (md); | 1459 | return (md); |
| 1460 | } | 1460 | } |
| 1461 | 1461 | ||
| @@ -1470,7 +1470,7 @@ STREEBOG512(const unsigned char *d, size_t n, unsigned char *md) | |||
| 1470 | STREEBOG512_Init(&c); | 1470 | STREEBOG512_Init(&c); |
| 1471 | STREEBOG512_Update(&c, d, n); | 1471 | STREEBOG512_Update(&c, d, n); |
| 1472 | STREEBOG512_Final(md, &c); | 1472 | STREEBOG512_Final(md, &c); |
| 1473 | OPENSSL_cleanse(&c, sizeof(c)); | 1473 | explicit_bzero(&c, sizeof(c)); |
| 1474 | return (md); | 1474 | return (md); |
| 1475 | } | 1475 | } |
| 1476 | 1476 | ||
