Constify i2a*
authorDr. Stephen Henson <steve@openssl.org>
Thu, 18 Aug 2016 15:48:33 +0000 (16:48 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 18 Aug 2016 16:20:36 +0000 (17:20 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/asn1/f_int.c
crypto/asn1/f_string.c
crypto/x509v3/v3_info.c
include/openssl/asn1.h
include/openssl/x509v3.h

index c2034809da657296316e23c5499a53fa32011108..51fc884b5eb5077647106745c5432694ac64ec2b 100644 (file)
@@ -153,7 +153,7 @@ int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size)
     return 0;
 }
 
-int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a)
+int i2a_ASN1_ENUMERATED(BIO *bp, const ASN1_ENUMERATED *a)
 {
     return i2a_ASN1_INTEGER(bp, a);
 }
index 0e03139344bf312e0056a17edf2cbd15cbaa79c1..b9258bba8b62fcb613c4f5fba7041506c05003bd 100644 (file)
@@ -13,7 +13,7 @@
 #include <openssl/buffer.h>
 #include <openssl/asn1.h>
 
-int i2a_ASN1_STRING(BIO *bp, ASN1_STRING *a, int type)
+int i2a_ASN1_STRING(BIO *bp, const ASN1_STRING *a, int type)
 {
     int i, n = 0;
     static const char *h = "0123456789ABCDEF";
index bec8c425b053b7018784d7f94ea9cc68c9dc36bc..61ef2138b7976f68bb2bcabc2545bc9c3491bce3 100644 (file)
@@ -150,7 +150,7 @@ static AUTHORITY_INFO_ACCESS *v2i_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD
     return NULL;
 }
 
-int i2a_ACCESS_DESCRIPTION(BIO *bp, ACCESS_DESCRIPTION *a)
+int i2a_ACCESS_DESCRIPTION(BIO *bp, const ACCESS_DESCRIPTION *a)
 {
     i2a_ASN1_OBJECT(bp, a->method);
     return 2;
index afd3b1c58792359905cf2f018765f43cf1538e3f..0315091652b46626dfe1202654ebeb0f171f6ab5 100644 (file)
@@ -631,11 +631,11 @@ int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
 
 int i2a_ASN1_INTEGER(BIO *bp, const ASN1_INTEGER *a);
 int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size);
-int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a);
+int i2a_ASN1_ENUMERATED(BIO *bp, const ASN1_ENUMERATED *a);
 int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size);
 int i2a_ASN1_OBJECT(BIO *bp, const ASN1_OBJECT *a);
 int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size);
-int i2a_ASN1_STRING(BIO *bp, ASN1_STRING *a, int type);
+int i2a_ASN1_STRING(BIO *bp, const ASN1_STRING *a, int type);
 int i2t_ASN1_OBJECT(char *buf, int buf_len, const ASN1_OBJECT *a);
 
 int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num);
index 5ca76a02770f3d53c3463e39f003666ceffcdfab..c6960f2c9e4528927d67d87699919178b4fac6ef 100644 (file)
@@ -506,7 +506,7 @@ ASN1_OCTET_STRING *s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method,
                                          X509V3_CTX *ctx, char *str);
 
 DECLARE_ASN1_FUNCTIONS(EXTENDED_KEY_USAGE)
-int i2a_ACCESS_DESCRIPTION(BIO *bp, ACCESS_DESCRIPTION *a);
+int i2a_ACCESS_DESCRIPTION(BIO *bp, const ACCESS_DESCRIPTION *a);
 
 DECLARE_ASN1_ALLOC_FUNCTIONS(TLS_FEATURE)