summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/cms
diff options
context:
space:
mode:
authorjsing <>2015-09-10 15:56:26 +0000
committerjsing <>2015-09-10 15:56:26 +0000
commit1b9402de2dd1b97eca2be1996ed51c82f0663c92 (patch)
tree27c1922db8e3f519794fe6a13a1dfba3d4759090 /src/lib/libcrypto/cms
parente1b77a3f14ebb06ead650e78b43ddd6546237b0a (diff)
downloadopenbsd-1b9402de2dd1b97eca2be1996ed51c82f0663c92.tar.gz
openbsd-1b9402de2dd1b97eca2be1996ed51c82f0663c92.tar.bz2
openbsd-1b9402de2dd1b97eca2be1996ed51c82f0663c92.zip
Correct spelling of OPENSSL_cleanse.
ok miod@
Diffstat (limited to 'src/lib/libcrypto/cms')
-rw-r--r--src/lib/libcrypto/cms/cms_asn1.c6
-rw-r--r--src/lib/libcrypto/cms/cms_enc.c8
-rw-r--r--src/lib/libcrypto/cms/cms_env.c10
-rw-r--r--src/lib/libcrypto/cms/cms_pwri.c4
4 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/libcrypto/cms/cms_asn1.c b/src/lib/libcrypto/cms/cms_asn1.c
index 02a594575d..e450259832 100644
--- a/src/lib/libcrypto/cms/cms_asn1.c
+++ b/src/lib/libcrypto/cms/cms_asn1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cms_asn1.c,v 1.6 2015/07/25 15:22:10 jsing Exp $ */ 1/* $OpenBSD: cms_asn1.c,v 1.7 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. 3 * project.
4 */ 4 */
@@ -888,13 +888,13 @@ cms_ri_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg)
888 } else if (ri->type == CMS_RECIPINFO_KEK) { 888 } else if (ri->type == CMS_RECIPINFO_KEK) {
889 CMS_KEKRecipientInfo *kekri = ri->d.kekri; 889 CMS_KEKRecipientInfo *kekri = ri->d.kekri;
890 if (kekri->key) { 890 if (kekri->key) {
891 OPENSSL_cleanse(kekri->key, kekri->keylen); 891 explicit_bzero(kekri->key, kekri->keylen);
892 free(kekri->key); 892 free(kekri->key);
893 } 893 }
894 } else if (ri->type == CMS_RECIPINFO_PASS) { 894 } else if (ri->type == CMS_RECIPINFO_PASS) {
895 CMS_PasswordRecipientInfo *pwri = ri->d.pwri; 895 CMS_PasswordRecipientInfo *pwri = ri->d.pwri;
896 if (pwri->pass) { 896 if (pwri->pass) {
897 OPENSSL_cleanse(pwri->pass, pwri->passlen); 897 explicit_bzero(pwri->pass, pwri->passlen);
898 free(pwri->pass); 898 free(pwri->pass);
899 } 899 }
900 } 900 }
diff --git a/src/lib/libcrypto/cms/cms_enc.c b/src/lib/libcrypto/cms/cms_enc.c
index f97e4d5f34..c967a18a3c 100644
--- a/src/lib/libcrypto/cms/cms_enc.c
+++ b/src/lib/libcrypto/cms/cms_enc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cms_enc.c,v 1.6 2014/10/22 13:02:04 jsing Exp $ */ 1/* $OpenBSD: cms_enc.c,v 1.7 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. 3 * project.
4 */ 4 */
@@ -164,7 +164,7 @@ cms_EncryptedContent_init_bio(CMS_EncryptedContentInfo *ec)
164 goto err; 164 goto err;
165 } else { 165 } else {
166 /* Use random key */ 166 /* Use random key */
167 OPENSSL_cleanse(ec->key, ec->keylen); 167 explicit_bzero(ec->key, ec->keylen);
168 free(ec->key); 168 free(ec->key);
169 ec->key = tkey; 169 ec->key = tkey;
170 ec->keylen = tkeylen; 170 ec->keylen = tkeylen;
@@ -197,12 +197,12 @@ cms_EncryptedContent_init_bio(CMS_EncryptedContentInfo *ec)
197 197
198err: 198err:
199 if (ec->key && !keep_key) { 199 if (ec->key && !keep_key) {
200 OPENSSL_cleanse(ec->key, ec->keylen); 200 explicit_bzero(ec->key, ec->keylen);
201 free(ec->key); 201 free(ec->key);
202 ec->key = NULL; 202 ec->key = NULL;
203 } 203 }
204 if (tkey) { 204 if (tkey) {
205 OPENSSL_cleanse(tkey, tkeylen); 205 explicit_bzero(tkey, tkeylen);
206 free(tkey); 206 free(tkey);
207 } 207 }
208 if (ok) 208 if (ok)
diff --git a/src/lib/libcrypto/cms/cms_env.c b/src/lib/libcrypto/cms/cms_env.c
index 63b24b6374..e483c4539f 100644
--- a/src/lib/libcrypto/cms/cms_env.c
+++ b/src/lib/libcrypto/cms/cms_env.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cms_env.c,v 1.8 2014/10/18 17:20:40 jsing Exp $ */ 1/* $OpenBSD: cms_env.c,v 1.9 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. 3 * project.
4 */ 4 */
@@ -406,7 +406,7 @@ cms_RecipientInfo_ktri_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri)
406 ret = 1; 406 ret = 1;
407 407
408 if (ec->key) { 408 if (ec->key) {
409 OPENSSL_cleanse(ec->key, ec->keylen); 409 explicit_bzero(ec->key, ec->keylen);
410 free(ec->key); 410 free(ec->key);
411 } 411 }
412 412
@@ -654,7 +654,7 @@ cms_RecipientInfo_kekri_encrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri)
654err: 654err:
655 if (!r && wkey) 655 if (!r && wkey)
656 free(wkey); 656 free(wkey);
657 OPENSSL_cleanse(&actx, sizeof(actx)); 657 explicit_bzero(&actx, sizeof(actx));
658 658
659 return r; 659 return r;
660} 660}
@@ -727,7 +727,7 @@ cms_RecipientInfo_kekri_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri)
727err: 727err:
728 if (!r && ukey) 728 if (!r && ukey)
729 free(ukey); 729 free(ukey);
730 OPENSSL_cleanse(&actx, sizeof(actx)); 730 explicit_bzero(&actx, sizeof(actx));
731 731
732 return r; 732 return r;
733} 733}
@@ -806,7 +806,7 @@ cms_EnvelopedData_init_bio(CMS_ContentInfo *cms)
806err: 806err:
807 ec->cipher = NULL; 807 ec->cipher = NULL;
808 if (ec->key) { 808 if (ec->key) {
809 OPENSSL_cleanse(ec->key, ec->keylen); 809 explicit_bzero(ec->key, ec->keylen);
810 free(ec->key); 810 free(ec->key);
811 ec->key = NULL; 811 ec->key = NULL;
812 ec->keylen = 0; 812 ec->keylen = 0;
diff --git a/src/lib/libcrypto/cms/cms_pwri.c b/src/lib/libcrypto/cms/cms_pwri.c
index 11509e3c11..7055ba5d3b 100644
--- a/src/lib/libcrypto/cms/cms_pwri.c
+++ b/src/lib/libcrypto/cms/cms_pwri.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cms_pwri.c,v 1.9 2015/05/15 11:00:14 jsg Exp $ */ 1/* $OpenBSD: cms_pwri.c,v 1.10 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. 3 * project.
4 */ 4 */
@@ -262,7 +262,7 @@ kek_unwrap_key(unsigned char *out, size_t *outlen, const unsigned char *in,
262 rv = 1; 262 rv = 1;
263 263
264err: 264err:
265 OPENSSL_cleanse(tmp, inlen); 265 explicit_bzero(tmp, inlen);
266 free(tmp); 266 free(tmp);
267 return rv; 267 return rv;
268} 268}