diff options
Diffstat (limited to 'src/lib/libcrypto/asn1')
-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 |
3 files changed, 19 insertions, 20 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 | ||