Fix safestack issues in ct.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 15:50:09 +01:00
parent 98c35dc48d
commit 9d01ac71a0
11 changed files with 14 additions and 18 deletions

1
.gitignore vendored
View File

@ -27,6 +27,7 @@
/include/openssl/cms.h
/include/openssl/configuration.h
/include/openssl/crmf.h
/include/openssl/ct.h
/include/openssl/fipskey.h
/include/openssl/ocsp.h
/include/openssl/opensslv.h

View File

@ -59,8 +59,6 @@ typedef unsigned int u_int;
# endif
#endif
DEFINE_STACK_OF(SCT)
#undef BUFSIZZ
#define BUFSIZZ 1024*8
#define S_CLIENT_IRC_READ_TIMEOUT 8

View File

@ -18,6 +18,7 @@ DEPEND[]=include/openssl/asn1.h \
include/openssl/cms.h \
include/openssl/configuration.h \
include/openssl/crmf.h \
include/openssl/ct.h \
include/openssl/fipskey.h \
include/openssl/opensslv.h \
include/openssl/ocsp.h \
@ -36,6 +37,7 @@ 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
GENERATE[include/openssl/crmf.h]=include/openssl/crmf.h.in
GENERATE[include/openssl/ct.h]=include/openssl/ct.h.in
GENERATE[include/openssl/fipskey.h]=include/openssl/fipskey.h.in
GENERATE[include/openssl/ocsp.h]=include/openssl/ocsp.h.in
GENERATE[include/openssl/opensslv.h]=include/openssl/opensslv.h.in

View File

@ -18,8 +18,6 @@
#include "internal/cryptlib.h"
DEFINE_STACK_OF(CTLOG)
/*
* Information about a CT log server.
*/

View File

@ -21,8 +21,6 @@
#include "ct_local.h"
DEFINE_STACK_OF(SCT)
int o2i_SCT_signature(SCT *sct, const unsigned char **in, size_t len)
{
size_t siglen;

View File

@ -16,8 +16,6 @@
#include "ct_local.h"
DEFINE_STACK_OF(SCT)
static void SCT_signature_algorithms_print(const SCT *sct, BIO *out)
{
int nid = SCT_get_signature_nid(sct);

View File

@ -19,8 +19,6 @@
#include "ct_local.h"
DEFINE_STACK_OF(SCT)
SCT *SCT_new(void)
{
SCT *sct = OPENSSL_zalloc(sizeof(*sct));

View File

@ -13,8 +13,6 @@
#include "ct_local.h"
DEFINE_STACK_OF(SCT)
static char *i2s_poison(const X509V3_EXT_METHOD *method, void *val)
{
return OPENSSL_strdup("NULL");

View File

@ -1,4 +1,6 @@
/*
* {- join("\n * ", @autowarntext) -}
*
* Copyright 2016-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_CT_H
# define OPENSSL_CT_H
# pragma once
@ -34,8 +40,11 @@ extern "C" {
/* All hashes are SHA256 in v1 of Certificate Transparency */
# define CT_V1_HASHLEN SHA256_DIGEST_LENGTH
DEFINE_OR_DECLARE_STACK_OF(SCT)
DEFINE_OR_DECLARE_STACK_OF(CTLOG)
{-
generate_stack_macros("SCT")
.generate_stack_macros("CTLOG");
-}
typedef enum {
CT_LOG_ENTRY_TYPE_NOT_SET = -1,

View File

@ -28,8 +28,6 @@
#include "internal/refcount.h"
#include "internal/ktls.h"
DEFINE_STACK_OF(SCT)
static int ssl_undefined_function_1(SSL *ssl, SSL3_RECORD *r, size_t s, int t,
SSL_MAC_BUF *mac, size_t macsize)
{

View File

@ -22,8 +22,6 @@
#ifndef OPENSSL_NO_CT
DEFINE_STACK_OF(SCT)
/* Used when declaring buffers to read text files into */
# define CT_TEST_MAX_FILE_SIZE 8096