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 /apps/x509.c | |
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 'apps/x509.c')
-rw-r--r-- | apps/x509.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/x509.c b/apps/x509.c index ed49c4e8fb..93b0eae852 100644 --- a/apps/x509.c +++ b/apps/x509.c @@ -849,10 +849,9 @@ int x509_main(int argc, char **argv) if (badsig) { ASN1_BIT_STRING *signature; - unsigned char *s; X509_get0_signature(&signature, NULL, x); - s = ASN1_STRING_data(signature); - s[ASN1_STRING_length(signature) - 1] ^= 0x1; + if (!corrupt_signature(signature)) + goto end; } if (outformat == FORMAT_ASN1) |