diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-08-16 14:06:48 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-08-16 16:05:35 +0100 |
commit | 17ebf85abda18c3875b1ba6670fe7b393bc1f297 (patch) | |
tree | 224f98559daf13f77b4526df0a24a3ab1675f685 /crypto/dh | |
parent | 1940aa6e6b51147df10a5bffcaaa2b9904209184 (diff) |
Add ASN1_STRING_get0_data(), deprecate ASN1_STRING_data().
Deprecate the function ASN1_STRING_data() and replace with a new function
ASN1_STRING_get0_data() which returns a constant pointer. Update library
to use new function.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/dh')
-rw-r--r-- | crypto/dh/dh_ameth.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c index 78aea36093..2e67eeb66a 100644 --- a/crypto/dh/dh_ameth.c +++ b/crypto/dh/dh_ameth.c @@ -600,7 +600,7 @@ static int dh_cms_set_peerkey(EVP_PKEY_CTX *pctx, dhpeer = DHparams_dup(pk->pkey.dh); /* We have parameters now set public key */ plen = ASN1_STRING_length(pubkey); - p = ASN1_STRING_data(pubkey); + p = ASN1_STRING_get0_data(pubkey); if (!p || !plen) goto err; @@ -690,7 +690,7 @@ static int dh_cms_set_shared_info(EVP_PKEY_CTX *pctx, CMS_RecipientInfo *ri) if (ukm) { dukmlen = ASN1_STRING_length(ukm); - dukm = OPENSSL_memdup(ASN1_STRING_data(ukm), dukmlen); + dukm = OPENSSL_memdup(ASN1_STRING_get0_data(ukm), dukmlen); if (!dukm) goto err; } @@ -834,7 +834,7 @@ static int dh_cms_encrypt(CMS_RecipientInfo *ri) if (ukm) { dukmlen = ASN1_STRING_length(ukm); - dukm = OPENSSL_memdup(ASN1_STRING_data(ukm), dukmlen); + dukm = OPENSSL_memdup(ASN1_STRING_get0_data(ukm), dukmlen); if (!dukm) goto err; } |