Constify ASN1_buf_print
authorFdaSilvaYY <fdasilvayy@gmail.com>
Thu, 7 Jul 2016 22:43:15 +0000 (00:43 +0200)
committerRich Salz <rsalz@openssl.org>
Mon, 25 Jul 2016 12:20:00 +0000 (08:20 -0400)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1300)

crypto/asn1/t_pkey.c
include/openssl/asn1.h

index 7a570ee823980fbabc16014474d9207b350a1941..3b2c9df8917f465f5a8ea9ce345d647946f12124 100644 (file)
@@ -18,7 +18,7 @@
 /* Maximum indent */
 #define ASN1_PRINT_MAX_INDENT 128
 
-int ASN1_buf_print(BIO *bp, unsigned char *buf, size_t buflen, int indent)
+int ASN1_buf_print(BIO *bp, const unsigned char *buf, size_t buflen, int indent)
 {
     size_t i;
 
index f1c00587a7582696772f7ab3145553c700b2e0c1..03fc21e7d56a53eabb5176a65fe33eb1fdd6883a 100644 (file)
@@ -752,7 +752,7 @@ int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);
 int ASN1_TIME_print(BIO *fp, const ASN1_TIME *a);
 int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v);
 int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags);
-int ASN1_buf_print(BIO *bp, unsigned char *buf, size_t buflen, int off);
+int ASN1_buf_print(BIO *bp, const unsigned char *buf, size_t buflen, int off);
 int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
                   unsigned char *buf, int off);
 int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent);