summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorFdaSilvaYY <fdasilvayy@gmail.com>2016-08-19 19:44:10 +0200
committerRichard Levitte <levitte@openssl.org>2016-08-23 11:47:22 +0200
commit0fe9123687096b6ec7c3c4337095c6e4a94e9867 (patch)
tree546bb45ed03bc09a8585977c2af4209b167eaf8b /crypto
parent9f5466b9b86607bb62239873e6be2de1fe9f71fb (diff)
downloadopenssl-new-0fe9123687096b6ec7c3c4337095c6e4a94e9867.tar.gz
Constify a bit X509_NAME_get_entry
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/asn1/a_strex.c4
-rw-r--r--crypto/x509/x509name.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/crypto/asn1/a_strex.c b/crypto/asn1/a_strex.c
index fc9883be2b..9839f5c76e 100644
--- a/crypto/asn1/a_strex.c
+++ b/crypto/asn1/a_strex.c
@@ -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))
diff --git a/crypto/x509/x509name.c b/crypto/x509/x509name.c
index ae39c75e58..919d8c1e7f 100644
--- a/crypto/x509/x509name.c
+++ b/crypto/x509/x509name.c
@@ -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)