mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
Constify a bit X509_NAME_get_entry
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
parent
9f5466b9b8
commit
0fe9123687
@ -455,9 +455,9 @@ static int do_name_ex(char_io *io_ch, void *arg, const X509_NAME *n,
|
||||
cnt = X509_NAME_entry_count(n);
|
||||
for (i = 0; i < cnt; i++) {
|
||||
if (flags & XN_FLAG_DN_REV)
|
||||
ent = X509_NAME_get_entry((X509_NAME *)n, cnt - i - 1);
|
||||
ent = X509_NAME_get_entry(n, cnt - i - 1);
|
||||
else
|
||||
ent = X509_NAME_get_entry((X509_NAME *)n, i);
|
||||
ent = X509_NAME_get_entry(n, i);
|
||||
if (prev != -1) {
|
||||
if (prev == X509_NAME_ENTRY_set(ent)) {
|
||||
if (!io_ch(arg, sep_mv, sep_mv_len))
|
||||
|
@ -82,7 +82,7 @@ int X509_NAME_get_index_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj, int last
|
||||
return (-1);
|
||||
}
|
||||
|
||||
X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc)
|
||||
X509_NAME_ENTRY *X509_NAME_get_entry(const X509_NAME *name, int loc)
|
||||
{
|
||||
if (name == NULL || sk_X509_NAME_ENTRY_num(name->entries) <= loc
|
||||
|| loc < 0)
|
||||
|
@ -14,7 +14,7 @@ X509_NAME lookup and enumeration functions
|
||||
int X509_NAME_get_index_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj, int lastpos);
|
||||
|
||||
int X509_NAME_entry_count(const X509_NAME *name);
|
||||
X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc);
|
||||
X509_NAME_ENTRY *X509_NAME_get_entry(const X509_NAME *name, int loc);
|
||||
|
||||
int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len);
|
||||
int X509_NAME_get_text_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj, char *buf, int len);
|
||||
|
@ -790,7 +790,7 @@ int X509_NAME_get_text_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj,
|
||||
int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos);
|
||||
int X509_NAME_get_index_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj,
|
||||
int lastpos);
|
||||
X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc);
|
||||
X509_NAME_ENTRY *X509_NAME_get_entry(const X509_NAME *name, int loc);
|
||||
X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc);
|
||||
int X509_NAME_add_entry(X509_NAME *name, const X509_NAME_ENTRY *ne,
|
||||
int loc, int set);
|
||||
|
Loading…
Reference in New Issue
Block a user