diff options
author | Matt Caswell <matt@openssl.org> | 2020-09-03 10:23:44 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-09-13 11:09:45 +0100 |
commit | e6623cfbffcc03e2483632359e005ca13adacc9d (patch) | |
tree | 64caba9fa625624f304162011a54a55b09b0ad41 | |
parent | 6ac1cd10ba8a1d92d3858e53a7aea2cf444adf26 (diff) |
Fix safestack issues in x509.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)
106 files changed, 30 insertions, 193 deletions
diff --git a/.gitignore b/.gitignore index 498d3aeffa..1996b07fa1 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ /include/openssl/opensslv.h /include/openssl/fipskey.h /include/openssl/ssl.h +/include/openssl/x509.h # Auto generated doc files doc/man1/openssl-*.pod @@ -34,8 +34,6 @@ #include "apps.h" #include "progs.h" -DEFINE_STACK_OF(X509) -DEFINE_STACK_OF(X509_EXTENSION) DEFINE_STACK_OF(CONF_VALUE) DEFINE_STACK_OF_STRING() diff --git a/apps/cmp.c b/apps/cmp.c index db0d418bd4..4d77b541c4 100644 --- a/apps/cmp.c +++ b/apps/cmp.c @@ -42,8 +42,6 @@ #include <openssl/objects.h> #include <openssl/x509.h> -DEFINE_STACK_OF(X509) -DEFINE_STACK_OF(X509_EXTENSION) DEFINE_STACK_OF(OSSL_CMP_ITAV) static char *opt_config = NULL; diff --git a/apps/cmp_mock_srv.c b/apps/cmp_mock_srv.c index 3a0819008b..2c82567856 100644 --- a/apps/cmp_mock_srv.c +++ b/apps/cmp_mock_srv.c @@ -15,7 +15,6 @@ #include <openssl/err.h> #include <openssl/cmperr.h> -DEFINE_STACK_OF(X509) DEFINE_STACK_OF(OSSL_CMP_ITAV) DEFINE_STACK_OF(ASN1_UTF8STRING) diff --git a/apps/cms.c b/apps/cms.c index d154f460b3..fada7b57a9 100644 --- a/apps/cms.c +++ b/apps/cms.c @@ -23,7 +23,6 @@ # include <openssl/x509v3.h> # include <openssl/cms.h> -DEFINE_STACK_OF(X509) DEFINE_STACK_OF(CMS_SignerInfo) DEFINE_STACK_OF(GENERAL_NAME) DEFINE_STACK_OF(GENERAL_NAMES) diff --git a/apps/crl2p7.c b/apps/crl2p7.c index e0de95a12a..545fe0a53b 100644 --- a/apps/crl2p7.c +++ b/apps/crl2p7.c @@ -19,9 +19,6 @@ #include <openssl/pem.h> #include <openssl/objects.h> -DEFINE_STACK_OF(X509_CRL) -DEFINE_STACK_OF(X509) -DEFINE_STACK_OF(X509_INFO) DEFINE_STACK_OF_STRING() static int add_certs_from_file(STACK_OF(X509) *stack, char *certfile); diff --git a/apps/lib/apps.c b/apps/lib/apps.c index 5d95ce0c65..bd6a6bc54b 100644 --- a/apps/lib/apps.c +++ b/apps/lib/apps.c @@ -63,10 +63,6 @@ static int WIN32_rename(const char *from, const char *to); DEFINE_STACK_OF(CONF) DEFINE_STACK_OF(CONF_VALUE) -DEFINE_STACK_OF(X509) -DEFINE_STACK_OF(X509_CRL) -DEFINE_STACK_OF(X509_INFO) -DEFINE_STACK_OF(X509_EXTENSION) DEFINE_STACK_OF(X509_POLICY_NODE) DEFINE_STACK_OF(GENERAL_NAME) DEFINE_STACK_OF(DIST_POINT) diff --git a/apps/lib/s_cb.c b/apps/lib/s_cb.c index 0ae851d792..b53d4cbd40 100644 --- a/apps/lib/s_cb.c +++ b/apps/lib/s_cb.c @@ -26,9 +26,6 @@ #define COOKIE_SECRET_LENGTH 16 -DEFINE_STACK_OF(X509) -DEFINE_STACK_OF(X509_CRL) -DEFINE_STACK_OF(X509_NAME) DEFINE_STACK_OF_STRING() VERIFY_CB_ARGS verify_args = { -1, 0, X509_V_OK, 0 }; diff --git a/apps/nseq.c b/apps/nseq.c index de189632b2..92ae7bd34d 100644 --- a/apps/nseq.c +++ b/apps/nseq.c @@ -14,8 +14,6 @@ #include <openssl/pem.h> #include <openssl/err.h> -DEFINE_STACK_OF(X509) - typedef enum OPTION_choice { OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_TOSEQ, OPT_IN, OPT_OUT, diff --git a/apps/ocsp.c b/apps/ocsp.c index 4f42d66c0e..ad699629f6 100644 --- a/apps/ocsp.c +++ b/apps/ocsp.c @@ -35,7 +35,6 @@ DEFINE_STACK_OF(OCSP_CERTID) DEFINE_STACK_OF(CONF_VALUE) -DEFINE_STACK_OF(X509) DEFINE_STACK_OF_STRING() #if defined(__TANDEM) diff --git a/apps/pkcs12.c b/apps/pkcs12.c index 23ffa98f77..fddfdbca36 100644 --- a/apps/pkcs12.c +++ b/apps/pkcs12.c @@ -20,10 +20,8 @@ #include <openssl/pkcs12.h> #include <openssl/provider.h> -DEFINE_STACK_OF(X509) DEFINE_STACK_OF(PKCS7) DEFINE_STACK_OF(PKCS12_SAFEBAG) -DEFINE_STACK_OF(X509_ATTRIBUTE) DEFINE_STACK_OF_STRING() #define NOKEYS 0x1 diff --git a/apps/pkcs7.c b/apps/pkcs7.c index 95d3ca0845..e6ac26e6f9 100644 --- a/apps/pkcs7.c +++ b/apps/pkcs7.c @@ -20,9 +20,6 @@ #include <openssl/pkcs7.h> #include <openssl/pem.h> -DEFINE_STACK_OF(X509) -DEFINE_STACK_OF(X509_CRL) - typedef enum OPTION_choice { OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_INFORM, OPT_OUTFORM, OPT_IN, OPT_OUT, OPT_NOOUT, diff --git a/apps/rehash.c b/apps/rehash.c index 866b8cfe20..efa0b65497 100644 --- a/apps/rehash.c +++ b/apps/rehash.c @@ -42,7 +42,6 @@ # include <openssl/pem.h> # include <openssl/x509.h> -DEFINE_STACK_OF(X509_INFO) DEFINE_STACK_OF_STRING() # ifndef PATH_MAX diff --git a/apps/s_client.c b/apps/s_client.c index 2a58589ce2..32aa6fafcb 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -59,9 +59,6 @@ typedef unsigned int u_int; # endif #endif -DEFINE_STACK_OF(X509) -DEFINE_STACK_OF(X509_CRL) -DEFINE_STACK_OF(X509_NAME) DEFINE_STACK_OF(SCT) DEFINE_STACK_OF_STRING() diff --git a/apps/s_server.c b/apps/s_server.c index f1ea550fed..c970080d83 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -60,9 +60,6 @@ typedef unsigned int u_int; #endif #include "internal/sockets.h" -DEFINE_STACK_OF(X509_EXTENSION) -DEFINE_STACK_OF(X509_CRL) -DEFINE_STACK_OF(X509) DEFINE_STACK_OF_STRING() static int not_resumable_sess_cb(SSL *s, int is_forward_secure); diff --git a/apps/smime.c b/apps/smime.c index dbfcdbeb5a..ed3d63af6c 100644 --- a/apps/smime.c +++ b/apps/smime.c @@ -19,7 +19,6 @@ #include <openssl/x509_vfy.h> #include <openssl/x509v3.h> -DEFINE_STACK_OF(X509) DEFINE_STACK_OF_STRING() static int save_certs(char *signerfile, STACK_OF(X509) *signers); |