From: FdaSilvaYY Date: Sat, 14 May 2016 06:58:28 +0000 (+0200) Subject: Constify X509_OBJECT_get_type & X509_OBJECT_get0_X509 X-Git-Tag: OpenSSL_1_1_0-pre6~552 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7d7da288b81aea19622ea1820722ce869fbe0364;p=oweals%2Fopenssl.git Constify X509_OBJECT_get_type & X509_OBJECT_get0_X509 Reviewed-by: Matt Caswell Reviewed-by: Kurt Roeckx Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/1074) --- diff --git a/crypto/x509/x509_lu.c b/crypto/x509/x509_lu.c index ea7f4714e0..0b5b5b9ed7 100644 --- a/crypto/x509/x509_lu.c +++ b/crypto/x509/x509_lu.c @@ -370,7 +370,7 @@ int X509_OBJECT_up_ref_count(X509_OBJECT *a) return 1; } -X509 *X509_OBJECT_get0_X509(X509_OBJECT *a) +X509 *X509_OBJECT_get0_X509(const X509_OBJECT *a) { if (a == NULL || a->type != X509_LU_X509) return NULL; @@ -384,7 +384,7 @@ X509_CRL *X509_OBJECT_get0_X509_CRL(X509_OBJECT *a) return a->data.crl; } -int X509_OBJECT_get_type(X509_OBJECT *a) +int X509_OBJECT_get_type(const X509_OBJECT *a) { return a->type; } diff --git a/include/openssl/x509_vfy.h b/include/openssl/x509_vfy.h index 3adfaa3f2a..f012265573 100644 --- a/include/openssl/x509_vfy.h +++ b/include/openssl/x509_vfy.h @@ -238,8 +238,8 @@ X509_OBJECT *X509_OBJECT_retrieve_match(STACK_OF(X509_OBJECT) *h, int X509_OBJECT_up_ref_count(X509_OBJECT *a); X509_OBJECT *X509_OBJECT_new(void); void X509_OBJECT_free(X509_OBJECT *a); -int X509_OBJECT_get_type(X509_OBJECT *a); -X509 *X509_OBJECT_get0_X509(X509_OBJECT *a); +int X509_OBJECT_get_type(const X509_OBJECT *a); +X509 *X509_OBJECT_get0_X509(const X509_OBJECT *a); X509_CRL *X509_OBJECT_get0_X509_CRL(X509_OBJECT *a); X509_STORE *X509_STORE_new(void); void X509_STORE_free(X509_STORE *v);