From 333ed02c8a912f7c8b7dcf7ea8f1ff10e7a006c0 Mon Sep 17 00:00:00 2001 From: FdaSilvaYY Date: Fri, 8 Jul 2016 00:10:29 +0200 Subject: Constify input parameters of methods : - X509_NAME_entry_count, X509_ATTRIBUTE_count - X509_NAME_add_entry_by_OBJ, X509_NAME_ENTRY_create_by_OBJ, X509_NAME_ENTRY_set_object Reviewed-by: Matt Caswell Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/1300) --- crypto/x509/x509name.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crypto/x509/x509name.c') diff --git a/crypto/x509/x509name.c b/crypto/x509/x509name.c index 6cd22b4aa7..cf702a5b7c 100644 --- a/crypto/x509/x509name.c +++ b/crypto/x509/x509name.c @@ -44,7 +44,7 @@ int X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, char *buf, return (i); } -int X509_NAME_entry_count(X509_NAME *name) +int X509_NAME_entry_count(const X509_NAME *name) { if (name == NULL) return (0); @@ -130,7 +130,7 @@ X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc) return (ret); } -int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type, +int X509_NAME_add_entry_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj, int type, unsigned char *bytes, int len, int loc, int set) { @@ -270,7 +270,7 @@ X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, } X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, - ASN1_OBJECT *obj, int type, + const ASN1_OBJECT *obj, int type, const unsigned char *bytes, int len) { @@ -296,7 +296,7 @@ X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, return (NULL); } -int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj) +int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, const ASN1_OBJECT *obj) { if ((ne == NULL) || (obj == NULL)) { X509err(X509_F_X509_NAME_ENTRY_SET_OBJECT, -- cgit v1.2.3