diff options
author | tb <> | 2023-04-25 18:57:57 +0000 |
---|---|---|
committer | tb <> | 2023-04-25 18:57:57 +0000 |
commit | e14b6ccb5027834e09c4d8a742214f122daa582f (patch) | |
tree | f89b9cc3a7c8b355737e6404d4d256ced898b03c /src/lib | |
parent | 24d5cbe3c5fc6cd5017106c625dceab937a87a69 (diff) | |
download | openbsd-e14b6ccb5027834e09c4d8a742214f122daa582f.tar.gz openbsd-e14b6ccb5027834e09c4d8a742214f122daa582f.tar.bz2 openbsd-e14b6ccb5027834e09c4d8a742214f122daa582f.zip |
Remove NETSCAPE_CERT_SEQUENCE
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/Makefile | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/asn1/nsseq.c | 129 | ||||
-rw-r--r-- | src/lib/libcrypto/man/PEM_read_bio_PrivateKey.3 | 45 | ||||
-rw-r--r-- | src/lib/libcrypto/x509/x509.h | 18 |
4 files changed, 4 insertions, 191 deletions
diff --git a/src/lib/libcrypto/Makefile b/src/lib/libcrypto/Makefile index d6175dfd5d..8febfcdd4f 100644 --- a/src/lib/libcrypto/Makefile +++ b/src/lib/libcrypto/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.113 2023/04/25 18:48:32 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.114 2023/04/25 18:57:57 tb Exp $ |
2 | 2 | ||
3 | LIB= crypto | 3 | LIB= crypto |
4 | LIBREBUILD=y | 4 | LIBREBUILD=y |
@@ -114,7 +114,6 @@ SRCS+= asn_mime.c | |||
114 | SRCS+= asn_moid.c | 114 | SRCS+= asn_moid.c |
115 | SRCS+= bio_asn1.c | 115 | SRCS+= bio_asn1.c |
116 | SRCS+= bio_ndef.c | 116 | SRCS+= bio_ndef.c |
117 | #SRCS+= nsseq.c | ||
118 | SRCS+= p5_pbe.c | 117 | SRCS+= p5_pbe.c |
119 | SRCS+= p5_pbev2.c | 118 | SRCS+= p5_pbev2.c |
120 | SRCS+= p8_pkey.c | 119 | SRCS+= p8_pkey.c |
diff --git a/src/lib/libcrypto/asn1/nsseq.c b/src/lib/libcrypto/asn1/nsseq.c deleted file mode 100644 index 8b39278692..0000000000 --- a/src/lib/libcrypto/asn1/nsseq.c +++ /dev/null | |||
@@ -1,129 +0,0 @@ | |||
1 | /* $OpenBSD: nsseq.c,v 1.10 2015/02/11 04:00:39 jsing Exp $ */ | ||
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | ||
3 | * project 1999. | ||
4 | */ | ||
5 | /* ==================================================================== | ||
6 | * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. | ||
7 | * | ||
8 | * Redistribution and use in source and binary forms, with or without | ||
9 | * modification, are permitted provided that the following conditions | ||
10 | * are met: | ||
11 | * | ||
12 | * 1. Redistributions of source code must retain the above copyright | ||
13 | * notice, this list of conditions and the following disclaimer. | ||
14 | * | ||
15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
16 | * notice, this list of conditions and the following disclaimer in | ||
17 | * the documentation and/or other materials provided with the | ||
18 | * distribution. | ||
19 | * | ||
20 | * 3. All advertising materials mentioning features or use of this | ||
21 | * software must display the following acknowledgment: | ||
22 | * "This product includes software developed by the OpenSSL Project | ||
23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
24 | * | ||
25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | * endorse or promote products derived from this software without | ||
27 | * prior written permission. For written permission, please contact | ||
28 | * licensing@OpenSSL.org. | ||
29 | * | ||
30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
31 | * nor may "OpenSSL" appear in their names without prior written | ||
32 | * permission of the OpenSSL Project. | ||
33 | * | ||
34 | * 6. Redistributions of any form whatsoever must retain the following | ||
35 | * acknowledgment: | ||
36 | * "This product includes software developed by the OpenSSL Project | ||
37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
38 | * | ||
39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | * ==================================================================== | ||
52 | * | ||
53 | * This product includes cryptographic software written by Eric Young | ||
54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
55 | * Hudson (tjh@cryptsoft.com). | ||
56 | * | ||
57 | */ | ||
58 | |||
59 | #include <stdio.h> | ||
60 | #include <stdlib.h> | ||
61 | #include <openssl/asn1t.h> | ||
62 | #include <openssl/x509.h> | ||
63 | #include <openssl/objects.h> | ||
64 | |||
65 | static int | ||
66 | nsseq_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) | ||
67 | { | ||
68 | if (operation == ASN1_OP_NEW_POST) { | ||
69 | NETSCAPE_CERT_SEQUENCE *nsseq; | ||
70 | nsseq = (NETSCAPE_CERT_SEQUENCE *)*pval; | ||
71 | nsseq->type = OBJ_nid2obj(NID_netscape_cert_sequence); | ||
72 | } | ||
73 | return 1; | ||
74 | } | ||
75 | |||
76 | /* Netscape certificate sequence structure */ | ||
77 | |||
78 | static const ASN1_AUX NETSCAPE_CERT_SEQUENCE_aux = { | ||
79 | .asn1_cb = nsseq_cb, | ||
80 | }; | ||
81 | static const ASN1_TEMPLATE NETSCAPE_CERT_SEQUENCE_seq_tt[] = { | ||
82 | { | ||
83 | .offset = offsetof(NETSCAPE_CERT_SEQUENCE, type), | ||
84 | .field_name = "type", | ||
85 | .item = &ASN1_OBJECT_it, | ||
86 | }, | ||
87 | { | ||
88 | .flags = ASN1_TFLG_EXPLICIT | ASN1_TFLG_SEQUENCE_OF | ASN1_TFLG_OPTIONAL, | ||
89 | .offset = offsetof(NETSCAPE_CERT_SEQUENCE, certs), | ||
90 | .field_name = "certs", | ||
91 | .item = &X509_it, | ||
92 | }, | ||
93 | }; | ||
94 | |||
95 | const ASN1_ITEM NETSCAPE_CERT_SEQUENCE_it = { | ||
96 | .itype = ASN1_ITYPE_SEQUENCE, | ||
97 | .utype = V_ASN1_SEQUENCE, | ||
98 | .templates = NETSCAPE_CERT_SEQUENCE_seq_tt, | ||
99 | .tcount = sizeof(NETSCAPE_CERT_SEQUENCE_seq_tt) / sizeof(ASN1_TEMPLATE), | ||
100 | .funcs = &NETSCAPE_CERT_SEQUENCE_aux, | ||
101 | .size = sizeof(NETSCAPE_CERT_SEQUENCE), | ||
102 | .sname = "NETSCAPE_CERT_SEQUENCE", | ||
103 | }; | ||
104 | |||
105 | |||
106 | NETSCAPE_CERT_SEQUENCE * | ||
107 | d2i_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE **a, const unsigned char **in, long len) | ||
108 | { | ||
109 | return (NETSCAPE_CERT_SEQUENCE *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | ||
110 | &NETSCAPE_CERT_SEQUENCE_it); | ||
111 | } | ||
112 | |||
113 | int | ||
114 | i2d_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE *a, unsigned char **out) | ||
115 | { | ||
116 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &NETSCAPE_CERT_SEQUENCE_it); | ||
117 | } | ||
118 | |||
119 | NETSCAPE_CERT_SEQUENCE * | ||
120 | NETSCAPE_CERT_SEQUENCE_new(void) | ||
121 | { | ||
122 | return (NETSCAPE_CERT_SEQUENCE *)ASN1_item_new(&NETSCAPE_CERT_SEQUENCE_it); | ||
123 | } | ||
124 | |||
125 | void | ||
126 | NETSCAPE_CERT_SEQUENCE_free(NETSCAPE_CERT_SEQUENCE *a) | ||
127 | { | ||
128 | ASN1_item_free((ASN1_VALUE *)a, &NETSCAPE_CERT_SEQUENCE_it); | ||
129 | } | ||
diff --git a/src/lib/libcrypto/man/PEM_read_bio_PrivateKey.3 b/src/lib/libcrypto/man/PEM_read_bio_PrivateKey.3 index b097bbbecc..ab703ddea2 100644 --- a/src/lib/libcrypto/man/PEM_read_bio_PrivateKey.3 +++ b/src/lib/libcrypto/man/PEM_read_bio_PrivateKey.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: PEM_read_bio_PrivateKey.3,v 1.20 2021/07/24 14:33:14 schwarze Exp $ | 1 | .\" $OpenBSD: PEM_read_bio_PrivateKey.3,v 1.21 2023/04/25 18:57:57 tb Exp $ |
2 | .\" full merge up to: | 2 | .\" full merge up to: |
3 | .\" OpenSSL man3/PEM_read_bio_PrivateKey.pod 18bad535 Apr 9 15:13:55 2019 +0100 | 3 | .\" OpenSSL man3/PEM_read_bio_PrivateKey.pod 18bad535 Apr 9 15:13:55 2019 +0100 |
4 | .\" OpenSSL man3/PEM_read_CMS.pod 83cf7abf May 29 13:07:08 2018 +0100 | 4 | .\" OpenSSL man3/PEM_read_CMS.pod 83cf7abf May 29 13:07:08 2018 +0100 |
@@ -51,7 +51,7 @@ | |||
51 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 51 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
52 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 52 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
53 | .\" | 53 | .\" |
54 | .Dd $Mdocdate: July 24 2021 $ | 54 | .Dd $Mdocdate: April 25 2023 $ |
55 | .Dt PEM_READ_BIO_PRIVATEKEY 3 | 55 | .Dt PEM_READ_BIO_PRIVATEKEY 3 |
56 | .Os | 56 | .Os |
57 | .Sh NAME | 57 | .Sh NAME |
@@ -137,10 +137,6 @@ | |||
137 | .Nm PEM_read_PKCS7 , | 137 | .Nm PEM_read_PKCS7 , |
138 | .Nm PEM_write_bio_PKCS7 , | 138 | .Nm PEM_write_bio_PKCS7 , |
139 | .Nm PEM_write_PKCS7 , | 139 | .Nm PEM_write_PKCS7 , |
140 | .Nm PEM_read_bio_NETSCAPE_CERT_SEQUENCE , | ||
141 | .Nm PEM_read_NETSCAPE_CERT_SEQUENCE , | ||
142 | .Nm PEM_write_bio_NETSCAPE_CERT_SEQUENCE , | ||
143 | .Nm PEM_write_NETSCAPE_CERT_SEQUENCE , | ||
144 | .Nm PEM_read_CMS , | 140 | .Nm PEM_read_CMS , |
145 | .Nm PEM_read_bio_CMS , | 141 | .Nm PEM_read_bio_CMS , |
146 | .Nm PEM_write_CMS , | 142 | .Nm PEM_write_CMS , |
@@ -694,30 +690,6 @@ | |||
694 | .Fa "FILE *fp" | 690 | .Fa "FILE *fp" |
695 | .Fa "PKCS7 *x" | 691 | .Fa "PKCS7 *x" |
696 | .Fc | 692 | .Fc |
697 | .Ft NETSCAPE_CERT_SEQUENCE * | ||
698 | .Fo PEM_read_bio_NETSCAPE_CERT_SEQUENCE | ||
699 | .Fa "BIO *bp" | ||
700 | .Fa "NETSCAPE_CERT_SEQUENCE **x" | ||
701 | .Fa "pem_password_cb *cb" | ||
702 | .Fa "void *u" | ||
703 | .Fc | ||
704 | .Ft NETSCAPE_CERT_SEQUENCE * | ||
705 | .Fo PEM_read_NETSCAPE_CERT_SEQUENCE | ||
706 | .Fa "FILE *fp" | ||
707 | .Fa "NETSCAPE_CERT_SEQUENCE **x" | ||
708 | .Fa "pem_password_cb *cb" | ||
709 | .Fa "void *u" | ||
710 | .Fc | ||
711 | .Ft int | ||
712 | .Fo PEM_write_bio_NETSCAPE_CERT_SEQUENCE | ||
713 | .Fa "BIO *bp" | ||
714 | .Fa "NETSCAPE_CERT_SEQUENCE *x" | ||
715 | .Fc | ||
716 | .Ft int | ||
717 | .Fo PEM_write_NETSCAPE_CERT_SEQUENCE | ||
718 | .Fa "FILE *fp" | ||
719 | .Fa "NETSCAPE_CERT_SEQUENCE *x" | ||
720 | .Fc | ||
721 | .In openssl/cms.h | 693 | .In openssl/cms.h |
722 | .Ft CMS_ContentInfo * | 694 | .Ft CMS_ContentInfo * |
723 | .Fo PEM_read_CMS | 695 | .Fo PEM_read_CMS |
@@ -961,12 +933,6 @@ using a | |||
961 | structure. | 933 | structure. |
962 | .Pp | 934 | .Pp |
963 | The | 935 | The |
964 | .Sy NETSCAPE_CERT_SEQUENCE | ||
965 | functions process a Netscape Certificate Sequence using a | ||
966 | .Vt NETSCAPE_CERT_SEQUENCE | ||
967 | structure. | ||
968 | .Pp | ||
969 | The | ||
970 | .Sy CMS | 936 | .Sy CMS |
971 | functions process a | 937 | functions process a |
972 | .Vt CMS_ContentInfo | 938 | .Vt CMS_ContentInfo |
@@ -1291,13 +1257,6 @@ All these functions have been available since | |||
1291 | .Fn PEM_read_PKCS8_PRIV_KEY_INFO , | 1257 | .Fn PEM_read_PKCS8_PRIV_KEY_INFO , |
1292 | .Fn PEM_write_bio_PKCS8_PRIV_KEY_INFO , | 1258 | .Fn PEM_write_bio_PKCS8_PRIV_KEY_INFO , |
1293 | .Fn PEM_write_PKCS8_PRIV_KEY_INFO , | 1259 | .Fn PEM_write_PKCS8_PRIV_KEY_INFO , |
1294 | .Fn PEM_read_bio_NETSCAPE_CERT_SEQUENCE , | ||
1295 | .Fn PEM_read_NETSCAPE_CERT_SEQUENCE , | ||
1296 | .Fn PEM_write_bio_NETSCAPE_CERT_SEQUENCE , | ||
1297 | and | ||
1298 | .Fn PEM_write_NETSCAPE_CERT_SEQUENCE | ||
1299 | first appeared in OpenSSL 0.9.4 and have been available since | ||
1300 | .Ox 2.6 . | ||
1301 | .Pp | 1260 | .Pp |
1302 | .Fn PEM_write_bio_PKCS8PrivateKey_nid , | 1261 | .Fn PEM_write_bio_PKCS8PrivateKey_nid , |
1303 | .Fn PEM_write_PKCS8PrivateKey_nid , | 1262 | .Fn PEM_write_PKCS8PrivateKey_nid , |
diff --git a/src/lib/libcrypto/x509/x509.h b/src/lib/libcrypto/x509/x509.h index bed87d8c7c..c2a9dfedc5 100644 --- a/src/lib/libcrypto/x509/x509.h +++ b/src/lib/libcrypto/x509/x509.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509.h,v 1.99 2023/04/24 22:24:39 tb Exp $ */ | 1 | /* $OpenBSD: x509.h,v 1.100 2023/04/25 18:57:57 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 | * |
@@ -334,14 +334,6 @@ typedef struct Netscape_spki_st { | |||
334 | ASN1_BIT_STRING *signature; | 334 | ASN1_BIT_STRING *signature; |
335 | } NETSCAPE_SPKI; | 335 | } NETSCAPE_SPKI; |
336 | 336 | ||
337 | #if !defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_INTERNAL) | ||
338 | /* Netscape certificate sequence structure */ | ||
339 | typedef struct Netscape_certificate_sequence { | ||
340 | ASN1_OBJECT *type; | ||
341 | STACK_OF(X509) *certs; | ||
342 | } NETSCAPE_CERT_SEQUENCE; | ||
343 | #endif | ||
344 | |||
345 | /* Password based encryption structure */ | 337 | /* Password based encryption structure */ |
346 | 338 | ||
347 | typedef struct PBEPARAM_st { | 339 | typedef struct PBEPARAM_st { |
@@ -739,14 +731,6 @@ NETSCAPE_SPKAC *d2i_NETSCAPE_SPKAC(NETSCAPE_SPKAC **a, const unsigned char **in, | |||
739 | int i2d_NETSCAPE_SPKAC(NETSCAPE_SPKAC *a, unsigned char **out); | 731 | int i2d_NETSCAPE_SPKAC(NETSCAPE_SPKAC *a, unsigned char **out); |
740 | extern const ASN1_ITEM NETSCAPE_SPKAC_it; | 732 | extern const ASN1_ITEM NETSCAPE_SPKAC_it; |
741 | 733 | ||
742 | #if !defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_INTERNAL) | ||
743 | NETSCAPE_CERT_SEQUENCE *NETSCAPE_CERT_SEQUENCE_new(void); | ||
744 | void NETSCAPE_CERT_SEQUENCE_free(NETSCAPE_CERT_SEQUENCE *a); | ||
745 | NETSCAPE_CERT_SEQUENCE *d2i_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE **a, const unsigned char **in, long len); | ||
746 | int i2d_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE *a, unsigned char **out); | ||
747 | extern const ASN1_ITEM NETSCAPE_CERT_SEQUENCE_it; | ||
748 | #endif | ||
749 | |||
750 | #ifndef OPENSSL_NO_EVP | 734 | #ifndef OPENSSL_NO_EVP |
751 | X509_INFO * X509_INFO_new(void); | 735 | X509_INFO * X509_INFO_new(void); |
752 | void X509_INFO_free(X509_INFO *a); | 736 | void X509_INFO_free(X509_INFO *a); |