Constify X509_OBJECT_get_type & X509_OBJECT_get0_X509
authorFdaSilvaYY <fdasilvayy@gmail.com>
Sat, 14 May 2016 06:58:28 +0000 (08:58 +0200)
committerRich Salz <rsalz@openssl.org>
Sun, 5 Jun 2016 01:30:41 +0000 (21:30 -0400)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1074)

crypto/x509/x509_lu.c
include/openssl/x509_vfy.h

index ea7f471..0b5b5b9 100644 (file)
@@ -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;
 }
index 3adfaa3..f012265 100644 (file)
@@ -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);