From 17ebf85abda18c3875b1ba6670fe7b393bc1f297 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Tue, 16 Aug 2016 14:06:48 +0100 Subject: 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 --- crypto/x509/t_x509.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crypto/x509/t_x509.c') diff --git a/crypto/x509/t_x509.c b/crypto/x509/t_x509.c index 5fbe76768e..c96ada82a9 100644 --- a/crypto/x509/t_x509.c +++ b/crypto/x509/t_x509.c @@ -248,8 +248,9 @@ int X509_ocspid_print(BIO *bp, X509 *x) if (keybstr == NULL) goto err; - if (!EVP_Digest(ASN1_STRING_data(keybstr), ASN1_STRING_length(keybstr), - SHA1md, NULL, EVP_sha1(), NULL)) + if (!EVP_Digest(ASN1_STRING_get0_data(keybstr), + ASN1_STRING_length(keybstr), SHA1md, NULL, EVP_sha1(), + NULL)) goto err; for (i = 0; i < SHA_DIGEST_LENGTH; i++) { if (BIO_printf(bp, "%02X", SHA1md[i]) <= 0) -- cgit v1.2.3