summaryrefslogtreecommitdiffstats
path: root/crypto/ct
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2019-12-19 17:30:24 -0500
committerTomas Mraz <tmraz@fedoraproject.org>2020-04-24 16:42:46 +0200
commit852c2ed260860b6b85c84f9fe96fb4d23d49c9f2 (patch)
treed8104686e0a02217c13f51e5d10d7434fa13e3dc /crypto/ct
parent4692e98bdbaebb6f078e89a75c54395839e68b24 (diff)
In OpenSSL builds, declare STACK for datatypes ...
... and only *define* them in the source files that need them. Use DEFINE_OR_DECLARE which is set appropriately for internal builds and not non-deprecated builds. Deprecate stack-of-block Better documentation Move some ASN1 struct typedefs to types.h Update ParseC to handle this. Most of all, ParseC needed to be more consistent. The handlers are "recursive", in so far that they are called again and again until they terminate, which depends entirely on what the "massager" returns. There's a comment at the beginning of ParseC that explains how that works. {Richard Levtte} Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10669)
Diffstat (limited to 'crypto/ct')
-rw-r--r--crypto/ct/ct_log.c2
-rw-r--r--crypto/ct/ct_oct.c2
-rw-r--r--crypto/ct/ct_prn.c2
-rw-r--r--crypto/ct/ct_sct.c2
-rw-r--r--crypto/ct/ct_x509v3.c2
5 files changed, 10 insertions, 0 deletions
diff --git a/crypto/ct/ct_log.c b/crypto/ct/ct_log.c
index 32a29ed699..73eeee9d7d 100644
--- a/crypto/ct/ct_log.c
+++ b/crypto/ct/ct_log.c
@@ -18,6 +18,8 @@
#include "internal/cryptlib.h"
+DEFINE_STACK_OF(CTLOG)
+
/*
* Information about a CT log server.
*/
diff --git a/crypto/ct/ct_oct.c b/crypto/ct/ct_oct.c
index bd8d1bb1df..dfc6e99e2a 100644
--- a/crypto/ct/ct_oct.c
+++ b/crypto/ct/ct_oct.c
@@ -21,6 +21,8 @@
#include "ct_local.h"
+DEFINE_STACK_OF(SCT)
+
int o2i_SCT_signature(SCT *sct, const unsigned char **in, size_t len)
{
size_t siglen;
diff --git a/crypto/ct/ct_prn.c b/crypto/ct/ct_prn.c
index 4c5760d694..e2ab6b2fd5 100644
--- a/crypto/ct/ct_prn.c
+++ b/crypto/ct/ct_prn.c
@@ -16,6 +16,8 @@
#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);
diff --git a/crypto/ct/ct_sct.c b/crypto/ct/ct_sct.c
index 1b8e1dc61e..f6c262c967 100644
--- a/crypto/ct/ct_sct.c
+++ b/crypto/ct/ct_sct.c
@@ -19,6 +19,8 @@
#include "ct_local.h"
+DEFINE_STACK_OF(SCT)
+
SCT *SCT_new(void)
{
SCT *sct = OPENSSL_zalloc(sizeof(*sct));
diff --git a/crypto/ct/ct_x509v3.c b/crypto/ct/ct_x509v3.c
index 1665b985eb..55190debc1 100644
--- a/crypto/ct/ct_x509v3.c
+++ b/crypto/ct/ct_x509v3.c
@@ -13,6 +13,8 @@
#include "ct_local.h"
+DEFINE_STACK_OF(SCT)
+
static char *i2s_poison(const X509V3_EXT_METHOD *method, void *val)
{
return OPENSSL_strdup("NULL");