Constify two internal methods
authorFdaSilvaYY <fdasilvayy@gmail.com>
Fri, 29 Jul 2016 10:51:35 +0000 (12:51 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 4 Aug 2016 15:02:48 +0000 (17:02 +0200)
- append_ia5
- old_entry_print

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
apps/ca.c
crypto/x509v3/v3_utl.c

index 376c8a553b85bc624e7953fd1fe79f6f07bac5d3..80595753629efa8a616eb3a48bc59c17ea2470d5 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -131,7 +131,7 @@ static int do_updatedb(CA_DB *db);
 static int check_time_format(const char *str);
 char *make_revocation_str(int rev_type, char *rev_arg);
 int make_revoked(X509_REVOKED *rev, const char *str);
 static int check_time_format(const char *str);
 char *make_revocation_str(int rev_type, char *rev_arg);
 int make_revoked(X509_REVOKED *rev, const char *str);
-static int old_entry_print(ASN1_OBJECT *obj, ASN1_STRING *str);
+static int old_entry_print(const ASN1_OBJECT *obj, const ASN1_STRING *str);
 
 static CONF *extconf = NULL;
 static int preserve = 0;
 
 static CONF *extconf = NULL;
 static int preserve = 0;
@@ -2412,7 +2412,7 @@ int make_revoked(X509_REVOKED *rev, const char *str)
     return ret;
 }
 
     return ret;
 }
 
-static int old_entry_print(ASN1_OBJECT *obj, ASN1_STRING *str)
+static int old_entry_print(const ASN1_OBJECT *obj, const ASN1_STRING *str)
 {
     char buf[25], *pbuf, *p;
     int j;
 {
     char buf[25], *pbuf, *p;
     int j;
index ed07f7681ba81003885fd81119b98bd358c1dba0..7b18b0166d9d29b3ed649d0b9cd03dab2af4bc44 100644 (file)
@@ -23,7 +23,7 @@ static int sk_strcmp(const char *const *a, const char *const *b);
 static STACK_OF(OPENSSL_STRING) *get_email(X509_NAME *name,
                                            GENERAL_NAMES *gens);
 static void str_free(OPENSSL_STRING str);
 static STACK_OF(OPENSSL_STRING) *get_email(X509_NAME *name,
                                            GENERAL_NAMES *gens);
 static void str_free(OPENSSL_STRING str);
-static int append_ia5(STACK_OF(OPENSSL_STRING) **sk, ASN1_IA5STRING *email);
+static int append_ia5(STACK_OF(OPENSSL_STRING) **sk, const ASN1_IA5STRING *email);
 
 static int ipv4_from_asc(unsigned char *v4, const char *in);
 static int ipv6_from_asc(unsigned char *v6, const char *in);
 
 static int ipv4_from_asc(unsigned char *v4, const char *in);
 static int ipv6_from_asc(unsigned char *v6, const char *in);
@@ -452,7 +452,7 @@ static void str_free(OPENSSL_STRING str)
     OPENSSL_free(str);
 }
 
     OPENSSL_free(str);
 }
 
-static int append_ia5(STACK_OF(OPENSSL_STRING) **sk, ASN1_IA5STRING *email)
+static int append_ia5(STACK_OF(OPENSSL_STRING) **sk, const ASN1_IA5STRING *email)
 {
     char *emtmp;
     /* First some sanity checks */
 {
     char *emtmp;
     /* First some sanity checks */