From: tb Date: Tue, 17 May 2022 09:17:20 +0000 (+0000) Subject: Expose asn1_abs_set_unused_bits() in asn1_locl.h X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9cd16882fd70cf8413bfefd4ca235a103783e620;p=openbsd Expose asn1_abs_set_unused_bits() in asn1_locl.h Should have been part of a previous commit. ok jsing --- diff --git a/lib/libcrypto/asn1/a_bitstr.c b/lib/libcrypto/asn1/a_bitstr.c index aa854f1d7a5..c30b8f5b65e 100644 --- a/lib/libcrypto/asn1/a_bitstr.c +++ b/lib/libcrypto/asn1/a_bitstr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: a_bitstr.c,v 1.35 2022/04/26 20:00:18 jsing Exp $ */ +/* $OpenBSD: a_bitstr.c,v 1.36 2022/05/17 09:17:20 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -92,7 +92,7 @@ asn1_abs_clear_unused_bits(ASN1_BIT_STRING *abs) abs->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT | 0x07); } -static int +int asn1_abs_set_unused_bits(ASN1_BIT_STRING *abs, uint8_t unused_bits) { if (unused_bits > 7) diff --git a/lib/libcrypto/asn1/asn1_locl.h b/lib/libcrypto/asn1/asn1_locl.h index eaf2c1af66b..db456c8ff27 100644 --- a/lib/libcrypto/asn1/asn1_locl.h +++ b/lib/libcrypto/asn1/asn1_locl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1_locl.h,v 1.31 2022/05/12 19:55:58 jsing Exp $ */ +/* $OpenBSD: asn1_locl.h,v 1.32 2022/05/17 09:17:20 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -205,6 +205,7 @@ int asn1_get_primitive(CBS *cbs, int der_mode, uint32_t *out_tag_number, int asn1_tag2charwidth(int tag); +int asn1_abs_set_unused_bits(ASN1_BIT_STRING *abs, uint8_t unused_bits); int c2i_ASN1_BIT_STRING_cbs(ASN1_BIT_STRING **out_abs, CBS *cbs); int c2i_ASN1_INTEGER_cbs(ASN1_INTEGER **out_aint, CBS *cbs);