summaryrefslogtreecommitdiff
path: root/src/lib/libssl/bytestring.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/bytestring.h')
-rw-r--r--src/lib/libssl/bytestring.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/lib/libssl/bytestring.h b/src/lib/libssl/bytestring.h
index b98c930da5..d66ab65b91 100644
--- a/src/lib/libssl/bytestring.h
+++ b/src/lib/libssl/bytestring.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: bytestring.h,v 1.6 2015/06/13 09:02:45 doug Exp $ */ 1/* $OpenBSD: bytestring.h,v 1.7 2015/06/15 07:35:49 doug Exp $ */
2/* 2/*
3 * Copyright (c) 2014, Google Inc. 3 * Copyright (c) 2014, Google Inc.
4 * 4 *
@@ -223,9 +223,8 @@ int CBS_peek_asn1_tag(const CBS *cbs, unsigned tag_value);
223/* 223/*
224 * CBS_get_any_asn1_element sets |*out| to contain the next ASN.1 element from 224 * CBS_get_any_asn1_element sets |*out| to contain the next ASN.1 element from
225 * |*cbs| (including header bytes) and advances |*cbs|. It sets |*out_tag| to 225 * |*cbs| (including header bytes) and advances |*cbs|. It sets |*out_tag| to
226 * the tag number and |*out_header_len| to the length of the ASN.1 header. If 226 * the tag number and |*out_header_len| to the length of the ASN.1 header.
227 * the element has indefinite length then |*out| will only contain the 227 * Each of |out|, |out_tag|, and |out_header_len| may be NULL to ignore
228 * header. Each of |out|, |out_tag|, and |out_header_len| may be NULL to ignore
229 * the value. 228 * the value.
230 * 229 *
231 * Tag numbers greater than 30 are not supported (i.e. short form only). 230 * Tag numbers greater than 30 are not supported (i.e. short form only).
@@ -452,6 +451,19 @@ int CBB_add_asn1_uint64(CBB *cbb, uint64_t value);
452 451
453#ifdef LIBRESSL_INTERNAL 452#ifdef LIBRESSL_INTERNAL
454/* 453/*
454 * CBS_get_any_asn1_element sets |*out| to contain the next ASN.1 element from
455 * |*cbs| (including header bytes) and advances |*cbs|. It sets |*out_tag| to
456 * the tag number and |*out_header_len| to the length of the ASN.1 header. If
457 * strict mode is disabled and the element has indefinite length then |*out|
458 * will only contain the header. Each of |out|, |out_tag|, and
459 * |out_header_len| may be NULL to ignore the value.
460 *
461 * Tag numbers greater than 30 are not supported (i.e. short form only).
462 */
463int cbs_get_any_asn1_element_internal(CBS *cbs, CBS *out, unsigned *out_tag,
464 size_t *out_header_len, int strict);
465
466/*
455 * CBS_asn1_ber_to_der reads an ASN.1 structure from |in|. If it finds 467 * CBS_asn1_ber_to_der reads an ASN.1 structure from |in|. If it finds
456 * indefinite-length elements then it attempts to convert the BER data to DER 468 * indefinite-length elements then it attempts to convert the BER data to DER
457 * and sets |*out| and |*out_length| to describe a malloced buffer containing 469 * and sets |*out| and |*out_length| to describe a malloced buffer containing