From b57b8995befab5a960cda55abaa2c8eeb444dd0a Mon Sep 17 00:00:00 2001 From: tb <> Date: Fri, 28 Jul 2023 09:58:30 +0000 Subject: Make ASN.1 BIO internal With every bump we can remove a bit more of the ASN.1 BIO and the streaming interface. At some point enough will be internal so that we can rewrite it and bring it in a shape where mere mortals can follow all the twists and turns. This is the next step: BIO_f_asn1(3) goes away and takes BIO_asn1_{get,set}_{prefix,suffix}() with it, a bunch of functions helping along in a write-after-free recently. The getters go away, the setters stay for now. ok jsing --- src/lib/libcrypto/bio/bio.h | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src/lib/libcrypto/bio') diff --git a/src/lib/libcrypto/bio/bio.h b/src/lib/libcrypto/bio/bio.h index 124690b1ee..8450780f69 100644 --- a/src/lib/libcrypto/bio/bio.h +++ b/src/lib/libcrypto/bio/bio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bio.h,v 1.58 2023/07/05 19:25:01 tb Exp $ */ +/* $OpenBSD: bio.h,v 1.59 2023/07/28 09:58:30 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -371,11 +371,6 @@ int BIO_meth_set_callback_ctrl(BIO_METHOD *biom, #define BIO_C_RESET_READ_REQUEST 147 #define BIO_C_SET_MD_CTX 148 -#define BIO_C_SET_PREFIX 149 -#define BIO_C_GET_PREFIX 150 -#define BIO_C_SET_SUFFIX 151 -#define BIO_C_GET_SUFFIX 152 - #define BIO_C_SET_EX_ARG 153 #define BIO_C_GET_EX_ARG 154 @@ -535,16 +530,6 @@ CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); unsigned long BIO_number_read(BIO *bio); unsigned long BIO_number_written(BIO *bio); -/* For BIO_f_asn1() */ -int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix, -asn1_ps_func *prefix_free); -int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix, -asn1_ps_func **pprefix_free); -int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix, -asn1_ps_func *suffix_free); -int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix, -asn1_ps_func **psuffix_free); - int BIO_get_new_index(void); const BIO_METHOD *BIO_s_file(void); BIO *BIO_new_file(const char *filename, const char *mode); -- cgit v1.2.3-55-g6feb