From: Matt Caswell Date: Thu, 3 Sep 2020 15:39:36 +0000 (+0100) Subject: Fix safestack issues in ui.h X-Git-Tag: openssl-3.0.0-alpha7~251 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9cedfc90cebc905b20275d534699a1070bba65a4;p=thirdparty%2Fopenssl.git Fix safestack issues in ui.h Reviewed-by: Richard Levitte Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/12781) --- diff --git a/.gitignore b/.gitignore index a173bbfe139..8f4bc6af85b 100644 --- a/.gitignore +++ b/.gitignore @@ -41,6 +41,7 @@ /include/openssl/safestack.h /include/openssl/srp.h /include/openssl/ssl.h +/include/openssl/ui.h /include/openssl/x509.h /include/openssl/x509v3.h /include/openssl/x509_vfy.h diff --git a/build.info b/build.info index a5f6498ac20..8aa668e9139 100644 --- a/build.info +++ b/build.info @@ -32,6 +32,7 @@ DEPEND[]=include/openssl/asn1.h \ include/openssl/safestack.h \ include/openssl/srp.h \ include/openssl/ssl.h \ + include/openssl/ui.h \ include/openssl/x509.h \ include/openssl/x509v3.h \ include/openssl/x509_vfy.h \ @@ -57,6 +58,7 @@ GENERATE[include/openssl/pkcs7.h]=include/openssl/pkcs7.h.in GENERATE[include/openssl/safestack.h]=include/openssl/safestack.h.in GENERATE[include/openssl/srp.h]=include/openssl/srp.h.in GENERATE[include/openssl/ssl.h]=include/openssl/ssl.h.in +GENERATE[include/openssl/ui.h]=include/openssl/ui.h.in GENERATE[include/openssl/x509.h]=include/openssl/x509.h.in GENERATE[include/openssl/x509v3.h]=include/openssl/x509v3.h.in GENERATE[include/openssl/x509_vfy.h]=include/openssl/x509_vfy.h.in diff --git a/crypto/ui/ui_lib.c b/crypto/ui/ui_lib.c index 8c6dc6dd899..017afb7c07f 100644 --- a/crypto/ui/ui_lib.c +++ b/crypto/ui/ui_lib.c @@ -15,8 +15,6 @@ #include #include "ui_local.h" -DEFINE_STACK_OF(UI_STRING) - UI *UI_new(void) { return UI_new_method(NULL); diff --git a/include/openssl/ui.h b/include/openssl/ui.h.in similarity index 99% rename from include/openssl/ui.h rename to include/openssl/ui.h.in index f68a4e90a81..eb9a580fa8f 100644 --- a/include/openssl/ui.h +++ b/include/openssl/ui.h.in @@ -1,4 +1,6 @@ /* + * {- join("\n * ", @autowarntext) -} + * * Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use @@ -7,6 +9,10 @@ * https://www.openssl.org/source/license.html */ +{- +use OpenSSL::stackhash qw(generate_stack_macros); +-} + #ifndef OPENSSL_UI_H # define OPENSSL_UI_H # pragma once @@ -285,7 +291,9 @@ const UI_METHOD *UI_null(void); */ typedef struct ui_string_st UI_STRING; -DEFINE_OR_DECLARE_STACK_OF(UI_STRING) +{- + generate_stack_macros("UI_STRING"); +-} /* * The different types of strings that are currently supported. This is only