]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix safestack issues in bio.h
authorMatt Caswell <matt@openssl.org>
Thu, 3 Sep 2020 15:06:16 +0000 (16:06 +0100)
committerMatt Caswell <matt@openssl.org>
Sun, 13 Sep 2020 10:10:41 +0000 (11:10 +0100)
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12781)

.gitignore
build.info
crypto/asn1/asn_mime.c
crypto/conf/conf_def.c
include/openssl/bio.h.in [moved from include/openssl/bio.h with 99% similarity]

index f1aeaddceeb13ef4b29fab12a2c38d3fabee1660..038f8b4f372cf017b80734725e4adef07b493409 100644 (file)
@@ -24,6 +24,7 @@
 /include/crypto/*_conf.h
 /include/openssl/asn1.h
 /include/openssl/asn1t.h
+/include/openssl/bio.h
 /include/openssl/cmp.h
 /include/openssl/cms.h
 /include/openssl/configuration.h
index 7c5388b96cf231d7deeaa1ffe22657334cc22c05..e5cd3da971fd8bfe2783a9658b19479f8e3957e9 100644 (file)
@@ -15,6 +15,7 @@ DEPEND[libssl]=libcrypto
 # unconditionally before anything else.
 DEPEND[]=include/openssl/asn1.h \
          include/openssl/asn1t.h \
+         include/openssl/bio.h \
          include/openssl/cmp.h \
          include/openssl/cms.h \
          include/openssl/configuration.h \
@@ -36,6 +37,7 @@ DEPEND[]=include/openssl/asn1.h \
 
 GENERATE[include/openssl/asn1.h]=include/openssl/asn1.h.in
 GENERATE[include/openssl/asn1t.h]=include/openssl/asn1t.h.in
+GENERATE[include/openssl/bio.h]=include/openssl/bio.h.in
 GENERATE[include/openssl/cmp.h]=include/openssl/cmp.h.in
 GENERATE[include/openssl/cms.h]=include/openssl/cms.h.in
 GENERATE[include/openssl/configuration.h]=include/openssl/configuration.h.in
index 65e84250458e1ca319e04d372a5c30f85a74deba..596b32a57e29688a0c0f3c77cfc9b12a674dc994 100644 (file)
@@ -19,8 +19,6 @@
 #include "internal/bio.h"
 #include "asn1_local.h"
 
-DEFINE_STACK_OF(BIO)
-
 /*
  * Generalised MIME like utilities for streaming ASN1. Although many have a
  * PKCS7/CMS like flavour others are more general purpose.
index 6f7c06afd70b49d8eeb2ed083ba0f94152a2cd72..63dfaef4d82b328ffb0058a8f448d389b2c249b5 100644 (file)
@@ -30,8 +30,6 @@
 # endif
 #endif
 
-DEFINE_STACK_OF(BIO)
-
 #ifndef S_ISDIR
 # define S_ISDIR(a) (((a) & S_IFMT) == S_IFDIR)
 #endif
similarity index 99%
rename from include/openssl/bio.h
rename to include/openssl/bio.h.in
index 88e57e70a804f4cce38798116758ccb946ab54b1..d7380d47e9f06c69eda5554b1ebda00c81517091 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * {- join("\n * ", @autowarntext) -}
+ *
  * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
  *
  * Licensed under the Apache License 2.0 (the "License").  You may not use
@@ -6,6 +8,9 @@
  * in the file LICENSE in the source distribution or at
  * https://www.openssl.org/source/license.html
  */
+{-
+use OpenSSL::stackhash qw(generate_stack_macros);
+-}
 
 #ifndef OPENSSL_BIO_H
 # define OPENSSL_BIO_H
@@ -287,7 +292,10 @@ int BIO_method_type(const BIO *b);
 typedef int BIO_info_cb(BIO *, int, int);
 typedef BIO_info_cb bio_info_cb;  /* backward compatibility */
 
-DEFINE_OR_DECLARE_STACK_OF(BIO)
+{-
+    generate_stack_macros("BIO");
+-}
+
 
 /* Prefix and suffix callback in ASN1 BIO */
 typedef int asn1_ps_func (BIO *b, unsigned char **pbuf, int *plen,