summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2018-02-14 16:46:04 +0000
committerjsing <>2018-02-14 16:46:04 +0000
commitc865544aa0c94bd5b8fa9f689148c1ee561270f0 (patch)
tree7b09db392dd2284fac090bffa0de2c6327097fa1 /src
parenta841f3159cebe1cb93dc24fb368b0b614c07563e (diff)
downloadopenbsd-c865544aa0c94bd5b8fa9f689148c1ee561270f0.tar.gz
openbsd-c865544aa0c94bd5b8fa9f689148c1ee561270f0.tar.bz2
openbsd-c865544aa0c94bd5b8fa9f689148c1ee561270f0.zip
Provide ASN1_STRING_get0_data().
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/Symbols.list1
-rw-r--r--src/lib/libcrypto/asn1/asn1.h5
-rw-r--r--src/lib/libcrypto/asn1/asn1_lib.c8
3 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list
index 1cafdf06b4..276c61b3a4 100644
--- a/src/lib/libcrypto/Symbols.list
+++ b/src/lib/libcrypto/Symbols.list
@@ -104,6 +104,7 @@ ASN1_STRING_copy
104ASN1_STRING_data 104ASN1_STRING_data
105ASN1_STRING_dup 105ASN1_STRING_dup
106ASN1_STRING_free 106ASN1_STRING_free
107ASN1_STRING_get0_data
107ASN1_STRING_get_default_mask 108ASN1_STRING_get_default_mask
108ASN1_STRING_length 109ASN1_STRING_length
109ASN1_STRING_length_set 110ASN1_STRING_length_set
diff --git a/src/lib/libcrypto/asn1/asn1.h b/src/lib/libcrypto/asn1/asn1.h
index da16d5c529..6fc4cd7527 100644
--- a/src/lib/libcrypto/asn1/asn1.h
+++ b/src/lib/libcrypto/asn1/asn1.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1.h,v 1.43 2017/05/06 17:12:59 beck Exp $ */ 1/* $OpenBSD: asn1.h,v 1.44 2018/02/14 16:46:04 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -784,7 +784,8 @@ void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len);
784int ASN1_STRING_length(const ASN1_STRING *x); 784int ASN1_STRING_length(const ASN1_STRING *x);
785void ASN1_STRING_length_set(ASN1_STRING *x, int n); 785void ASN1_STRING_length_set(ASN1_STRING *x, int n);
786int ASN1_STRING_type(ASN1_STRING *x); 786int ASN1_STRING_type(ASN1_STRING *x);
787unsigned char * ASN1_STRING_data(ASN1_STRING *x); 787unsigned char *ASN1_STRING_data(ASN1_STRING *x);
788const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *x);
788 789
789ASN1_BIT_STRING *ASN1_BIT_STRING_new(void); 790ASN1_BIT_STRING *ASN1_BIT_STRING_new(void);
790void ASN1_BIT_STRING_free(ASN1_BIT_STRING *a); 791void ASN1_BIT_STRING_free(ASN1_BIT_STRING *a);
diff --git a/src/lib/libcrypto/asn1/asn1_lib.c b/src/lib/libcrypto/asn1/asn1_lib.c
index 852644a781..970102c213 100644
--- a/src/lib/libcrypto/asn1/asn1_lib.c
+++ b/src/lib/libcrypto/asn1/asn1_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1_lib.c,v 1.39 2017/05/02 03:59:44 deraadt Exp $ */ 1/* $OpenBSD: asn1_lib.c,v 1.40 2018/02/14 16:46:04 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -484,3 +484,9 @@ ASN1_STRING_data(ASN1_STRING *x)
484{ 484{
485 return (x->data); 485 return (x->data);
486} 486}
487
488const unsigned char *
489ASN1_STRING_get0_data(const ASN1_STRING *x)
490{
491 return (x->data);
492}