Browse Source

Fix stacks of OPENSSL_STRING, OPENSSL_CSTRING and OPENSSL_BLOCK

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12781)
master
Matt Caswell 1 year ago
parent
commit
24c4ea958e
39 changed files with 34 additions and 63 deletions
  1. +1
    -0
      .gitignore
  2. +0
    -1
      apps/asn1pars.c
  3. +0
    -1
      apps/ca.c
  4. +0
    -1
      apps/cms.c
  5. +0
    -2
      apps/crl2p7.c
  6. +0
    -2
      apps/dgst.c
  7. +0
    -3
      apps/engine.c
  8. +0
    -2
      apps/fipsinstall.c
  9. +0
    -2
      apps/kdf.c
  10. +0
    -1
      apps/lib/apps.c
  11. +0
    -2
      apps/lib/names.c
  12. +0
    -2
      apps/lib/s_cb.c
  13. +0
    -2
      apps/list.c
  14. +0
    -2
      apps/mac.c
  15. +0
    -1
      apps/ocsp.c
  16. +0
    -1
      apps/pkcs12.c
  17. +0
    -2
      apps/pkeyutl.c
  18. +0
    -2
      apps/provider.c
  19. +0
    -2
      apps/rehash.c
  20. +0
    -1
      apps/req.c
  21. +0
    -1
      apps/s_client.c
  22. +0
    -2
      apps/s_server.c
  23. +0
    -2
      apps/smime.c
  24. +0
    -2
      apps/verify.c
  25. +0
    -1
      apps/x509.c
  26. +2
    -0
      build.info
  27. +0
    -2
      crypto/encode_decode/decoder_pkey.c
  28. +0
    -2
      crypto/encode_decode/encoder_pkey.c
  29. +0
    -2
      crypto/engine/eng_dyn.c
  30. +0
    -2
      crypto/x509/by_store.c
  31. +0
    -1
      crypto/x509/v3_utl.c
  32. +0
    -2
      crypto/x509/x509_vfy.c
  33. +0
    -1
      crypto/x509/x509_vpm.c
  34. +15
    -3
      include/openssl/safestack.h.in
  35. +0
    -1
      test/confdump.c
  36. +0
    -2
      test/evp_libctx_test.c
  37. +0
    -2
      test/evp_test.c
  38. +0
    -2
      test/ssltest_old.c
  39. +16
    -1
      util/perl/OpenSSL/stackhash.pm

+ 1
- 0
.gitignore View File

@ -25,6 +25,7 @@
/include/openssl/configuration.h
/include/openssl/opensslv.h
/include/openssl/fipskey.h
/include/openssl/safestack.h
/include/openssl/ssl.h
/include/openssl/x509.h
/include/openssl/x509v3.h


+ 0
- 1
apps/asn1pars.c View File

@ -19,7 +19,6 @@
#include <openssl/asn1t.h>
DEFINE_STACK_OF(ASN1_OBJECT)
DEFINE_STACK_OF_STRING()
typedef enum OPTION_choice {
OPT_ERR = -1, OPT_EOF = 0, OPT_HELP,


+ 0
- 1
apps/ca.c View File

@ -35,7 +35,6 @@
#include "progs.h"
DEFINE_STACK_OF(CONF_VALUE)
DEFINE_STACK_OF_STRING()
#ifndef W_OK
# define F_OK 0


+ 0
- 1
apps/cms.c View File

@ -24,7 +24,6 @@
# include <openssl/cms.h>
DEFINE_STACK_OF(CMS_SignerInfo)
DEFINE_STACK_OF_STRING()
static int save_certs(char *signerfile, STACK_OF(X509) *signers);
static int cms_cb(int ok, X509_STORE_CTX *ctx);


+ 0
- 2
apps/crl2p7.c View File

@ -19,8 +19,6 @@
#include <openssl/pem.h>
#include <openssl/objects.h>
DEFINE_STACK_OF_STRING()
static int add_certs_from_file(STACK_OF(X509) *stack, char *certfile);
typedef enum OPTION_choice {


+ 0
- 2
apps/dgst.c View File

@ -21,8 +21,6 @@
#include <openssl/hmac.h>
#include <ctype.h>
DEFINE_STACK_OF_STRING()
#undef BUFSIZE
#define BUFSIZE 1024*8


+ 0
- 3
apps/engine.c View File

@ -22,9 +22,6 @@
#include <openssl/ssl.h>
#include <openssl/store.h>
DEFINE_STACK_OF_STRING()
DEFINE_STACK_OF_CSTRING()
typedef enum OPTION_choice {
OPT_ERR = -1, OPT_EOF = 0, OPT_HELP,
OPT_C, OPT_T, OPT_TT, OPT_PRE, OPT_POST,


+ 0
- 2
apps/fipsinstall.c View File

@ -19,8 +19,6 @@
#include "apps.h"
#include "progs.h"
DEFINE_STACK_OF_STRING()
#define BUFSIZE 4096
/* Configuration file values */


+ 0
- 2
apps/kdf.c View File

@ -17,8 +17,6 @@
#include <openssl/kdf.h>
#include <openssl/params.h>
DEFINE_STACK_OF_STRING()
typedef enum OPTION_choice {
OPT_ERR = -1, OPT_EOF = 0, OPT_HELP,
OPT_KDFOPT, OPT_BIN, OPT_KEYLEN, OPT_OUT,


+ 0
- 1
apps/lib/apps.c View File

@ -63,7 +63,6 @@ static int WIN32_rename(const char *from, const char *to);
DEFINE_STACK_OF(CONF)
DEFINE_STACK_OF(CONF_VALUE)
DEFINE_STACK_OF_STRING()
typedef struct {
const char *name;


+ 0
- 2
apps/lib/names.c View File

@ -12,8 +12,6 @@
#include <openssl/safestack.h>
#include "names.h"
DEFINE_STACK_OF_CSTRING()
#ifdef _WIN32
# define strcasecmp _stricmp
#endif


+ 0
- 2
apps/lib/s_cb.c View File

@ -26,8 +26,6 @@
#define COOKIE_SECRET_LENGTH 16
DEFINE_STACK_OF_STRING()
VERIFY_CB_ARGS verify_args = { -1, 0, X509_V_OK, 0 };
#ifndef OPENSSL_NO_SOCK


+ 0
- 2
apps/list.c View File

@ -25,8 +25,6 @@
#include "opt.h"
#include "names.h"
DEFINE_STACK_OF_CSTRING()
static int verbose = 0;
static void legacy_cipher_fn(const EVP_CIPHER *c,


+ 0
- 2
apps/mac.c View File

@ -16,8 +16,6 @@
#include <openssl/evp.h>
#include <openssl/params.h>
DEFINE_STACK_OF_STRING()
#undef BUFSIZE
#define BUFSIZE 1024*8


+ 0
- 1
apps/ocsp.c View File

@ -35,7 +35,6 @@
DEFINE_STACK_OF(OCSP_CERTID)
DEFINE_STACK_OF(CONF_VALUE)
DEFINE_STACK_OF_STRING()
#if defined(__TANDEM)
# if defined(OPENSSL_TANDEM_FLOSS)


+ 0
- 1
apps/pkcs12.c View File

@ -22,7 +22,6 @@
DEFINE_STACK_OF(PKCS7)
DEFINE_STACK_OF(PKCS12_SAFEBAG)
DEFINE_STACK_OF_STRING()
#define NOKEYS 0x1
#define NOCERTS 0x2


+ 0
- 2
apps/pkeyutl.c View File

@ -15,8 +15,6 @@
#include <openssl/evp.h>
#include <sys/stat.h>
DEFINE_STACK_OF_STRING()
#define KEY_NONE 0
#define KEY_PRIVKEY 1
#define KEY_PUBKEY 2


+ 0
- 2
apps/provider.c View File

@ -24,8 +24,6 @@
# include <string.h> /* memset */
#endif
DEFINE_STACK_OF_CSTRING()
typedef enum OPTION_choice {
OPT_ERR = -1, OPT_EOF = 0, OPT_HELP,
OPT_V = 100, OPT_VV, OPT_VVV


+ 0
- 2
apps/rehash.c View File

@ -42,8 +42,6 @@
# include <openssl/pem.h>
# include <openssl/x509.h>
DEFINE_STACK_OF_STRING()
# ifndef PATH_MAX
# define PATH_MAX 4096
# endif


+ 0
- 1
apps/req.c View File

@ -36,7 +36,6 @@
#endif
DEFINE_STACK_OF(CONF_VALUE)
DEFINE_STACK_OF_STRING()
#define BITS "default_bits"
#define KEYFILE "default_keyfile"


+ 0
- 1
apps/s_client.c View File

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


+ 0
- 2
apps/s_server.c View File

@ -60,8 +60,6 @@ typedef unsigned int u_int;
#endif
#include "internal/sockets.h"
DEFINE_STACK_OF_STRING()
static int not_resumable_sess_cb(SSL *s, int is_forward_secure);
static int sv_body(int s, int stype, int prot, unsigned char *context);
static int www_body(int s, int stype, int prot, unsigned char *context);


+ 0
- 2
apps/smime.c View File

@ -19,8 +19,6 @@
#include <openssl/x509_vfy.h>
#include <openssl/x509v3.h>
DEFINE_STACK_OF_STRING()
static int save_certs(char *signerfile, STACK_OF(X509) *signers);
static int smime_cb(int ok, X509_STORE_CTX *ctx);


+ 0
- 2
apps/verify.c View File

@ -18,8 +18,6 @@
#include <openssl/x509v3.h>
#include <openssl/pem.h>
DEFINE_STACK_OF_STRING()
static int cb(int ok, X509_STORE_CTX *ctx);
static int check(X509_STORE *ctx, const char *file,
STACK_OF(X509) *uchain, STACK_OF(X509) *tchain,


+ 0
- 1
apps/x509.c View File

@ -29,7 +29,6 @@
#endif
DEFINE_STACK_OF(ASN1_OBJECT)
DEFINE_STACK_OF_STRING()
#undef POSTFIX
#define POSTFIX ".srl"


+ 2
- 0
build.info View File

@ -15,6 +15,7 @@ DEPEND[libssl]=libcrypto
# unconditionally before anything else.
DEPEND[]=include/openssl/configuration.h include/openssl/opensslv.h \
include/openssl/fipskey.h \
include/openssl/safestack.h \
include/openssl/ssl.h \
include/openssl/x509.h \
include/openssl/x509v3.h \
@ -24,6 +25,7 @@ DEPEND[]=include/openssl/configuration.h include/openssl/opensslv.h \
GENERATE[include/openssl/configuration.h]=include/openssl/configuration.h.in
GENERATE[include/openssl/opensslv.h]=include/openssl/opensslv.h.in
GENERATE[include/openssl/fipskey.h]=include/openssl/fipskey.h.in
GENERATE[include/openssl/safestack.h]=include/openssl/safestack.h.in
GENERATE[include/openssl/ssl.h]=include/openssl/ssl.h.in
GENERATE[include/openssl/x509.h]=include/openssl/x509.h.in
GENERATE[include/openssl/x509v3.h]=include/openssl/x509v3.h.in


+ 0
- 2
crypto/encode_decode/decoder_pkey.c View File

@ -187,8 +187,6 @@ static void decoder_clean_EVP_PKEY_construct_arg(void *construct_data)
}
}
DEFINE_STACK_OF_CSTRING()
struct collected_data_st {
struct decoder_EVP_PKEY_data_st *process_data;
STACK_OF(OPENSSL_CSTRING) *names;


+ 0
- 2
crypto/encode_decode/encoder_pkey.c View File

@ -18,8 +18,6 @@
#include "crypto/evp.h"
#include "encoder_local.h"
DEFINE_STACK_OF_CSTRING()
int OSSL_ENCODER_CTX_set_cipher(OSSL_ENCODER_CTX *ctx,
const char *cipher_name,
const char *propquery)


+ 0
- 2
crypto/engine/eng_dyn.c View File

@ -20,8 +20,6 @@
* prototypes.
*/
DEFINE_STACK_OF_STRING()
/* Our ENGINE handlers */
static int dynamic_init(ENGINE *e);
static int dynamic_finish(ENGINE *e);


+ 0
- 2
crypto/x509/by_store.c View File

@ -12,8 +12,6 @@
#include "crypto/x509.h"
#include "x509_local.h"
DEFINE_STACK_OF_STRING()
/* Generic object loader, given expected type and criterion */
static int cache_objects(X509_LOOKUP *lctx, const char *uri,
const OSSL_STORE_SEARCH *criterion,


+ 0
- 1
crypto/x509/v3_utl.c View File

@ -22,7 +22,6 @@
#include "x509_local.h"
DEFINE_STACK_OF(CONF_VALUE)
DEFINE_STACK_OF_STRING()
static char *strip_spaces(char *name);
static int sk_strcmp(const char *const *a, const char *const *b);


+ 0
- 2
crypto/x509/x509_vfy.c View File

@ -25,8 +25,6 @@
#include "crypto/x509.h"
#include "x509_local.h"
DEFINE_STACK_OF_STRING()
/* CRL score values */
/* No unhandled critical extensions */


+ 0
- 1
crypto/x509/x509_vpm.c View File

@ -20,7 +20,6 @@
DEFINE_STACK_OF(ASN1_OBJECT)
DEFINE_STACK_OF(X509_VERIFY_PARAM)
DEFINE_STACK_OF_STRING()
/* X509_VERIFY_PARAM functions */


include/openssl/safestack.h → include/openssl/safestack.h.in View File


+ 0
- 1
test/confdump.c View File

@ -15,7 +15,6 @@
#include <openssl/err.h>
DEFINE_STACK_OF(CONF_VALUE)
DEFINE_STACK_OF_CSTRING()
static STACK_OF(OPENSSL_CSTRING) *section_names = NULL;


+ 0
- 2
test/evp_libctx_test.c View File

@ -31,8 +31,6 @@
#include "crypto/bn_dh.h" /* _bignum_ffdhe2048_p */
#include "../e_os.h" /* strcasecmp */
DEFINE_STACK_OF_CSTRING()
static OPENSSL_CTX *libctx = NULL;
static OSSL_PROVIDER *nullprov = NULL;
static OSSL_PROVIDER *libprov = NULL;


+ 0
- 2
test/evp_test.c View File

@ -27,8 +27,6 @@
#include "testutil.h"
#include "evp_test.h"
DEFINE_STACK_OF_STRING()
#define AAD_NUM 4
typedef struct evp_test_method_st EVP_TEST_METHOD;


+ 0
- 2
test/ssltest_old.c View File

@ -81,8 +81,6 @@
# include <unistd.h>
#endif
DEFINE_STACK_OF_STRING()
static SSL_CTX *s_ctx = NULL;
static SSL_CTX *s_ctx2 = NULL;


+ 16
- 1
util/perl/OpenSSL/stackhash.pm View File

@ -13,7 +13,10 @@ use warnings;
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(generate_stack_macros generate_const_stack_macros);
our @EXPORT_OK = qw(generate_stack_macros generate_const_stack_macros
generate_stack_string_macros
generate_stack_const_string_macros
generate_stack_block_macros);
sub generate_stack_macros_int {
my $nametype = shift;
@ -89,4 +92,16 @@ sub generate_const_stack_macros {
return generate_stack_macros_int($type, "const $type", $type);
}
sub generate_stack_string_macros {
return generate_stack_macros_int("OPENSSL_STRING", "char", "char");
}
sub generate_stack_const_string_macros {
return generate_stack_macros_int("OPENSSL_CSTRING", "const char", "char");
}
sub generate_stack_block_macros {
return generate_stack_macros_int("OPENSSL_BLOCK", "void", "void");
}
1;

Loading…
Cancel
Save