diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-08-18 16:16:31 +0200 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-08-19 13:47:31 +0200 |
commit | 68c12bfc6601d40e85146f36f26fe8ff0472f36b (patch) | |
tree | 4070d574355a2f9b25befbd55bc639aa96e0ab0f /crypto/ocsp | |
parent | constify X509_REQ_get0_signature() (diff) | |
download | openssl-68c12bfc6601d40e85146f36f26fe8ff0472f36b.tar.xz openssl-68c12bfc6601d40e85146f36f26fe8ff0472f36b.zip |
Add X509_get0_serialNumber() and constify OCSP_cert_to_id()
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto/ocsp')
-rw-r--r-- | crypto/ocsp/ocsp_lib.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/crypto/ocsp/ocsp_lib.c b/crypto/ocsp/ocsp_lib.c index 5ff2f318b3..8edd70ac8d 100644 --- a/crypto/ocsp/ocsp_lib.c +++ b/crypto/ocsp/ocsp_lib.c @@ -19,16 +19,17 @@ /* Convert a certificate and its issuer to an OCSP_CERTID */ -OCSP_CERTID *OCSP_cert_to_id(const EVP_MD *dgst, X509 *subject, X509 *issuer) +OCSP_CERTID *OCSP_cert_to_id(const EVP_MD *dgst, const X509 *subject, + const X509 *issuer) { X509_NAME *iname; - ASN1_INTEGER *serial; + const ASN1_INTEGER *serial; ASN1_BIT_STRING *ikey; if (!dgst) dgst = EVP_sha1(); if (subject) { iname = X509_get_issuer_name(subject); - serial = X509_get_serialNumber(subject); + serial = X509_get0_serialNumber(subject); } else { iname = X509_get_subject_name(issuer); serial = NULL; @@ -38,9 +39,9 @@ OCSP_CERTID *OCSP_cert_to_id(const EVP_MD *dgst, X509 *subject, X509 *issuer) } OCSP_CERTID *OCSP_cert_id_new(const EVP_MD *dgst, - X509_NAME *issuerName, - ASN1_BIT_STRING *issuerKey, - ASN1_INTEGER *serialNumber) + const X509_NAME *issuerName, + const ASN1_BIT_STRING *issuerKey, + const ASN1_INTEGER *serialNumber) { int nid; unsigned int i; |