summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-09-03 17:39:36 +0200
committerMatt Caswell <matt@openssl.org>2020-09-13 12:11:21 +0200
commit9cedfc90cebc905b20275d534699a1070bba65a4 (patch)
treec89a77f6534273680f2ca614e50761031b93b88f
parentFix safestack issues in pkcs12.h (diff)
downloadopenssl-9cedfc90cebc905b20275d534699a1070bba65a4.tar.xz
openssl-9cedfc90cebc905b20275d534699a1070bba65a4.zip
Fix safestack issues in ui.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--.gitignore1
-rw-r--r--build.info2
-rw-r--r--crypto/ui/ui_lib.c2
-rw-r--r--include/openssl/ui.h.in (renamed from include/openssl/ui.h)10
4 files changed, 12 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index a173bbfe13..8f4bc6af85 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 a5f6498ac2..8aa668e913 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 8c6dc6dd89..017afb7c07 100644
--- a/crypto/ui/ui_lib.c
+++ b/crypto/ui/ui_lib.c
@@ -15,8 +15,6 @@
#include <openssl/err.h>
#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
index f68a4e90a8..eb9a580fa8 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