BIO_CONNECT_free
BIO_CONNECT_new
BIO_accept
-BIO_asn1_get_prefix
-BIO_asn1_get_suffix
-BIO_asn1_set_prefix
-BIO_asn1_set_suffix
BIO_callback_ctrl
BIO_clear_flags
BIO_copy_next_retry
BIO_dump_indent_cb
BIO_dump_indent_fp
BIO_dup_chain
-BIO_f_asn1
BIO_f_base64
BIO_f_buffer
BIO_f_cipher
_libre_ASN1_PCTX_set_oid_flags
_libre_ASN1_PCTX_get_str_flags
_libre_ASN1_PCTX_set_str_flags
-_libre_BIO_f_asn1
_libre_SMIME_crlf_copy
_libre_SMIME_text
_libre_ERR_load_ASN1_strings
_libre_BIO_get_ex_data
_libre_BIO_number_read
_libre_BIO_number_written
-_libre_BIO_asn1_set_prefix
-_libre_BIO_asn1_get_prefix
-_libre_BIO_asn1_set_suffix
-_libre_BIO_asn1_get_suffix
_libre_BIO_get_new_index
_libre_BIO_s_file
_libre_BIO_new_file
-/* $OpenBSD: asn1.h,v 1.76 2023/04/25 19:08:30 tb Exp $ */
+/* $OpenBSD: asn1.h,v 1.77 2023/07/28 09:58:30 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
unsigned long ASN1_PCTX_get_str_flags(const ASN1_PCTX *p);
void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags);
-const BIO_METHOD *BIO_f_asn1(void);
-
int SMIME_crlf_copy(BIO *in, BIO *out, int flags);
int SMIME_text(BIO *in, BIO *out);
-/* $OpenBSD: asn1_local.h,v 1.2 2023/04/25 19:08:30 tb Exp $ */
+/* $OpenBSD: asn1_local.h,v 1.3 2023/07/28 09:58:30 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
+const BIO_METHOD *BIO_f_asn1(void);
+
BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
-/* $OpenBSD: bio_asn1.c,v 1.22 2023/07/05 21:23:36 beck Exp $ */
+/* $OpenBSD: bio_asn1.c,v 1.23 2023/07/28 09:58:30 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
#include "bio_local.h"
+#define BIO_C_SET_PREFIX 149
+#define BIO_C_SET_SUFFIX 151
+
/* Must be large enough for biggest tag+length */
#define DEFAULT_ASN1_BUF_SIZE 20
{
return (&methods_asn1);
}
-LCRYPTO_ALIAS(BIO_f_asn1);
static int
asn1_bio_new(BIO *b)
ctx->prefix_free = ex_func->ex_free_func;
break;
- case BIO_C_GET_PREFIX:
- ex_func = arg2;
- ex_func->ex_func = ctx->prefix;
- ex_func->ex_free_func = ctx->prefix_free;
- break;
-
case BIO_C_SET_SUFFIX:
ex_func = arg2;
ctx->suffix = ex_func->ex_func;
ctx->suffix_free = ex_func->ex_free_func;
break;
- case BIO_C_GET_SUFFIX:
- ex_func = arg2;
- ex_func->ex_func = ctx->suffix;
- ex_func->ex_free_func = ctx->suffix_free;
- break;
-
case BIO_C_SET_EX_ARG:
ctx->ex_arg = arg2;
break;
return BIO_ctrl(b, cmd, 0, &extmp);
}
-static int
-asn1_bio_get_ex(BIO *b, int cmd, asn1_ps_func **ex_func,
- asn1_ps_func **ex_free_func)
-{
- BIO_ASN1_EX_FUNCS extmp;
- int ret;
-
- if ((ret = BIO_ctrl(b, cmd, 0, &extmp)) <= 0)
- return ret;
-
- *ex_func = extmp.ex_func;
- *ex_free_func = extmp.ex_free_func;
-
- return ret;
-}
-
int
BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix, asn1_ps_func *prefix_free)
{
return asn1_bio_set_ex(b, BIO_C_SET_PREFIX, prefix, prefix_free);
}
-LCRYPTO_ALIAS(BIO_asn1_set_prefix);
-
-int
-BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix, asn1_ps_func **pprefix_free)
-{
- return asn1_bio_get_ex(b, BIO_C_GET_PREFIX, pprefix, pprefix_free);
-}
-LCRYPTO_ALIAS(BIO_asn1_get_prefix);
int
BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix, asn1_ps_func *suffix_free)
{
return asn1_bio_set_ex(b, BIO_C_SET_SUFFIX, suffix, suffix_free);
}
-LCRYPTO_ALIAS(BIO_asn1_set_suffix);
-
-int
-BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix, asn1_ps_func **psuffix_free)
-{
- return asn1_bio_get_ex(b, BIO_C_GET_SUFFIX, psuffix, psuffix_free);
-}
-LCRYPTO_ALIAS(BIO_asn1_get_suffix);
-/* $OpenBSD: bio_ndef.c,v 1.23 2023/07/09 19:22:43 tb Exp $ */
+/* $OpenBSD: bio_ndef.c,v 1.24 2023/07/28 09:58:30 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
#include "asn1_local.h"
+int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix, asn1_ps_func *prefix_free);
+int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix, asn1_ps_func *suffix_free);
+
/* Experimental NDEF ASN1 BIO support routines */
/* The usage is quite simple, initialize an ASN1 structure,
-/* $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.
*
#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
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);
-/* $OpenBSD: asn1.h,v 1.2 2023/07/07 19:37:54 beck Exp $ */
+/* $OpenBSD: asn1.h,v 1.3 2023/07/28 09:58:30 tb Exp $ */
/*
* Copyright (c) 2023 Bob Beck <beck@openbsd.org>
*
LCRYPTO_USED(ASN1_PCTX_set_oid_flags);
LCRYPTO_USED(ASN1_PCTX_get_str_flags);
LCRYPTO_USED(ASN1_PCTX_set_str_flags);
-LCRYPTO_USED(BIO_f_asn1);
LCRYPTO_USED(SMIME_crlf_copy);
LCRYPTO_USED(SMIME_text);
LCRYPTO_USED(ERR_load_ASN1_strings);
-/* $OpenBSD: bio.h,v 1.2 2023/07/07 19:37:54 beck Exp $ */
+/* $OpenBSD: bio.h,v 1.3 2023/07/28 09:58:30 tb Exp $ */
/*
* Copyright (c) 2023 Bob Beck <beck@openbsd.org>
*
LCRYPTO_USED(BIO_get_ex_data);
LCRYPTO_USED(BIO_number_read);
LCRYPTO_USED(BIO_number_written);
-LCRYPTO_USED(BIO_asn1_set_prefix);
-LCRYPTO_USED(BIO_asn1_get_prefix);
-LCRYPTO_USED(BIO_asn1_set_suffix);
-LCRYPTO_USED(BIO_asn1_get_suffix);
LCRYPTO_USED(BIO_get_new_index);
LCRYPTO_USED(BIO_s_file);
LCRYPTO_USED(BIO_new_file);