From 7d7da288b81aea19622ea1820722ce869fbe0364 Mon Sep 17 00:00:00 2001 From: FdaSilvaYY Date: Sat, 14 May 2016 08:58:28 +0200 Subject: [PATCH] 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) --- crypto/x509/x509_lu.c | 4 ++-- include/openssl/x509_vfy.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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); -- 2.25.1