summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/Symbols.list5
-rw-r--r--src/lib/libcrypto/Symbols.namespace5
-rw-r--r--src/lib/libcrypto/asn1/asn1.h4
-rw-r--r--src/lib/libcrypto/asn1/asn1_local.h4
-rw-r--r--src/lib/libcrypto/asn1/bio_asn1.c50
-rw-r--r--src/lib/libcrypto/asn1/bio_ndef.c5
-rw-r--r--src/lib/libcrypto/bio/bio.h17
-rw-r--r--src/lib/libcrypto/hidden/openssl/asn1.h3
-rw-r--r--src/lib/libcrypto/hidden/openssl/bio.h6
9 files changed, 15 insertions, 84 deletions
diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list
index d0484a5d4c..7dabfa1188 100644
--- a/src/lib/libcrypto/Symbols.list
+++ b/src/lib/libcrypto/Symbols.list
@@ -253,10 +253,6 @@ BIGNUM_it
253BIO_CONNECT_free 253BIO_CONNECT_free
254BIO_CONNECT_new 254BIO_CONNECT_new
255BIO_accept 255BIO_accept
256BIO_asn1_get_prefix
257BIO_asn1_get_suffix
258BIO_asn1_set_prefix
259BIO_asn1_set_suffix
260BIO_callback_ctrl 256BIO_callback_ctrl
261BIO_clear_flags 257BIO_clear_flags
262BIO_copy_next_retry 258BIO_copy_next_retry
@@ -275,7 +271,6 @@ BIO_dump_indent
275BIO_dump_indent_cb 271BIO_dump_indent_cb
276BIO_dump_indent_fp 272BIO_dump_indent_fp
277BIO_dup_chain 273BIO_dup_chain
278BIO_f_asn1
279BIO_f_base64 274BIO_f_base64
280BIO_f_buffer 275BIO_f_buffer
281BIO_f_cipher 276BIO_f_cipher
diff --git a/src/lib/libcrypto/Symbols.namespace b/src/lib/libcrypto/Symbols.namespace
index b8ca3539ec..d1afd92c08 100644
--- a/src/lib/libcrypto/Symbols.namespace
+++ b/src/lib/libcrypto/Symbols.namespace
@@ -1120,7 +1120,6 @@ _libre_ASN1_PCTX_get_oid_flags
1120_libre_ASN1_PCTX_set_oid_flags 1120_libre_ASN1_PCTX_set_oid_flags
1121_libre_ASN1_PCTX_get_str_flags 1121_libre_ASN1_PCTX_get_str_flags
1122_libre_ASN1_PCTX_set_str_flags 1122_libre_ASN1_PCTX_set_str_flags
1123_libre_BIO_f_asn1
1124_libre_SMIME_crlf_copy 1123_libre_SMIME_crlf_copy
1125_libre_SMIME_text 1124_libre_SMIME_text
1126_libre_ERR_load_ASN1_strings 1125_libre_ERR_load_ASN1_strings
@@ -1164,10 +1163,6 @@ _libre_BIO_set_ex_data
1164_libre_BIO_get_ex_data 1163_libre_BIO_get_ex_data
1165_libre_BIO_number_read 1164_libre_BIO_number_read
1166_libre_BIO_number_written 1165_libre_BIO_number_written
1167_libre_BIO_asn1_set_prefix
1168_libre_BIO_asn1_get_prefix
1169_libre_BIO_asn1_set_suffix
1170_libre_BIO_asn1_get_suffix
1171_libre_BIO_get_new_index 1166_libre_BIO_get_new_index
1172_libre_BIO_s_file 1167_libre_BIO_s_file
1173_libre_BIO_new_file 1168_libre_BIO_new_file
diff --git a/src/lib/libcrypto/asn1/asn1.h b/src/lib/libcrypto/asn1/asn1.h
index 5be4668be0..fbc5d098d8 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.76 2023/04/25 19:08:30 tb Exp $ */ 1/* $OpenBSD: asn1.h,v 1.77 2023/07/28 09:58:30 tb 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 *
@@ -922,8 +922,6 @@ void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags);
922unsigned long ASN1_PCTX_get_str_flags(const ASN1_PCTX *p); 922unsigned long ASN1_PCTX_get_str_flags(const ASN1_PCTX *p);
923void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags); 923void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags);
924 924
925const BIO_METHOD *BIO_f_asn1(void);
926
927int SMIME_crlf_copy(BIO *in, BIO *out, int flags); 925int SMIME_crlf_copy(BIO *in, BIO *out, int flags);
928int SMIME_text(BIO *in, BIO *out); 926int SMIME_text(BIO *in, BIO *out);
929 927
diff --git a/src/lib/libcrypto/asn1/asn1_local.h b/src/lib/libcrypto/asn1/asn1_local.h
index 52b8a46aeb..0ef5101fcb 100644
--- a/src/lib/libcrypto/asn1/asn1_local.h
+++ b/src/lib/libcrypto/asn1/asn1_local.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1_local.h,v 1.2 2023/04/25 19:08:30 tb Exp $ */ 1/* $OpenBSD: asn1_local.h,v 1.3 2023/07/28 09:58:30 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -250,6 +250,8 @@ int asn1_time_tm_to_time_t(const struct tm *tm, time_t *out);
250 250
251int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it); 251int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
252 252
253const BIO_METHOD *BIO_f_asn1(void);
254
253BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it); 255BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
254 256
255int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags, 257int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
diff --git a/src/lib/libcrypto/asn1/bio_asn1.c b/src/lib/libcrypto/asn1/bio_asn1.c
index e544bf9c9c..b9f54cd4ef 100644
--- a/src/lib/libcrypto/asn1/bio_asn1.c
+++ b/src/lib/libcrypto/asn1/bio_asn1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio_asn1.c,v 1.22 2023/07/05 21:23:36 beck Exp $ */ 1/* $OpenBSD: bio_asn1.c,v 1.23 2023/07/28 09:58:30 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
@@ -69,6 +69,9 @@
69 69
70#include "bio_local.h" 70#include "bio_local.h"
71 71
72#define BIO_C_SET_PREFIX 149
73#define BIO_C_SET_SUFFIX 151
74
72/* Must be large enough for biggest tag+length */ 75/* Must be large enough for biggest tag+length */
73#define DEFAULT_ASN1_BUF_SIZE 20 76#define DEFAULT_ASN1_BUF_SIZE 20
74 77
@@ -144,7 +147,6 @@ BIO_f_asn1(void)
144{ 147{
145 return (&methods_asn1); 148 return (&methods_asn1);
146} 149}
147LCRYPTO_ALIAS(BIO_f_asn1);
148 150
149static int 151static int
150asn1_bio_new(BIO *b) 152asn1_bio_new(BIO *b)
@@ -376,24 +378,12 @@ asn1_bio_ctrl(BIO *b, int cmd, long arg1, void *arg2)
376 ctx->prefix_free = ex_func->ex_free_func; 378 ctx->prefix_free = ex_func->ex_free_func;
377 break; 379 break;
378 380
379 case BIO_C_GET_PREFIX:
380 ex_func = arg2;
381 ex_func->ex_func = ctx->prefix;
382 ex_func->ex_free_func = ctx->prefix_free;
383 break;
384
385 case BIO_C_SET_SUFFIX: 381 case BIO_C_SET_SUFFIX:
386 ex_func = arg2; 382 ex_func = arg2;
387 ctx->suffix = ex_func->ex_func; 383 ctx->suffix = ex_func->ex_func;
388 ctx->suffix_free = ex_func->ex_free_func; 384 ctx->suffix_free = ex_func->ex_free_func;
389 break; 385 break;
390 386
391 case BIO_C_GET_SUFFIX:
392 ex_func = arg2;
393 ex_func->ex_func = ctx->suffix;
394 ex_func->ex_free_func = ctx->suffix_free;
395 break;
396
397 case BIO_C_SET_EX_ARG: 387 case BIO_C_SET_EX_ARG:
398 ctx->ex_arg = arg2; 388 ctx->ex_arg = arg2;
399 break; 389 break;
@@ -450,46 +440,14 @@ asn1_bio_set_ex(BIO *b, int cmd, asn1_ps_func *ex_func, asn1_ps_func
450 return BIO_ctrl(b, cmd, 0, &extmp); 440 return BIO_ctrl(b, cmd, 0, &extmp);
451} 441}
452 442
453static int
454asn1_bio_get_ex(BIO *b, int cmd, asn1_ps_func **ex_func,
455 asn1_ps_func **ex_free_func)
456{
457 BIO_ASN1_EX_FUNCS extmp;
458 int ret;
459
460 if ((ret = BIO_ctrl(b, cmd, 0, &extmp)) <= 0)
461 return ret;
462
463 *ex_func = extmp.ex_func;
464 *ex_free_func = extmp.ex_free_func;
465
466 return ret;
467}
468
469int 443int
470BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix, asn1_ps_func *prefix_free) 444BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix, asn1_ps_func *prefix_free)
471{ 445{
472 return asn1_bio_set_ex(b, BIO_C_SET_PREFIX, prefix, prefix_free); 446 return asn1_bio_set_ex(b, BIO_C_SET_PREFIX, prefix, prefix_free);
473} 447}
474LCRYPTO_ALIAS(BIO_asn1_set_prefix);
475
476int
477BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix, asn1_ps_func **pprefix_free)
478{
479 return asn1_bio_get_ex(b, BIO_C_GET_PREFIX, pprefix, pprefix_free);
480}
481LCRYPTO_ALIAS(BIO_asn1_get_prefix);
482 448
483int 449int
484BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix, asn1_ps_func *suffix_free) 450BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix, asn1_ps_func *suffix_free)
485{ 451{
486 return asn1_bio_set_ex(b, BIO_C_SET_SUFFIX, suffix, suffix_free); 452 return asn1_bio_set_ex(b, BIO_C_SET_SUFFIX, suffix, suffix_free);
487} 453}
488LCRYPTO_ALIAS(BIO_asn1_set_suffix);
489
490int
491BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix, asn1_ps_func **psuffix_free)
492{
493 return asn1_bio_get_ex(b, BIO_C_GET_SUFFIX, psuffix, psuffix_free);
494}
495LCRYPTO_ALIAS(BIO_asn1_get_suffix);
diff --git a/src/lib/libcrypto/asn1/bio_ndef.c b/src/lib/libcrypto/asn1/bio_ndef.c
index 11e51edade..98bb1cd197 100644
--- a/src/lib/libcrypto/asn1/bio_ndef.c
+++ b/src/lib/libcrypto/asn1/bio_ndef.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio_ndef.c,v 1.23 2023/07/09 19:22:43 tb Exp $ */ 1/* $OpenBSD: bio_ndef.c,v 1.24 2023/07/28 09:58:30 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
@@ -61,6 +61,9 @@
61 61
62#include "asn1_local.h" 62#include "asn1_local.h"
63 63
64int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix, asn1_ps_func *prefix_free);
65int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix, asn1_ps_func *suffix_free);
66
64/* Experimental NDEF ASN1 BIO support routines */ 67/* Experimental NDEF ASN1 BIO support routines */
65 68
66/* The usage is quite simple, initialize an ASN1 structure, 69/* The usage is quite simple, initialize an ASN1 structure,
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 @@
1/* $OpenBSD: bio.h,v 1.58 2023/07/05 19:25:01 tb Exp $ */ 1/* $OpenBSD: bio.h,v 1.59 2023/07/28 09:58:30 tb 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 *
@@ -371,11 +371,6 @@ int BIO_meth_set_callback_ctrl(BIO_METHOD *biom,
371#define BIO_C_RESET_READ_REQUEST 147 371#define BIO_C_RESET_READ_REQUEST 147
372#define BIO_C_SET_MD_CTX 148 372#define BIO_C_SET_MD_CTX 148
373 373
374#define BIO_C_SET_PREFIX 149
375#define BIO_C_GET_PREFIX 150
376#define BIO_C_SET_SUFFIX 151
377#define BIO_C_GET_SUFFIX 152
378
379#define BIO_C_SET_EX_ARG 153 374#define BIO_C_SET_EX_ARG 153
380#define BIO_C_GET_EX_ARG 154 375#define BIO_C_GET_EX_ARG 154
381 376
@@ -535,16 +530,6 @@ CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
535unsigned long BIO_number_read(BIO *bio); 530unsigned long BIO_number_read(BIO *bio);
536unsigned long BIO_number_written(BIO *bio); 531unsigned long BIO_number_written(BIO *bio);
537 532
538/* For BIO_f_asn1() */
539int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix,
540asn1_ps_func *prefix_free);
541int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix,
542asn1_ps_func **pprefix_free);
543int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,
544asn1_ps_func *suffix_free);
545int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
546asn1_ps_func **psuffix_free);
547
548int BIO_get_new_index(void); 533int BIO_get_new_index(void);
549const BIO_METHOD *BIO_s_file(void); 534const BIO_METHOD *BIO_s_file(void);
550BIO *BIO_new_file(const char *filename, const char *mode); 535BIO *BIO_new_file(const char *filename, const char *mode);
diff --git a/src/lib/libcrypto/hidden/openssl/asn1.h b/src/lib/libcrypto/hidden/openssl/asn1.h
index 7e41ec862c..e3095e0631 100644
--- a/src/lib/libcrypto/hidden/openssl/asn1.h
+++ b/src/lib/libcrypto/hidden/openssl/asn1.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1.h,v 1.2 2023/07/07 19:37:54 beck Exp $ */ 1/* $OpenBSD: asn1.h,v 1.3 2023/07/28 09:58:30 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2023 Bob Beck <beck@openbsd.org> 3 * Copyright (c) 2023 Bob Beck <beck@openbsd.org>
4 * 4 *
@@ -250,7 +250,6 @@ LCRYPTO_USED(ASN1_PCTX_get_oid_flags);
250LCRYPTO_USED(ASN1_PCTX_set_oid_flags); 250LCRYPTO_USED(ASN1_PCTX_set_oid_flags);
251LCRYPTO_USED(ASN1_PCTX_get_str_flags); 251LCRYPTO_USED(ASN1_PCTX_get_str_flags);
252LCRYPTO_USED(ASN1_PCTX_set_str_flags); 252LCRYPTO_USED(ASN1_PCTX_set_str_flags);
253LCRYPTO_USED(BIO_f_asn1);
254LCRYPTO_USED(SMIME_crlf_copy); 253LCRYPTO_USED(SMIME_crlf_copy);
255LCRYPTO_USED(SMIME_text); 254LCRYPTO_USED(SMIME_text);
256LCRYPTO_USED(ERR_load_ASN1_strings); 255LCRYPTO_USED(ERR_load_ASN1_strings);
diff --git a/src/lib/libcrypto/hidden/openssl/bio.h b/src/lib/libcrypto/hidden/openssl/bio.h
index c04a0a447f..46cbdf72fe 100644
--- a/src/lib/libcrypto/hidden/openssl/bio.h
+++ b/src/lib/libcrypto/hidden/openssl/bio.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio.h,v 1.2 2023/07/07 19:37:54 beck Exp $ */ 1/* $OpenBSD: bio.h,v 1.3 2023/07/28 09:58:30 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2023 Bob Beck <beck@openbsd.org> 3 * Copyright (c) 2023 Bob Beck <beck@openbsd.org>
4 * 4 *
@@ -63,10 +63,6 @@ LCRYPTO_USED(BIO_set_ex_data);
63LCRYPTO_USED(BIO_get_ex_data); 63LCRYPTO_USED(BIO_get_ex_data);
64LCRYPTO_USED(BIO_number_read); 64LCRYPTO_USED(BIO_number_read);
65LCRYPTO_USED(BIO_number_written); 65LCRYPTO_USED(BIO_number_written);
66LCRYPTO_USED(BIO_asn1_set_prefix);
67LCRYPTO_USED(BIO_asn1_get_prefix);
68LCRYPTO_USED(BIO_asn1_set_suffix);
69LCRYPTO_USED(BIO_asn1_get_suffix);
70LCRYPTO_USED(BIO_get_new_index); 66LCRYPTO_USED(BIO_get_new_index);
71LCRYPTO_USED(BIO_s_file); 67LCRYPTO_USED(BIO_s_file);
72LCRYPTO_USED(BIO_new_file); 68LCRYPTO_USED(BIO_new_file);