diff options
author | FdaSilvaYY <fdasilvayy@gmail.com> | 2016-07-03 22:09:02 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-07-25 08:20:00 -0400 |
commit | 08275a29c10b23a5f38597d58f823c3ccb9540ab (patch) | |
tree | cbc0d865c0584cd76a060a3ef5ba286f3f20dba4 /crypto/asn1 | |
parent | 0aa25a68c0ce8e8a01de630c121a35a2634ecedc (diff) |
Constify ASN1_TYPE_get, ASN1_STRING_type, ASN1_STRING_to_UTF8, ASN1_TYPE_get_octetstring & co...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1300)
Diffstat (limited to 'crypto/asn1')
-rw-r--r-- | crypto/asn1/a_strex.c | 2 | ||||
-rw-r--r-- | crypto/asn1/a_type.c | 2 | ||||
-rw-r--r-- | crypto/asn1/asn1_lib.c | 2 | ||||
-rw-r--r-- | crypto/asn1/evp_asn1.c | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/crypto/asn1/a_strex.c b/crypto/asn1/a_strex.c index eb55c6b5d7..7bcc6cda8e 100644 --- a/crypto/asn1/a_strex.c +++ b/crypto/asn1/a_strex.c @@ -569,7 +569,7 @@ int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags) * in output string or a negative error code */ -int ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in) +int ASN1_STRING_to_UTF8(unsigned char **out, const ASN1_STRING *in) { ASN1_STRING stmp, *str = &stmp; int mbflag, type, ret; diff --git a/crypto/asn1/a_type.c b/crypto/asn1/a_type.c index 8547513e3a..42dbcbfffc 100644 --- a/crypto/asn1/a_type.c +++ b/crypto/asn1/a_type.c @@ -13,7 +13,7 @@ #include <openssl/objects.h> #include "asn1_locl.h" -int ASN1_TYPE_get(ASN1_TYPE *a) +int ASN1_TYPE_get(const ASN1_TYPE *a) { if ((a->value.ptr != NULL) || (a->type == V_ASN1_NULL)) return (a->type); diff --git a/crypto/asn1/asn1_lib.c b/crypto/asn1/asn1_lib.c index aecb4adb5b..92604ead86 100644 --- a/crypto/asn1/asn1_lib.c +++ b/crypto/asn1/asn1_lib.c @@ -354,7 +354,7 @@ void ASN1_STRING_length_set(ASN1_STRING *x, int len) x->length = len; } -int ASN1_STRING_type(ASN1_STRING *x) +int ASN1_STRING_type(const ASN1_STRING *x) { return x->type; } diff --git a/crypto/asn1/evp_asn1.c b/crypto/asn1/evp_asn1.c index f7416e5550..ad3a5bc7a0 100644 --- a/crypto/asn1/evp_asn1.c +++ b/crypto/asn1/evp_asn1.c @@ -27,7 +27,7 @@ int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len) } /* int max_len: for returned value */ -int ASN1_TYPE_get_octetstring(ASN1_TYPE *a, unsigned char *data, int max_len) +int ASN1_TYPE_get_octetstring(const ASN1_TYPE *a, unsigned char *data, int max_len) { int ret, num; unsigned char *p; @@ -80,7 +80,7 @@ int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num, unsigned char *data, * we return the actual length... */ /* int max_len: for returned value */ -int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a, long *num, +int ASN1_TYPE_get_int_octetstring(const ASN1_TYPE *a, long *num, unsigned char *data, int max_len) { asn1_int_oct *atmp = NULL; |