diff options
author | Matt Caswell <matt@openssl.org> | 2016-08-13 15:44:07 +0200 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-08-17 14:38:03 +0200 |
commit | 5e6089f0eba7b12f21b3237c57f2bd56049eb1ae (patch) | |
tree | 4fdb1a5e466cab61f513afef6549b5068204035b /crypto/x509 | |
parent | Make X509_NAME_get0_der() conform to OpenSSL style (diff) | |
download | openssl-5e6089f0eba7b12f21b3237c57f2bd56049eb1ae.tar.xz openssl-5e6089f0eba7b12f21b3237c57f2bd56049eb1ae.zip |
Convert X509_CRL* functions to use const getters
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Stephen Henson <steve@openssl.org>
Diffstat (limited to 'crypto/x509')
-rw-r--r-- | crypto/x509/t_crl.c | 6 | ||||
-rw-r--r-- | crypto/x509/t_x509.c | 3 | ||||
-rw-r--r-- | crypto/x509/x509cset.c | 6 |
3 files changed, 8 insertions, 7 deletions
diff --git a/crypto/x509/t_crl.c b/crypto/x509/t_crl.c index 9b6b5a5147..2451ee72db 100644 --- a/crypto/x509/t_crl.c +++ b/crypto/x509/t_crl.c @@ -36,8 +36,8 @@ int X509_CRL_print(BIO *out, X509_CRL *x) { STACK_OF(X509_REVOKED) *rev; X509_REVOKED *r; - X509_ALGOR *sig_alg; - ASN1_BIT_STRING *sig; + const X509_ALGOR *sig_alg; + const ASN1_BIT_STRING *sig; long l; int i; char *p; @@ -45,7 +45,7 @@ int X509_CRL_print(BIO *out, X509_CRL *x) BIO_printf(out, "Certificate Revocation List (CRL):\n"); l = X509_CRL_get_version(x); BIO_printf(out, "%8sVersion %lu (0x%lx)\n", "", l + 1, l); - X509_CRL_get0_signature(&sig, &sig_alg, x); + X509_CRL_get0_signature(x, &sig, &sig_alg); X509_signature_print(out, sig_alg, NULL); p = X509_NAME_oneline(X509_CRL_get_issuer(x), NULL, 0); BIO_printf(out, "%8sIssuer: %s\n", "", p); diff --git a/crypto/x509/t_x509.c b/crypto/x509/t_x509.c index c96ada82a9..9fec3ed99b 100644 --- a/crypto/x509/t_x509.c +++ b/crypto/x509/t_x509.c @@ -287,7 +287,8 @@ int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent) return 1; } -int X509_signature_print(BIO *bp, X509_ALGOR *sigalg, ASN1_STRING *sig) +int X509_signature_print(BIO *bp, const X509_ALGOR *sigalg, + const ASN1_STRING *sig) { int sig_nid; if (BIO_puts(bp, " Signature Algorithm: ") <= 0) diff --git a/crypto/x509/x509cset.c b/crypto/x509/x509cset.c index 1498054c09..e33caf729a 100644 --- a/crypto/x509/x509cset.c +++ b/crypto/x509/x509cset.c @@ -115,7 +115,7 @@ X509_NAME *X509_CRL_get_issuer(const X509_CRL *crl) return crl->crl.issuer; } -STACK_OF(X509_EXTENSION) *X509_CRL_get0_extensions(X509_CRL *crl) +const STACK_OF(X509_EXTENSION) *X509_CRL_get0_extensions(const X509_CRL *crl) { return crl->crl.extensions; } @@ -125,8 +125,8 @@ STACK_OF(X509_REVOKED) *X509_CRL_get_REVOKED(X509_CRL *crl) return crl->crl.revoked; } -void X509_CRL_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg, - X509_CRL *crl) +void X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig, + const X509_ALGOR **palg) { if (psig != NULL) *psig = &crl->signature; |