summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2018-11-09 03:42:31 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2018-11-09 03:42:31 +0000
commitc11333a2f588353773a247d6f53b1da797157f80 (patch)
treedc94e4f459f88c8fd49439a4070f633e2d967297
parent2ba835eaacf35b8e06d1677ac643e4b989c752bc (diff)
Add const to the data argument of ASN1_set{,_int}_octetstring().
From Ben L bobsayshilol () live ! co ! uk ok jsing
-rw-r--r--lib/libcrypto/asn1/asn1.h6
-rw-r--r--lib/libcrypto/asn1/evp_asn1.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/libcrypto/asn1/asn1.h b/lib/libcrypto/asn1/asn1.h
index 0852ce2ef1d..f6c6ba8045c 100644
--- a/lib/libcrypto/asn1/asn1.h
+++ b/lib/libcrypto/asn1/asn1.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asn1.h,v 1.51 2018/11/08 18:13:14 jsing Exp $ */
+/* $OpenBSD: asn1.h,v 1.52 2018/11/09 03:42:30 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -899,10 +899,10 @@ extern const ASN1_ITEM NETSCAPE_X509_it;
int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
-int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len);
+int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, const unsigned char *data, int len);
int ASN1_TYPE_get_octetstring(const ASN1_TYPE *a, unsigned char *data,
int max_len);
-int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num, unsigned char *data,
+int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num, const unsigned char *data,
int len);
int ASN1_TYPE_get_int_octetstring(const ASN1_TYPE *a, long *num,
unsigned char *data, int max_len);
diff --git a/lib/libcrypto/asn1/evp_asn1.c b/lib/libcrypto/asn1/evp_asn1.c
index ec635577701..4d616e2b340 100644
--- a/lib/libcrypto/asn1/evp_asn1.c
+++ b/lib/libcrypto/asn1/evp_asn1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: evp_asn1.c,v 1.21 2018/04/25 11:48:21 tb Exp $ */
+/* $OpenBSD: evp_asn1.c,v 1.22 2018/11/09 03:42:30 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -64,7 +64,7 @@
#include <openssl/err.h>
int
-ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len)
+ASN1_TYPE_set_octetstring(ASN1_TYPE *a, const unsigned char *data, int len)
{
ASN1_STRING *os;
@@ -127,7 +127,7 @@ const ASN1_ITEM ASN1_INT_OCTETSTRING_it = {
};
int
-ASN1_TYPE_set_int_octetstring(ASN1_TYPE *at, long num, unsigned char *data,
+ASN1_TYPE_set_int_octetstring(ASN1_TYPE *at, long num, const unsigned char *data,
int len)
{
ASN1_int_octetstring *ios;