diff options
author | tb <> | 2023-04-25 19:08:30 +0000 |
---|---|---|
committer | tb <> | 2023-04-25 19:08:30 +0000 |
commit | 67debf20de785e46126aa900cfe4c5d7fd9ca7d8 (patch) | |
tree | 2fe58f7a7b2748b48eeafe260a4331a19642f102 /src/lib | |
parent | 53c813a50e9d2ac606f35b1db747f11077d6fa5a (diff) | |
download | openbsd-67debf20de785e46126aa900cfe4c5d7fd9ca7d8.tar.gz openbsd-67debf20de785e46126aa900cfe4c5d7fd9ca7d8.tar.bz2 openbsd-67debf20de785e46126aa900cfe4c5d7fd9ca7d8.zip |
Move low level BIO_new_NDEF API to internal-only
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/asn1/asn1.h | 18 | ||||
-rw-r--r-- | src/lib/libcrypto/asn1/asn1_local.h | 15 | ||||
-rw-r--r-- | src/lib/libcrypto/asn1/bio_ndef.c | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/cms/cms_io.c | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/pkcs7/bio_pk7.c | 8 | ||||
-rw-r--r-- | src/lib/libcrypto/pkcs7/pk7_mime.c | 4 |
6 files changed, 29 insertions, 25 deletions
diff --git a/src/lib/libcrypto/asn1/asn1.h b/src/lib/libcrypto/asn1/asn1.h index 8b224c1535..5be4668be0 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.75 2023/04/24 22:12:28 tb Exp $ */ | 1 | /* $OpenBSD: asn1.h,v 1.76 2023/04/25 19:08: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 | * |
@@ -881,10 +881,6 @@ ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in, | |||
881 | long len, const ASN1_ITEM *it); | 881 | long len, const ASN1_ITEM *it); |
882 | int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it); | 882 | int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it); |
883 | 883 | ||
884 | #if !defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_VERSION_NUMBER) | ||
885 | int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it); | ||
886 | #endif | ||
887 | |||
888 | void ASN1_add_oid_module(void); | 884 | void ASN1_add_oid_module(void); |
889 | 885 | ||
890 | ASN1_TYPE *ASN1_generate_nconf(const char *str, CONF *nconf); | 886 | ASN1_TYPE *ASN1_generate_nconf(const char *str, CONF *nconf); |
@@ -928,18 +924,6 @@ void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags); | |||
928 | 924 | ||
929 | const BIO_METHOD *BIO_f_asn1(void); | 925 | const BIO_METHOD *BIO_f_asn1(void); |
930 | 926 | ||
931 | #if !defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_INTERNAL) | ||
932 | BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it); | ||
933 | |||
934 | int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags, | ||
935 | const ASN1_ITEM *it); | ||
936 | int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags, | ||
937 | const char *hdr, const ASN1_ITEM *it); | ||
938 | int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags, | ||
939 | int ctype_nid, int econt_nid, STACK_OF(X509_ALGOR) *mdalgs, | ||
940 | const ASN1_ITEM *it); | ||
941 | ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it); | ||
942 | #endif | ||
943 | int SMIME_crlf_copy(BIO *in, BIO *out, int flags); | 927 | int SMIME_crlf_copy(BIO *in, BIO *out, int flags); |
944 | int SMIME_text(BIO *in, BIO *out); | 928 | int SMIME_text(BIO *in, BIO *out); |
945 | 929 | ||
diff --git a/src/lib/libcrypto/asn1/asn1_local.h b/src/lib/libcrypto/asn1/asn1_local.h index ed40e18ec9..52b8a46aeb 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.1 2022/11/26 16:08:50 tb Exp $ */ | 1 | /* $OpenBSD: asn1_local.h,v 1.2 2023/04/25 19:08: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 | */ |
@@ -248,4 +248,17 @@ int OPENSSL_gmtime_diff(int *pday, int *psec, const struct tm *from, | |||
248 | int asn1_time_time_t_to_tm(const time_t *time, struct tm *out_tm); | 248 | int asn1_time_time_t_to_tm(const time_t *time, struct tm *out_tm); |
249 | int asn1_time_tm_to_time_t(const struct tm *tm, time_t *out); | 249 | int asn1_time_tm_to_time_t(const struct tm *tm, time_t *out); |
250 | 250 | ||
251 | int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it); | ||
252 | |||
253 | BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it); | ||
254 | |||
255 | int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags, | ||
256 | const ASN1_ITEM *it); | ||
257 | int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags, | ||
258 | const char *hdr, const ASN1_ITEM *it); | ||
259 | int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags, | ||
260 | int ctype_nid, int econt_nid, STACK_OF(X509_ALGOR) *mdalgs, | ||
261 | const ASN1_ITEM *it); | ||
262 | ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it); | ||
263 | |||
251 | __END_HIDDEN_DECLS | 264 | __END_HIDDEN_DECLS |
diff --git a/src/lib/libcrypto/asn1/bio_ndef.c b/src/lib/libcrypto/asn1/bio_ndef.c index 2aa323a898..d0329ede8f 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.21 2023/03/30 14:23:50 tb Exp $ */ | 1 | /* $OpenBSD: bio_ndef.c,v 1.22 2023/04/25 19:08: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 | */ |
@@ -52,12 +52,14 @@ | |||
52 | * | 52 | * |
53 | */ | 53 | */ |
54 | 54 | ||
55 | #include <stdio.h> | ||
56 | |||
55 | #include <openssl/asn1.h> | 57 | #include <openssl/asn1.h> |
56 | #include <openssl/asn1t.h> | 58 | #include <openssl/asn1t.h> |
57 | #include <openssl/bio.h> | 59 | #include <openssl/bio.h> |
58 | #include <openssl/err.h> | 60 | #include <openssl/err.h> |
59 | 61 | ||
60 | #include <stdio.h> | 62 | #include "asn1_local.h" |
61 | 63 | ||
62 | /* Experimental NDEF ASN1 BIO support routines */ | 64 | /* Experimental NDEF ASN1 BIO support routines */ |
63 | 65 | ||
diff --git a/src/lib/libcrypto/cms/cms_io.c b/src/lib/libcrypto/cms/cms_io.c index 685bf6ad7e..ef1bc4bc4d 100644 --- a/src/lib/libcrypto/cms/cms_io.c +++ b/src/lib/libcrypto/cms/cms_io.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cms_io.c,v 1.17 2023/04/21 20:36:07 tb Exp $ */ | 1 | /* $OpenBSD: cms_io.c,v 1.18 2023/04/25 19:08:30 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
4 | * project. | 4 | * project. |
@@ -58,6 +58,7 @@ | |||
58 | #include <openssl/pem.h> | 58 | #include <openssl/pem.h> |
59 | #include <openssl/x509.h> | 59 | #include <openssl/x509.h> |
60 | 60 | ||
61 | #include "asn1_local.h" | ||
61 | #include "cms_local.h" | 62 | #include "cms_local.h" |
62 | 63 | ||
63 | int | 64 | int |
diff --git a/src/lib/libcrypto/pkcs7/bio_pk7.c b/src/lib/libcrypto/pkcs7/bio_pk7.c index 83cf70fd87..e452293f7f 100644 --- a/src/lib/libcrypto/pkcs7/bio_pk7.c +++ b/src/lib/libcrypto/pkcs7/bio_pk7.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bio_pk7.c,v 1.7 2023/02/16 08:38:17 tb Exp $ */ | 1 | /* $OpenBSD: bio_pk7.c,v 1.8 2023/04/25 19:08: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 | */ |
@@ -52,11 +52,13 @@ | |||
52 | * | 52 | * |
53 | */ | 53 | */ |
54 | 54 | ||
55 | #include <stdio.h> | ||
56 | |||
55 | #include <openssl/asn1.h> | 57 | #include <openssl/asn1.h> |
56 | #include <openssl/pkcs7.h> | ||
57 | #include <openssl/bio.h> | 58 | #include <openssl/bio.h> |
59 | #include <openssl/pkcs7.h> | ||
58 | 60 | ||
59 | #include <stdio.h> | 61 | #include "asn1_local.h" |
60 | 62 | ||
61 | /* Streaming encode support for PKCS#7 */ | 63 | /* Streaming encode support for PKCS#7 */ |
62 | BIO * | 64 | BIO * |
diff --git a/src/lib/libcrypto/pkcs7/pk7_mime.c b/src/lib/libcrypto/pkcs7/pk7_mime.c index d5bc031e69..cd723d71f5 100644 --- a/src/lib/libcrypto/pkcs7/pk7_mime.c +++ b/src/lib/libcrypto/pkcs7/pk7_mime.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: pk7_mime.c,v 1.15 2023/02/16 08:38:17 tb Exp $ */ | 1 | /* $OpenBSD: pk7_mime.c,v 1.16 2023/04/25 19:08: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 | */ |
@@ -58,6 +58,8 @@ | |||
58 | #include <openssl/asn1.h> | 58 | #include <openssl/asn1.h> |
59 | #include <openssl/x509.h> | 59 | #include <openssl/x509.h> |
60 | 60 | ||
61 | #include "asn1_local.h" | ||
62 | |||
61 | /* PKCS#7 wrappers round generalised stream and MIME routines */ | 63 | /* PKCS#7 wrappers round generalised stream and MIME routines */ |
62 | 64 | ||
63 | int | 65 | int |