diff options
author | Matt Caswell <matt@openssl.org> | 2020-09-03 16:06:16 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-09-13 11:10:41 +0100 |
commit | dd731474207126615679f4cc9ae772d7da990332 (patch) | |
tree | 8a60e41bdcd2991bb5d55dba31ad8fdf4446cee2 | |
parent | 1e14bca2332a95340366324372c59e6a78ddbad7 (diff) |
Fix safestack issues in bio.h
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12781)
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | build.info | 2 | ||||
-rw-r--r-- | crypto/asn1/asn_mime.c | 2 | ||||
-rw-r--r-- | crypto/conf/conf_def.c | 2 | ||||
-rw-r--r-- | include/openssl/bio.h.in (renamed from include/openssl/bio.h) | 10 |
5 files changed, 12 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore index f1aeaddcee..038f8b4f37 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/build.info b/build.info index 7c5388b96c..e5cd3da971 100644 --- a/build.info +++ b/build.info @@ -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 diff --git a/crypto/asn1/asn_mime.c b/crypto/asn1/asn_mime.c index 65e8425045..596b32a57e 100644 --- a/crypto/asn1/asn_mime.c +++ b/crypto/asn1/asn_mime.c @@ -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. diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c index 6f7c06afd7..63dfaef4d8 100644 --- a/crypto/conf/conf_def.c +++ b/crypto/conf/conf_def.c @@ -30,8 +30,6 @@ # endif #endif -DEFINE_STACK_OF(BIO) - #ifndef S_ISDIR # define S_ISDIR(a) (((a) & S_IFMT) == S_IFDIR) #endif diff --git a/include/openssl/bio.h b/include/openssl/bio.h.in index 88e57e70a8..d7380d47e9 100644 --- a/include/openssl/bio.h +++ b/include/openssl/bio.h.in @@ -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, |