summaryrefslogtreecommitdiffstats
path: root/crypto/ocsp
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/ocsp
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/ocsp')
-rw-r--r--crypto/ocsp/ocsp_cl.c4
-rw-r--r--crypto/ocsp/ocsp_ext.c3
-rw-r--r--crypto/ocsp/ocsp_prn.c4
-rw-r--r--crypto/ocsp/ocsp_srv.c4
-rw-r--r--crypto/ocsp/ocsp_vfy.c4
-rw-r--r--crypto/ocsp/v3_ocsp.c2
6 files changed, 21 insertions, 0 deletions
diff --git a/crypto/ocsp/ocsp_cl.c b/crypto/ocsp/ocsp_cl.c
index ec657900a5..95b16dce55 100644
--- a/crypto/ocsp/ocsp_cl.c
+++ b/crypto/ocsp/ocsp_cl.c
@@ -18,6 +18,10 @@
#include <openssl/ocsp.h>
#include "ocsp_local.h"
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(OCSP_ONEREQ)
+DEFINE_STACK_OF(OCSP_SINGLERESP)
+
/*
* Utility functions related to sending OCSP requests and extracting relevant
* information from the response.
diff --git a/crypto/ocsp/ocsp_ext.c b/crypto/ocsp/ocsp_ext.c
index c2b61bd4f2..77e67840b8 100644
--- a/crypto/ocsp/ocsp_ext.c
+++ b/crypto/ocsp/ocsp_ext.c
@@ -16,6 +16,9 @@
#include <openssl/rand.h>
#include <openssl/x509v3.h>
+DEFINE_STACK_OF(ASN1_OBJECT)
+DEFINE_STACK_OF(ACCESS_DESCRIPTION)
+
/* Standard wrapper functions for extensions */
/* OCSP request extensions */
diff --git a/crypto/ocsp/ocsp_prn.c b/crypto/ocsp/ocsp_prn.c
index 6d527dfcc8..170fb275a6 100644
--- a/crypto/ocsp/ocsp_prn.c
+++ b/crypto/ocsp/ocsp_prn.c
@@ -14,6 +14,10 @@
#include "internal/cryptlib.h"
#include <openssl/pem.h>
+DEFINE_STACK_OF(OCSP_ONEREQ)
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(OCSP_SINGLERESP)
+
static int ocsp_certid_print(BIO *bp, OCSP_CERTID *a, int indent)
{
BIO_printf(bp, "%*sCertificate ID:\n", indent, "");
diff --git a/crypto/ocsp/ocsp_srv.c b/crypto/ocsp/ocsp_srv.c
index b9253b36d9..3cfe3649cc 100644
--- a/crypto/ocsp/ocsp_srv.c
+++ b/crypto/ocsp/ocsp_srv.c
@@ -16,6 +16,10 @@
#include <openssl/ocsp.h>
#include "ocsp_local.h"
+DEFINE_STACK_OF(OCSP_ONEREQ)
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(OCSP_SINGLERESP)
+
/*
* Utility functions related to sending OCSP responses and extracting
* relevant information from the request.
diff --git a/crypto/ocsp/ocsp_vfy.c b/crypto/ocsp/ocsp_vfy.c
index c7a22a1f97..0dccb24eb5 100644
--- a/crypto/ocsp/ocsp_vfy.c
+++ b/crypto/ocsp/ocsp_vfy.c
@@ -12,6 +12,10 @@
#include <openssl/err.h>
#include <string.h>
+DEFINE_STACK_OF(OCSP_ONEREQ)
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(OCSP_SINGLERESP)
+
static int ocsp_find_signer(X509 **psigner, OCSP_BASICRESP *bs,
STACK_OF(X509) *certs, unsigned long flags);
static X509 *ocsp_find_signer_sk(STACK_OF(X509) *certs, OCSP_RESPID *id);
diff --git a/crypto/ocsp/v3_ocsp.c b/crypto/ocsp/v3_ocsp.c
index 9648ba9412..33451ec4a5 100644
--- a/crypto/ocsp/v3_ocsp.c
+++ b/crypto/ocsp/v3_ocsp.c
@@ -16,6 +16,8 @@
# include <openssl/x509v3.h>
# include "../x509/ext_dat.h"
+DEFINE_STACK_OF(ACCESS_DESCRIPTION)
+
/*
* OCSP extensions and a couple of CRL entry extensions
*/