Fix safestack issues in crypto.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)
This commit is contained in:
Matt Caswell 2020-09-03 16:24:47 +01:00
parent e74e562f1c
commit 15c3dcfc78
7 changed files with 14 additions and 9 deletions

1
.gitignore vendored
View File

@ -30,6 +30,7 @@
/include/openssl/conf.h
/include/openssl/configuration.h
/include/openssl/crmf.h
/include/openssl/crypto.h
/include/openssl/ct.h
/include/openssl/ess.h
/include/openssl/fipskey.h

View File

@ -21,6 +21,7 @@ DEPEND[]=include/openssl/asn1.h \
include/openssl/conf.h \
include/openssl/configuration.h \
include/openssl/crmf.h \
include/openssl/crypto.h \
include/openssl/ct.h \
include/openssl/ess.h \
include/openssl/fipskey.h \
@ -44,6 +45,7 @@ GENERATE[include/openssl/cms.h]=include/openssl/cms.h.in
GENERATE[include/openssl/conf.h]=include/openssl/conf.h.in
GENERATE[include/openssl/configuration.h]=include/openssl/configuration.h.in
GENERATE[include/openssl/crmf.h]=include/openssl/crmf.h.in
GENERATE[include/openssl/crypto.h]=include/openssl/crypto.h.in
GENERATE[include/openssl/ct.h]=include/openssl/ct.h.in
GENERATE[include/openssl/ess.h]=include/openssl/ess.h.in
GENERATE[include/openssl/fipskey.h]=include/openssl/fipskey.h.in

View File

@ -19,8 +19,6 @@
#include "dso_local.h"
#include "e_os.h"
DEFINE_STACK_OF(void)
#ifdef DSO_DLFCN
# ifdef HAVE_DLFCN_H

View File

@ -10,8 +10,6 @@
#include "dso_local.h"
#include "internal/refcount.h"
DEFINE_STACK_OF(void)
static DSO_METHOD *default_DSO_meth = NULL;
static DSO *DSO_new_method(DSO_METHOD *meth)

View File

@ -69,8 +69,6 @@ static void *win32_globallookup(const char *name);
static const char *openssl_strnchr(const char *string, int c, size_t len);
DEFINE_STACK_OF(void)
static DSO_METHOD dso_meth_win32 = {
"OpenSSL 'win32' shared library method",
win32_load,

View File

@ -10,8 +10,6 @@
#include "crypto/cryptlib.h"
#include "internal/thread_once.h"
DEFINE_STACK_OF(void)
int do_ex_data_init(OPENSSL_CTX *ctx)
{
OSSL_EX_DATA_GLOBAL *global = openssl_ctx_get_ex_data_global(ctx);

View File

@ -1,4 +1,6 @@
/*
* {- join("\n * ", @autowarntext) -}
*
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
*
@ -8,6 +10,11 @@
* https://www.openssl.org/source/license.html
*/
{-
use OpenSSL::stackhash qw(generate_stack_macros);
-}
#ifndef OPENSSL_CRYPTO_H
# define OPENSSL_CRYPTO_H
# pragma once
@ -170,7 +177,10 @@ struct crypto_ex_data_st {
STACK_OF(void) *sk;
};
DEFINE_OR_DECLARE_STACK_OF(void)
{-
generate_stack_macros("void");
-}
/*
* Per class, we have a STACK of function pointers.