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 /crypto/x509 | |
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 'crypto/x509')
-rw-r--r-- | crypto/x509/x509_cmp.c | 6 | ||||
-rw-r--r-- | crypto/x509/x509_set.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/crypto/x509/x509_cmp.c b/crypto/x509/x509_cmp.c index 191a8b051f..dffc8e241b 100644 --- a/crypto/x509/x509_cmp.c +++ b/crypto/x509/x509_cmp.c @@ -80,7 +80,7 @@ int X509_CRL_match(const X509_CRL *a, const X509_CRL *b) return memcmp(a->sha1_hash, b->sha1_hash, 20); } -X509_NAME *X509_get_issuer_name(X509 *a) +X509_NAME *X509_get_issuer_name(const X509 *a) { return (a->cert_info.issuer); } @@ -97,12 +97,12 @@ unsigned long X509_issuer_name_hash_old(X509 *x) } #endif -X509_NAME *X509_get_subject_name(X509 *a) +X509_NAME *X509_get_subject_name(const X509 *a) { return (a->cert_info.subject); } -ASN1_INTEGER *X509_get_serialNumber(X509 *a) +const ASN1_INTEGER *X509_get_serialNumber(const X509 *a) { return &a->cert_info.serialNumber; } diff --git a/crypto/x509/x509_set.c b/crypto/x509/x509_set.c index 6addfbe72e..ecf5f04f20 100644 --- a/crypto/x509/x509_set.c +++ b/crypto/x509/x509_set.c @@ -110,17 +110,17 @@ int X509_up_ref(X509 *x) return ((i > 1) ? 1 : 0); } -long X509_get_version(X509 *x) +long X509_get_version(const X509 *x) { return ASN1_INTEGER_get(x->cert_info.version); } -ASN1_TIME * X509_get_notBefore(X509 *x) +ASN1_TIME * X509_get_notBefore(const X509 *x) { return x->cert_info.validity.notBefore; } -ASN1_TIME *X509_get_notAfter(X509 *x) +ASN1_TIME *X509_get_notAfter(const X509 *x) { return x->cert_info.validity.notAfter; } |