diff options
author | Richard J. Moore <rich@kde.org> | 2016-07-30 11:47:18 +0100 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-07-30 15:19:24 -0400 |
commit | 1421aeadd757e0c564314ba62521979d08884ccc (patch) | |
tree | c8ce2b9377f3698c9fc33161723054f76bcc7244 /apps | |
parent | e5452d40be3954a12b62fa8ce6746e8a792216e1 (diff) |
Make some more X509 functions const.
Reviewed-by: Stephen Henson <steve@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1367)
Diffstat (limited to 'apps')
-rw-r--r-- | apps/ca.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -980,14 +980,14 @@ end_of_options: if (verbose) BIO_printf(bio_err, "writing new certificates\n"); for (i = 0; i < sk_X509_num(cert_sk); i++) { - ASN1_INTEGER *serialNumber = X509_get_serialNumber(x); + const ASN1_INTEGER *serialNumber = X509_get_serialNumber(x); int k; char *n; x = sk_X509_value(cert_sk, i); j = ASN1_STRING_length(serialNumber); - p = (const char *)ASN1_STRING_data(serialNumber); + p = (const char *)ASN1_STRING_data((ASN1_INTEGER *)serialNumber); if (strlen(outdir) >= (size_t)(j ? BSIZE - j * 2 - 6 : BSIZE - 8)) { BIO_printf(bio_err, "certificate file name too long\n"); @@ -1685,7 +1685,7 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, goto end; #endif - if (BN_to_ASN1_INTEGER(serial, X509_get_serialNumber(ret)) == NULL) + if (BN_to_ASN1_INTEGER(serial, (ASN1_INTEGER *)X509_get_serialNumber(ret)) == NULL) goto end; if (selfsign) { if (!X509_set_issuer_name(ret, subject)) |