From: FdaSilvaYY Date: Thu, 7 Jul 2016 22:43:15 +0000 (+0200) Subject: Constify ASN1_buf_print X-Git-Tag: OpenSSL_1_1_0-pre6~102 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dbf89a9b94b1ad813370577388b5ac692499a51f;p=openssl Constify ASN1_buf_print Reviewed-by: Matt Caswell Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/1300) --- diff --git a/crypto/asn1/t_pkey.c b/crypto/asn1/t_pkey.c index 7a570ee823..3b2c9df891 100644 --- a/crypto/asn1/t_pkey.c +++ b/crypto/asn1/t_pkey.c @@ -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; diff --git a/include/openssl/asn1.h b/include/openssl/asn1.h index f1c00587a7..03fc21e7d5 100644 --- a/include/openssl/asn1.h +++ b/include/openssl/asn1.h @@ -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);