summaryrefslogtreecommitdiffstats
path: root/crypto/cms
diff options
context:
space:
mode:
authorAlessandro Ghedini <alessandro@ghedini.me>2016-02-26 12:21:15 +0000
committerRich Salz <rsalz@openssl.org>2016-03-08 11:10:34 -0500
commit03273d61e742b02485831ce739e4a6c9b197e3f3 (patch)
tree409404f29d10943739c95a0e2333d6431168434b /crypto/cms
parentfb46be034816e5fe9f04fd39da960d34dbf2f52d (diff)
Convert CRYPTO_LOCK_EVP_PKEY to new multi-threading API
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/cms')
-rw-r--r--crypto/cms/cms_env.c3
-rw-r--r--crypto/cms/cms_sd.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/crypto/cms/cms_env.c b/crypto/cms/cms_env.c
index 3b065ae250..c54667f5df 100644
--- a/crypto/cms/cms_env.c
+++ b/crypto/cms/cms_env.c
@@ -200,7 +200,8 @@ static int cms_RecipientInfo_ktri_init(CMS_RecipientInfo *ri, X509 *recip,
return 0;
X509_up_ref(recip);
- CRYPTO_add(&pk->references, 1, CRYPTO_LOCK_EVP_PKEY);
+ EVP_PKEY_up_ref(pk);
+
ktri->pkey = pk;
ktri->recip = recip;
diff --git a/crypto/cms/cms_sd.c b/crypto/cms/cms_sd.c
index 2757aa9392..151f40f9a5 100644
--- a/crypto/cms/cms_sd.c
+++ b/crypto/cms/cms_sd.c
@@ -283,8 +283,8 @@ CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms,
/* Call for side-effect of computing hash and caching extensions */
X509_check_purpose(signer, -1, -1);
- CRYPTO_add(&pk->references, 1, CRYPTO_LOCK_EVP_PKEY);
X509_up_ref(signer);
+ EVP_PKEY_up_ref(pk);
si->pkey = pk;
si->signer = signer;