Mark NETSCAPE_CERT_SEQUENCE for removal
authortb <tb@openbsd.org>
Mon, 24 Apr 2023 22:24:39 +0000 (22:24 +0000)
committertb <tb@openbsd.org>
Mon, 24 Apr 2023 22:24:39 +0000 (22:24 +0000)
discussed with beck and jsing

lib/libcrypto/pem/pem.h
lib/libcrypto/pem/pem_all.c
lib/libcrypto/x509/x509.h

index a0f7d78..092d815 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: pem.h,v 1.24 2022/07/12 14:42:50 kn Exp $ */
+/* $OpenBSD: pem.h,v 1.25 2023/04/24 22:24:39 tb Exp $ */
 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -425,7 +425,9 @@ DECLARE_PEM_rw(X509_CRL, X509_CRL)
 
 DECLARE_PEM_rw(PKCS7, PKCS7)
 
+#if !defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_INTERNAL)
 DECLARE_PEM_rw(NETSCAPE_CERT_SEQUENCE, NETSCAPE_CERT_SEQUENCE)
+#endif
 
 DECLARE_PEM_rw(PKCS8, X509_SIG)
 
index f5211f2..82c7fc4 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: pem_all.c,v 1.17 2016/09/04 16:10:38 jsing Exp $ */
+/* $OpenBSD: pem_all.c,v 1.18 2023/04/24 22:24:39 tb Exp $ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -239,12 +239,14 @@ PEM_write_bio_PKCS7(BIO *bp, PKCS7 *x)
            x, NULL, NULL, 0, NULL, NULL);
 }
 
+#if !defined(LIBRESSL_NEXT_API)
 int
 PEM_write_NETSCAPE_CERT_SEQUENCE(FILE *fp, NETSCAPE_CERT_SEQUENCE *x)
 {
        return PEM_ASN1_write((i2d_of_void *)i2d_NETSCAPE_CERT_SEQUENCE, PEM_STRING_X509, fp,
            x, NULL, NULL, 0, NULL, NULL);
 }
+#endif
 
 NETSCAPE_CERT_SEQUENCE *
 PEM_read_NETSCAPE_CERT_SEQUENCE(FILE *fp, NETSCAPE_CERT_SEQUENCE **x, pem_password_cb *cb, void *u)
index ece9028..bed87d8 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509.h,v 1.98 2023/04/24 08:39:06 job Exp $ */
+/* $OpenBSD: x509.h,v 1.99 2023/04/24 22:24:39 tb Exp $ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -334,12 +334,13 @@ typedef struct Netscape_spki_st {
        ASN1_BIT_STRING *signature;
 } NETSCAPE_SPKI;
 
+#if !defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_INTERNAL)
 /* Netscape certificate sequence structure */
 typedef struct Netscape_certificate_sequence {
        ASN1_OBJECT *type;
        STACK_OF(X509) *certs;
 } NETSCAPE_CERT_SEQUENCE;
-
+#endif
 
 /* Password based encryption structure */
 
@@ -737,11 +738,14 @@ void NETSCAPE_SPKAC_free(NETSCAPE_SPKAC *a);
 NETSCAPE_SPKAC *d2i_NETSCAPE_SPKAC(NETSCAPE_SPKAC **a, const unsigned char **in, long len);
 int i2d_NETSCAPE_SPKAC(NETSCAPE_SPKAC *a, unsigned char **out);
 extern const ASN1_ITEM NETSCAPE_SPKAC_it;
+
+#if !defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_INTERNAL)
 NETSCAPE_CERT_SEQUENCE *NETSCAPE_CERT_SEQUENCE_new(void);
 void NETSCAPE_CERT_SEQUENCE_free(NETSCAPE_CERT_SEQUENCE *a);
 NETSCAPE_CERT_SEQUENCE *d2i_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE **a, const unsigned char **in, long len);
 int i2d_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE *a, unsigned char **out);
 extern const ASN1_ITEM NETSCAPE_CERT_SEQUENCE_it;
+#endif
 
 #ifndef OPENSSL_NO_EVP
 X509_INFO *    X509_INFO_new(void);