... 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)
replaced with no-ops.
*Rich Salz*
+
+ * Added documentation for the STACK API. OpenSSL only defines the STACK
+ functions where they are used.
+
+ *Rich Salz*
* Introduced a new method type and API, OSSL_SERIALIZER, to
represent generic serializers. An implementation is expected to
includes => [],
lib_cflags => "",
lib_cppflags => "",
- lib_defines => [ 'OPENSSL_BUILDING_OPENSSL' ],
+ lib_defines => [],
thread_scheme => "(unknown)", # Assume we don't know
thread_defines => [],
defines =>
sub {
- my @defs = ();
+ my @defs = ( 'OPENSSL_BUILDING_OPENSSL' );
push @defs, "ZLIB" unless $disabled{zlib};
push @defs, "ZLIB_SHARED" unless $disabled{"zlib-dynamic"};
return [ @defs ];
#include <openssl/pem.h>
#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,
OPT_INFORM, OPT_IN, OPT_OUT, OPT_INDENT, OPT_NOOUT,
#include "apps.h"
#include "progs.h"
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(X509_EXTENSION)
+DEFINE_STACK_OF(CONF_VALUE)
+DEFINE_STACK_OF_STRING()
+
#ifndef W_OK
# define F_OK 0
# define W_OK 2
#include <openssl/err.h>
#include <openssl/ssl.h>
+DEFINE_STACK_OF_CONST(SSL_CIPHER)
+
typedef enum OPTION_choice {
OPT_ERR = -1, OPT_EOF = 0, OPT_HELP,
OPT_STDNAME,
#include <openssl/err.h>
#include <openssl/cmperr.h>
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(OSSL_CMP_ITAV)
+DEFINE_STACK_OF(ASN1_UTF8STRING)
+
/* the context for the CMP mock server */
typedef struct
{
# 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)
+DEFINE_STACK_OF_STRING()
+
static int save_certs(char *signerfile, STACK_OF(X509) *signers);
static int cms_cb(int ok, X509_STORE_CTX *ctx);
static void receipt_request_print(CMS_ContentInfo *cms);
#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);
typedef enum OPTION_choice {
#include <openssl/hmac.h>
#include <ctype.h>
+DEFINE_STACK_OF_STRING()
+
#undef BUFSIZE
#define BUFSIZE 1024*8
#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,
#include "apps.h"
#include "progs.h"
+DEFINE_STACK_OF_STRING()
+
#define BUFSIZE 4096
#define DEFAULT_MAC_NAME "HMAC"
#define DEFAULT_FIPS_SECTION "fips_check_section"
#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,
#define PASS_SOURCE_SIZE_MAX 4
+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)
+DEFINE_STACK_OF_STRING()
+
typedef struct {
const char *name;
unsigned long flag;
#include <openssl/safestack.h>
#include "names.h"
+DEFINE_STACK_OF_CSTRING()
+
#ifdef _WIN32
# define strcasecmp _stricmp
#endif
#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 };
#ifndef OPENSSL_NO_SOCK
#include "opt.h"
#include "names.h"
+DEFINE_STACK_OF_CSTRING()
+
static int verbose = 0;
static void legacy_cipher_fn(const EVP_CIPHER *c,
#include <openssl/evp.h>
#include <openssl/params.h>
+DEFINE_STACK_OF_STRING()
+
#undef BUFSIZE
#define BUFSIZE 1024*8
#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,
#include <openssl/x509v3.h>
#include <openssl/rand.h>
+DEFINE_STACK_OF(OCSP_CERTID)
+DEFINE_STACK_OF(CONF_VALUE)
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF_STRING()
+
#ifndef HAVE_FORK
# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS)
# define HAVE_FORK 0
#include <openssl/pem.h>
#include <openssl/pkcs12.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
#define NOCERTS 0x2
#define INFO 0x4
#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,
#include <openssl/evp.h>
#include <sys/stat.h>
+DEFINE_STACK_OF_STRING()
+
#define KEY_NONE 0
#define KEY_PRIVKEY 1
#define KEY_PUBKEY 2
#include <openssl/core.h>
#include <openssl/core_numbers.h>
+DEFINE_STACK_OF_CSTRING()
+
typedef enum OPTION_choice {
OPT_ERR = -1, OPT_EOF = 0, OPT_HELP,
OPT_V = 100, OPT_VV, OPT_VVV
# include <openssl/pem.h>
# include <openssl/x509.h>
+DEFINE_STACK_OF(X509_INFO)
+DEFINE_STACK_OF_STRING()
# ifndef PATH_MAX
# define PATH_MAX 4096
# include <openssl/dsa.h>
#endif
+DEFINE_STACK_OF(CONF_VALUE)
+DEFINE_STACK_OF_STRING()
#define BITS "default_bits"
#define KEYFILE "default_keyfile"
# endif
#endif
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(X509_CRL)
+DEFINE_STACK_OF(X509_NAME)
+DEFINE_STACK_OF(SCT)
+DEFINE_STACK_OF_STRING()
+
#undef BUFSIZZ
#define BUFSIZZ 1024*8
#define S_CLIENT_IRC_READ_TIMEOUT 8
#endif
#include "internal/sockets.h"
+DEFINE_STACK_OF(X509_EXTENSION)
+DEFINE_STACK_OF(X509_CRL)
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(SSL_CIPHER)
+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);
#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);
static int smime_cb(int ok, X509_STORE_CTX *ctx);
#include <openssl/x509v3.h>
#include <openssl/pem.h>
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(X509_CRL)
+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,
# include <openssl/dsa.h>
#endif
+DEFINE_STACK_OF(ASN1_OBJECT)
+DEFINE_STACK_OF(X509_EXTENSION)
+DEFINE_STACK_OF_STRING()
+
#undef POSTFIX
#define POSTFIX ".srl"
#define DEF_DAYS 30
#include <openssl/asn1.h>
#include <openssl/objects.h>
+DEFINE_STACK_OF(ASN1_STRING_TABLE)
+
static STACK_OF(ASN1_STRING_TABLE) *stable = NULL;
static void st_free(ASN1_STRING_TABLE *tbl);
static int sk_table_cmp(const ASN1_STRING_TABLE *const *a,
#define ASN1_GEN_STR(str,val) {str, sizeof(str) - 1, val}
+DEFINE_STACK_OF(ASN1_TYPE)
+DEFINE_STACK_OF(CONF_VALUE)
+
#define ASN1_FLAG_EXP_MAX 20
/* Maximum number of nested sequences */
#define ASN1_GEN_SEQ_MAX_DEPTH 50
#include <openssl/asn1.h>
#include "asn1_local.h"
+DEFINE_STACK_OF(ASN1_UTF8STRING)
+
static int asn1_get_length(const unsigned char **pp, int *inf, long *rl,
long max);
static void asn1_put_length(unsigned char **pp, int length);
#include "internal/bio.h"
#include "asn1_local.h"
+DEFINE_STACK_OF(BIO)
+DEFINE_STACK_OF(X509_ALGOR)
+
/*
* Generalised MIME like utilities for streaming ASN1. Although many have a
* PKCS7/CMS like flavour others are more general purpose.
#include "crypto/asn1.h"
#include "crypto/objects.h"
+DEFINE_STACK_OF(CONF_VALUE)
+
/* Simple ASN1 OID module: add all objects in a given section */
static int do_create(const char *value, const char *name);
#include <openssl/conf.h>
#include <openssl/x509v3.h>
+DEFINE_STACK_OF(CONF_VALUE)
/* Multi string module: add table entries from a given section */
static int do_tcreate(const char *value, const char *name);
#include "crypto/asn1.h"
#include "crypto/evp.h"
+DEFINE_STACK_OF(ASN1_TYPE)
EVP_PKEY *d2i_PrivateKey_ex(int type, EVP_PKEY **a, const unsigned char **pp,
long length, OPENSSL_CTX *libctx, const char *propq)
{
#include "internal/numbers.h"
#include "asn1_local.h"
+DEFINE_STACK_OF(ASN1_VALUE)
/*
* Constructed types with a recursive definition (such as can be found in PKCS7)
#include <openssl/objects.h>
#include "asn1_local.h"
+DEFINE_STACK_OF(ASN1_VALUE)
+
/* Free up an ASN1 structure */
void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it)
#include <string.h>
#include "asn1_local.h"
+DEFINE_STACK_OF(ASN1_VALUE)
+
static int asn1_item_embed_new(ASN1_VALUE **pval, const ASN1_ITEM *it,
int embed);
static int asn1_primitive_new(ASN1_VALUE **pval, const ASN1_ITEM *it,
#include <openssl/cmp.h>
#include <openssl/crmf.h>
+DEFINE_STACK_OF(OSSL_CMP_ITAV)
+
/* ASN.1 declarations from RFC4210 */
ASN1_SEQUENCE(OSSL_CMP_REVANNCONTENT) = {
/* OSSL_CMP_PKISTATUS is effectively ASN1_INTEGER so it is used directly */
#include "openssl/cmp_util.h"
+DEFINE_STACK_OF(ASN1_UTF8STRING)
+DEFINE_STACK_OF(X509_CRL)
+DEFINE_STACK_OF(OSSL_CMP_CERTRESPONSE)
+DEFINE_STACK_OF(OSSL_CMP_PKISI)
+DEFINE_STACK_OF(OSSL_CRMF_CERTID)
+
#define IS_CREP(t) ((t) == OSSL_CMP_PKIBODY_IP || (t) == OSSL_CMP_PKIBODY_CP \
|| (t) == OSSL_CMP_PKIBODY_KUP)
#include <openssl/crmf.h>
#include <openssl/err.h>
-/* Get current certificate store containing trusted root CA certs */
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(X509_EXTENSION)
+DEFINE_STACK_OF(POLICYINFO)
+DEFINE_STACK_OF(ASN1_UTF8STRING)
+DEFINE_STACK_OF(GENERAL_NAME)
+DEFINE_STACK_OF(OSSL_CMP_ITAV)
+
+/*
+ * Get current certificate store containing trusted root CA certs
+ */
X509_STORE *OSSL_CMP_CTX_get0_trustedStore(const OSSL_CMP_CTX *ctx)
{
if (ctx == NULL) {
#include <openssl/cmp.h>
#include <openssl/err.h>
+DEFINE_STACK_OF(ASN1_UTF8STRING)
+DEFINE_STACK_OF(OSSL_CMP_ITAV)
+
int ossl_cmp_hdr_set_pvno(OSSL_CMP_PKIHEADER *hdr, int pvno)
{
if (!ossl_assert(hdr != NULL))
#include <openssl/cmp.h>
#include <openssl/err.h>
+DEFINE_STACK_OF(CONF_VALUE)
+
/*
* Send the PKIMessage req and on success return the response, else NULL.
* Any previous error queue entries will likely be removed by ERR_clear_error().
#include <openssl/err.h>
#include <openssl/x509.h>
+DEFINE_STACK_OF(OSSL_CMP_CERTSTATUS)
+DEFINE_STACK_OF(OSSL_CMP_ITAV)
+DEFINE_STACK_OF(GENERAL_NAME)
+DEFINE_STACK_OF(X509_EXTENSION)
+DEFINE_STACK_OF(OSSL_CMP_PKISI)
+DEFINE_STACK_OF(OSSL_CRMF_MSG)
+DEFINE_STACK_OF(OSSL_CMP_CERTRESPONSE)
+DEFINE_STACK_OF(OSSL_CRMF_CERTID)
+DEFINE_STACK_OF(ASN1_UTF8STRING)
+
OSSL_CMP_PKIHEADER *OSSL_CMP_MSG_get0_header(const OSSL_CMP_MSG *msg)
{
if (msg == NULL) {
#include <openssl/err.h>
#include <openssl/x509.h>
+DEFINE_STACK_OF(X509)
+
/*
* This function is also used for verification from cmp_vfy.
*
#include <openssl/cmp.h>
#include <openssl/err.h>
+DEFINE_STACK_OF(OSSL_CRMF_MSG)
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(OSSL_CMP_ITAV)
+DEFINE_STACK_OF(OSSL_CMP_CERTSTATUS)
+
/* the context for the generic CMP server */
struct ossl_cmp_srv_ctx_st
{
#include <openssl/x509.h>
#include <openssl/asn1err.h> /* for ASN1_R_TOO_SMALL and ASN1_R_TOO_LARGE */
+DEFINE_STACK_OF(ASN1_UTF8STRING)
+
/* CMP functions related to PKIStatus */
int ossl_cmp_pkisi_get_status(const OSSL_CMP_PKISI *si)
#include <openssl/err.h> /* should be implied by cmperr.h */
#include <openssl/x509v3.h>
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(X509_OBJECT)
+DEFINE_STACK_OF(ASN1_UTF8STRING)
+
/*
* use trace API for CMP-specific logging, prefixed by "CMP " and severity
*/
#include <openssl/x509.h>
#include "crypto/x509.h"
+DEFINE_STACK_OF(X509)
+
/*
* Verify a message protected by signature according to section 5.1.3.3
* (sha1+RSA/DSA or any other algorithm supported by OpenSSL).
#include "crypto/asn1.h"
#include "crypto/evp.h"
+DEFINE_STACK_OF(CMS_RecipientInfo)
+DEFINE_STACK_OF(CMS_RevocationInfoChoice)
+DEFINE_STACK_OF(X509_ATTRIBUTE)
+
/* CMS EnvelopedData Utilities */
static void cms_env_set_version(CMS_EnvelopedData *env);
#include "crypto/ess.h"
#include "crypto/cms.h"
+DEFINE_STACK_OF(GENERAL_NAMES)
+DEFINE_STACK_OF(CMS_SignerInfo)
+
IMPLEMENT_ASN1_FUNCTIONS(CMS_ReceiptRequest)
/* ESS services */
#include "cms_local.h"
#include "crypto/asn1.h"
+DEFINE_STACK_OF(CMS_RecipientEncryptedKey)
+
/* Key Agreement Recipient Info (KARI) routines */
int CMS_RecipientInfo_kari_get0_alg(CMS_RecipientInfo *ri,
#include <openssl/cms.h>
#include "cms_local.h"
+DEFINE_STACK_OF(CMS_RevocationInfoChoice)
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(X509_CRL)
+
IMPLEMENT_ASN1_FUNCTIONS(CMS_ContentInfo)
IMPLEMENT_ASN1_PRINT_FUNCTION(CMS_ContentInfo)
#include "cms_local.h"
#include "crypto/asn1.h"
+DEFINE_STACK_OF(CMS_RecipientInfo)
+
int CMS_RecipientInfo_set0_password(CMS_RecipientInfo *ri,
unsigned char *pass, ossl_ssize_t passlen)
{
#include "crypto/cms.h"
#include "crypto/ess.h"
+DEFINE_STACK_OF(CMS_RevocationInfoChoice)
+DEFINE_STACK_OF(CMS_SignerInfo)
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(X509_ALGOR)
+DEFINE_STACK_OF(X509_ATTRIBUTE)
+
/* CMS SignedData Utilities */
static CMS_SignedData *cms_get0_signed(CMS_ContentInfo *cms)
#include "cms_local.h"
#include "crypto/asn1.h"
+DEFINE_STACK_OF(CMS_SignerInfo)
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(X509_CRL)
+DEFINE_STACK_OF(CMS_RecipientEncryptedKey)
+DEFINE_STACK_OF(CMS_RecipientInfo)
+
static BIO *cms_get_text_bio(BIO *out, unsigned int flags)
{
BIO *rbio;
#include <openssl/conf.h>
#include <openssl/conf_api.h>
+DEFINE_STACK_OF(CONF_VALUE)
+
static void value_free_hash(const CONF_VALUE *a, LHASH_OF(CONF_VALUE) *conf);
static void value_free_stack_doall(CONF_VALUE *a);
# endif
#endif
+DEFINE_STACK_OF(BIO)
+
#ifndef S_ISDIR
# define S_ISDIR(a) (((a) & S_IFMT) == S_IFDIR)
#endif
#include <openssl/trace.h>
#include <openssl/engine.h>
+DEFINE_STACK_OF(CONF_VALUE)
+DEFINE_STACK_OF(CONF_MODULE)
+DEFINE_STACK_OF(CONF_IMODULE)
+
#define DSO_mod_init_name "OPENSSL_init"
#define DSO_mod_finish_name "OPENSSL_finish"
#include "internal/sslconf.h"
#include "conf_local.h"
+DEFINE_STACK_OF(CONF_VALUE)
+
/*
* SSL library configuration module placeholder. We load it here but defer
* all decisions about its contents to libssl.
#include <openssl/err.h>
#include <openssl/evp.h>
+DEFINE_STACK_OF(X509_EXTENSION)
+DEFINE_STACK_OF(OSSL_CRMF_MSG)
+
/*-
* atyp = Attribute Type
* valt = Value Type
#include "internal/cryptlib.h"
+DEFINE_STACK_OF(CTLOG)
+
/*
* Information about a CT log server.
*/
#include "ct_local.h"
+DEFINE_STACK_OF(SCT)
+
int o2i_SCT_signature(SCT *sct, const unsigned char **in, size_t len)
{
size_t siglen;
#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);
#include "ct_local.h"
+DEFINE_STACK_OF(SCT)
+
SCT *SCT_new(void)
{
SCT *sct = OPENSSL_zalloc(sizeof(*sct));
#include "ct_local.h"
+DEFINE_STACK_OF(SCT)
+
static char *i2s_poison(const X509V3_EXT_METHOD *method, void *val)
{
return OPENSSL_strdup("NULL");
#include "dso_local.h"
#include "e_os.h"
+DEFINE_STACK_OF(void)
+
#ifdef DSO_DLFCN
# ifdef HAVE_DLFCN_H
#include "dso_local.h"
#include "internal/refcount.h"
+DEFINE_STACK_OF(void)
+
static DSO_METHOD *default_DSO_meth = NULL;
static DSO *DSO_new_method(DSO_METHOD *meth)
static const char *openssl_strnchr(const char *string, int c, size_t len);
+DEFINE_STACK_OF(void)
+
static DSO_METHOD dso_meth_win32 = {
"OpenSSL 'win32' shared library method",
win32_load,
#include <openssl/conf.h>
#include <openssl/trace.h>
+DEFINE_STACK_OF(CONF_VALUE)
+
/* ENGINE config module */
static const char *skip_dot(const char *name)
* prototypes.
*/
+DEFINE_STACK_OF_STRING()
+
/* Our ENGINE handlers */
static int dynamic_init(ENGINE *e);
static int dynamic_finish(ENGINE *e);
#include <openssl/ess.h>
#include "crypto/ess.h"
+DEFINE_STACK_OF(ESS_CERT_ID)
+DEFINE_STACK_OF(ESS_CERT_ID_V2)
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(GENERAL_NAME)
+
static ESS_CERT_ID *ESS_CERT_ID_new_init(X509 *cert, int issuer_needed);
static ESS_CERT_ID_V2 *ESS_CERT_ID_V2_new_init(const EVP_MD *hash_alg,
X509 *cert, int issuer_needed);
#include <openssl/x509v3.h>
#include <openssl/trace.h>
+DEFINE_STACK_OF(CONF_VALUE)
+
/* Algorithm configuration module. */
/* TODO(3.0): the config module functions should be passed a library context */
#include "internal/evp.h"
#include "internal/provider.h"
#include "evp_local.h"
+DEFINE_STACK_OF(X509_ATTRIBUTE)
#include "crypto/ec.h"
#include "crypto/cryptlib.h"
#include "internal/thread_once.h"
+DEFINE_STACK_OF(void)
+
int do_ex_data_init(OPENSSL_CTX *ctx)
{
OSSL_EX_DATA_GLOBAL *global = openssl_ctx_get_ex_data_global(ctx);
#include "http_local.h"
+DEFINE_STACK_OF(CONF_VALUE)
+
#define HTTP_PREFIX "HTTP/"
#define HTTP_VERSION_PATT "1." /* allow 1.x */
#define HTTP_VERSION_STR_LEN 3
#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.
#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 */
#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, "");
#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.
#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);
# include <openssl/x509v3.h>
# include "../x509/ext_dat.h"
+DEFINE_STACK_OF(ACCESS_DESCRIPTION)
+
/*
* OCSP extensions and a couple of CRL entry extensions
*/
#include <openssl/rsa.h>
#include <openssl/dsa.h>
+DEFINE_STACK_OF(X509_INFO)
+
#ifndef OPENSSL_NO_STDIO
STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk,
pem_password_cb *cb, void *u)
#include <openssl/pkcs12.h>
#include "p12_local.h"
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(PKCS7)
+DEFINE_STACK_OF(PKCS12_SAFEBAG)
+
static int pkcs12_add_bag(STACK_OF(PKCS12_SAFEBAG) **pbags,
PKCS12_SAFEBAG *bag);
#include "internal/cryptlib.h"
#include <openssl/pkcs12.h>
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(PKCS7)
+DEFINE_STACK_OF(PKCS12_SAFEBAG)
+
/* Simplified PKCS#12 routines */
static int parse_pk12(PKCS12 *p12, const char *pass, int passlen,
#include <openssl/pkcs12.h>
#include "p12_local.h"
+DEFINE_STACK_OF(PKCS7)
+DEFINE_STACK_OF(PKCS12_SAFEBAG)
+
/* PKCS#12 password change routine */
static int newpass_p12(PKCS12 *p12, const char *oldpass, const char *newpass);
#include <openssl/x509.h>
#include <openssl/err.h>
+DEFINE_STACK_OF(X509_ALGOR)
+
int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si,
STACK_OF(X509_ALGOR) *cap)
{
#include <openssl/x509v3.h>
#include <openssl/err.h>
+DEFINE_STACK_OF(X509_ALGOR)
+DEFINE_STACK_OF(X509_ATTRIBUTE)
+DEFINE_STACK_OF(PKCS7_RECIP_INFO)
+DEFINE_STACK_OF(PKCS7_SIGNER_INFO)
+
static int add_attribute(STACK_OF(X509_ATTRIBUTE) **sk, int nid, int atrtype,
void *value);
static ASN1_TYPE *get_attribute(STACK_OF(X509_ATTRIBUTE) *sk, int nid);
#include "crypto/asn1.h"
#include "crypto/evp.h"
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(X509_CRL)
+DEFINE_STACK_OF(X509_ALGOR)
+DEFINE_STACK_OF(PKCS7_RECIP_INFO)
+DEFINE_STACK_OF(PKCS7_SIGNER_INFO)
+
long PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg)
{
int nid;
#include <openssl/x509.h>
#include <openssl/x509v3.h>
-
#define BUFFERSIZE 4096
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(X509_ATTRIBUTE)
+DEFINE_STACK_OF(X509_ALGOR)
+DEFINE_STACK_OF(PKCS7_SIGNER_INFO)
+
static int pkcs7_copy_existing_digest(PKCS7 *p7, PKCS7_SIGNER_INFO *si);
PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
#include <openssl/safestack.h>
#include "internal/provider.h"
+DEFINE_STACK_OF(OSSL_PROVIDER)
+DEFINE_STACK_OF(CONF_VALUE)
+
/* PROVIDER config module */
-DEFINE_STACK_OF(OSSL_PROVIDER)
static STACK_OF(OSSL_PROVIDER) *activated_providers = NULL;
static const char *skip_dot(const char *name)
# define SRP_RANDOM_SALT_LEN 20
# define MAX_LEN 2500
+DEFINE_STACK_OF(SRP_user_pwd)
+DEFINE_STACK_OF(SRP_gN_cache)
+DEFINE_STACK_OF(SRP_gN)
+
/*
* Note that SRP uses its own variant of base 64 encoding. A different base64
* alphabet is used and no padding '=' characters are added. Instead we pad to
#include "crypto/evp.h"
#include "store_local.h"
+DEFINE_STACK_OF(X509)
+
#ifdef _WIN32
# define stat _stat
#endif
#include <openssl/engine.h>
#include <openssl/ts.h>
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(X509_INFO)
+DEFINE_STACK_OF(CONF_VALUE)
+
/* Macro definitions for the configuration file. */
#define BASE_SECTION "tsa"
#define ENV_DEFAULT_TSA "default_tsa"
#include <openssl/ts.h>
#include "ts_local.h"
+DEFINE_STACK_OF(X509_EXTENSION)
+
int TS_REQ_set_version(TS_REQ *a, long version)
{
return ASN1_INTEGER_set(a->version, version);
#include <openssl/ts.h>
#include "ts_local.h"
+DEFINE_STACK_OF(ASN1_UTF8STRING)
+DEFINE_STACK_OF(CONF_VALUE)
+
struct status_map_st {
int bit;
const char *text;
#include "ts_local.h"
#include "crypto/ess.h"
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(X509_EXTENSION)
+DEFINE_STACK_OF(ASN1_UTF8STRING)
+DEFINE_STACK_OF(ASN1_OBJECT)
+DEFINE_STACK_OF_CONST(EVP_MD)
+
static ASN1_INTEGER *def_serial_cb(struct TS_resp_ctx *, void *);
static int def_time_cb(struct TS_resp_ctx *, void *, long *sec, long *usec);
static int def_extension_cb(struct TS_resp_ctx *, X509_EXTENSION *, void *);
#include <openssl/pkcs7.h>
#include "ts_local.h"
+DEFINE_STACK_OF(X509_EXTENSION)
+
int TS_RESP_set_status_info(TS_RESP *a, TS_STATUS_INFO *status_info)
{
TS_STATUS_INFO *new_status_info;
#include "ts_local.h"
#include "crypto/ess.h"
+DEFINE_STACK_OF(PKCS7_SIGNER_INFO)
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(ESS_CERT_ID)
+DEFINE_STACK_OF(ESS_CERT_ID_V2)
+DEFINE_STACK_OF(ASN1_UTF8STRING)
+DEFINE_STACK_OF(GENERAL_NAME)
+
static int ts_verify_cert(X509_STORE *store, STACK_OF(X509) *untrusted,
X509 *signer, STACK_OF(X509) **chain);
static int ts_check_signing_certs(PKCS7_SIGNER_INFO *si,
#include <openssl/ts.h>
#include "ts_local.h"
+DEFINE_STACK_OF(X509)
+
TS_VERIFY_CTX *TS_VERIFY_CTX_new(void)
{
TS_VERIFY_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
#include <openssl/err.h>
#include "ui_local.h"
+DEFINE_STACK_OF(UI_STRING)
+
UI *UI_new(void)
{
return UI_new_method(NULL);
#include "crypto/x509.h"
#include "x509_local.h"
+DEFINE_STACK_OF(X509_OBJECT)
+
struct lookup_dir_hashes_st {
unsigned long hash;
int suffix;
#include <openssl/pem.h>
#include "x509_local.h"
+DEFINE_STACK_OF(X509_INFO)
+
static int by_file_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
long argl, char **ret);
static X509_LOOKUP_METHOD x509_file_lookup = {
#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,
#include "pcy_local.h"
+DEFINE_STACK_OF(POLICYINFO)
+
static int policy_data_cmp(const X509_POLICY_DATA *const *a,
const X509_POLICY_DATA *const *b);
static int policy_cache_set_int(long *out, ASN1_INTEGER *value);
#include "pcy_local.h"
+DEFINE_STACK_OF(ASN1_OBJECT)
+DEFINE_STACK_OF(POLICYQUALINFO)
+
/* Policy Node routines */
void policy_data_free(X509_POLICY_DATA *data)
#include "pcy_local.h"
+DEFINE_STACK_OF(X509_POLICY_NODE)
+
/* accessor functions */
/* X509_POLICY_TREE stuff */
#include "pcy_local.h"
+DEFINE_STACK_OF(POLICY_MAPPING)
+DEFINE_STACK_OF(ASN1_OBJECT)
+
/*
* Set policy mapping entries in cache. Note: this modifies the passed
* POLICY_MAPPINGS structure
#include "pcy_local.h"
+DEFINE_STACK_OF(X509_POLICY_NODE)
+DEFINE_STACK_OF(ASN1_OBJECT)
+
static int node_cmp(const X509_POLICY_NODE *const *a,
const X509_POLICY_NODE *const *b)
{
#include "pcy_local.h"
+DEFINE_STACK_OF(ASN1_OBJECT)
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(X509_POLICY_NODE)
+
static void expected_print(BIO *channel,
X509_POLICY_LEVEL *lev, X509_POLICY_NODE *node,
int indent)
#include <openssl/x509.h>
#include <openssl/x509v3.h>
+DEFINE_STACK_OF(X509_REVOKED)
+
#ifndef OPENSSL_NO_STDIO
int X509_CRL_print_fp(FILE *fp, X509_CRL *x)
{
#include <openssl/rsa.h>
#include <openssl/dsa.h>
+DEFINE_STACK_OF(X509_EXTENSION)
+
#ifndef OPENSSL_NO_STDIO
int X509_REQ_print_fp(FILE *fp, X509_REQ *x)
{
#include "crypto/asn1.h"
#include "crypto/x509.h"
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(ASN1_OBJECT)
+
#ifndef OPENSSL_NO_STDIO
int X509_print_fp(FILE *fp, X509 *x)
{
#ifndef OPENSSL_NO_RFC3779
+DEFINE_STACK_OF(IPAddressOrRange)
+DEFINE_STACK_OF(IPAddressFamily)
+DEFINE_STACK_OF(CONF_VALUE)
+DEFINE_STACK_OF(X509)
+
/*
* OpenSSL ASN.1 template translation of RFC 3779 2.2.3.
*/
#include "v3_admis.h"
#include "ext_dat.h"
+DEFINE_STACK_OF(ADMISSIONS)
+DEFINE_STACK_OF(PROFESSION_INFO)
+DEFINE_STACK_OF(ASN1_STRING)
+DEFINE_STACK_OF(ASN1_OBJECT)
ASN1_SEQUENCE(NAMING_AUTHORITY) = {
ASN1_OPT(NAMING_AUTHORITY, namingAuthorityId, ASN1_OBJECT),
#include <openssl/x509v3.h>
#include "ext_dat.h"
+DEFINE_STACK_OF(CONF_VALUE)
+DEFINE_STACK_OF(GENERAL_NAME)
+
static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_KEYID(X509V3_EXT_METHOD *method,
AUTHORITY_KEYID *akeyid,
STACK_OF(CONF_VALUE)
#include <openssl/x509v3.h>
#include "ext_dat.h"
+DEFINE_STACK_OF(CONF_VALUE)
+DEFINE_STACK_OF(GENERAL_NAME)
+
static GENERAL_NAMES *v2i_subject_alt(X509V3_EXT_METHOD *method,
X509V3_CTX *ctx,
STACK_OF(CONF_VALUE) *nval);
IMPLEMENT_ASN1_FUNCTIONS(ASIdentifierChoice)
IMPLEMENT_ASN1_FUNCTIONS(ASIdentifiers)
+DEFINE_STACK_OF(ASIdOrRange)
+DEFINE_STACK_OF(CONF_VALUE)
+DEFINE_STACK_OF(X509)
+
/*
* i2r method for an ASIdentifierChoice.
*/
#include <openssl/x509v3.h>
#include "ext_dat.h"
+DEFINE_STACK_OF(CONF_VALUE)
+
static STACK_OF(CONF_VALUE) *i2v_BASIC_CONSTRAINTS(X509V3_EXT_METHOD *method,
BASIC_CONSTRAINTS *bcons,
STACK_OF(CONF_VALUE)
#include <openssl/x509v3.h>
#include "ext_dat.h"
+DEFINE_STACK_OF(CONF_VALUE)
+
static BIT_STRING_BITNAME ns_cert_type_table[] = {
{0, "SSL Client", "client"},
{1, "SSL Server", "server"},
#include "crypto/x509.h"
#include <openssl/x509v3.h>
+DEFINE_STACK_OF(CONF_VALUE)
+DEFINE_STACK_OF(X509_EXTENSION)
+
static int v3_check_critical(const char **value);
static int v3_check_generic(const char **value);
static X509_EXTENSION *do_ext_nconf(CONF *conf, X509V3_CTX *ctx, int ext_nid,
#include "pcy_local.h"
#include "ext_dat.h"
+DEFINE_STACK_OF(CONF_VALUE)
+DEFINE_STACK_OF(POLICYINFO)
+DEFINE_STACK_OF(POLICYQUALINFO)
+DEFINE_STACK_OF(ASN1_INTEGER)
+
/* Certificate policies extension support: this one is a bit complex... */
static int i2r_certpol(X509V3_EXT_METHOD *method, STACK_OF(POLICYINFO) *pol,
#include "crypto/x509.h"
#include "ext_dat.h"
+DEFINE_STACK_OF(CONF_VALUE)
+DEFINE_STACK_OF(GENERAL_NAME)
+DEFINE_STACK_OF(DIST_POINT)
+DEFINE_STACK_OF(X509_NAME_ENTRY)
+
static void *v2i_crld(const X509V3_EXT_METHOD *method,
X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval);
static int i2r_crldp(const X509V3_EXT_METHOD *method, void *pcrldp, BIO *out,
#include <openssl/x509v3.h>
#include "ext_dat.h"
+DEFINE_STACK_OF(ASN1_OBJECT)
+DEFINE_STACK_OF(CONF_VALUE)
+
static void *v2i_EXTENDED_KEY_USAGE(const X509V3_EXT_METHOD *method,
X509V3_CTX *ctx,
STACK_OF(CONF_VALUE) *nval);
#include <openssl/x509v3.h>
#include "ext_dat.h"
+DEFINE_STACK_OF(ACCESS_DESCRIPTION)
+DEFINE_STACK_OF(CONF_VALUE)
+
static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD
*method, AUTHORITY_INFO_ACCESS
*ainfo, STACK_OF(CONF_VALUE)
#include <openssl/x509v3.h>
#include "ext_dat.h"
+DEFINE_STACK_OF(CONF_VALUE)
+
/*
* Issuer Sign Tool (1.2.643.100.112) The name of the tool used to signs the subject (ASN1_SEQUENCE)
* This extention is required to obtain the status of a qualified certificate at Russian Federation.
#include "ext_dat.h"
+DEFINE_STACK_OF(X509V3_EXT_METHOD)
+DEFINE_STACK_OF(X509_EXTENSION)
+
static STACK_OF(X509V3_EXT_METHOD) *ext_list = NULL;
static int ext_cmp(const X509V3_EXT_METHOD *const *a,
#include "crypto/x509.h"
#include "ext_dat.h"
+DEFINE_STACK_OF(CONF_VALUE)
+DEFINE_STACK_OF(GENERAL_NAME)
+DEFINE_STACK_OF(GENERAL_SUBTREE)
+
static void *v2i_NAME_CONSTRAINTS(const X509V3_EXT_METHOD *method,
X509V3_CTX *ctx,
STACK_OF(CONF_VALUE) *nval);
#include <openssl/x509v3.h>
#include "ext_dat.h"
+DEFINE_STACK_OF(CONF_VALUE)
+
static int i2r_pci(X509V3_EXT_METHOD *method, PROXY_CERT_INFO_EXTENSION *ext,
BIO *out, int indent);
static PROXY_CERT_INFO_EXTENSION *r2i_pci(X509V3_EXT_METHOD *method,
#include <openssl/x509v3.h>
#include "ext_dat.h"
+DEFINE_STACK_OF(CONF_VALUE)
+
static STACK_OF(CONF_VALUE) *i2v_POLICY_CONSTRAINTS(const X509V3_EXT_METHOD
*method, void *bcons, STACK_OF(CONF_VALUE)
*extlist);
#include <openssl/x509v3.h>
#include "ext_dat.h"
+DEFINE_STACK_OF(POLICY_MAPPING)
+DEFINE_STACK_OF(CONF_VALUE)
+
static void *v2i_POLICY_MAPPINGS(const X509V3_EXT_METHOD *method,
X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval);
static STACK_OF(CONF_VALUE) *i2v_POLICY_MAPPINGS(const X509V3_EXT_METHOD
#include <openssl/conf.h>
#include <openssl/x509v3.h>
+DEFINE_STACK_OF(CONF_VALUE)
+DEFINE_STACK_OF(X509_EXTENSION)
+
/* Extension printing routines */
static int unknown_ext_print(BIO *out, const unsigned char *ext, int extlen,
#include "crypto/x509.h"
#include "internal/tsan_assist.h"
+DEFINE_STACK_OF(GENERAL_NAME)
+DEFINE_STACK_OF(DIST_POINT)
+DEFINE_STACK_OF(X509_PURPOSE)
+DEFINE_STACK_OF(ASN1_OBJECT)
+
static int check_ssl_ca(const X509 *x);
static int check_purpose_ssl_client(const X509_PURPOSE *xp, const X509 *x,
int ca);
#include <openssl/x509v3.h>
#include "ext_dat.h"
+DEFINE_STACK_OF(SXNETID)
+DEFINE_STACK_OF(CONF_VALUE)
+
/* Support for Thawte strong extranet extension */
#define SXNET_TEST
#include <openssl/x509v3.h>
#include "ext_dat.h"
+DEFINE_STACK_OF(ASN1_INTEGER)
+DEFINE_STACK_OF(CONF_VALUE)
+
static STACK_OF(CONF_VALUE) *i2v_TLS_FEATURE(const X509V3_EXT_METHOD *method,
TLS_FEATURE *tls_feature,
STACK_OF(CONF_VALUE) *ext_list);
#include <openssl/bn.h>
#include "ext_dat.h"
+DEFINE_STACK_OF(CONF_VALUE)
+DEFINE_STACK_OF(GENERAL_NAME)
+DEFINE_STACK_OF(ACCESS_DESCRIPTION)
+DEFINE_STACK_OF(X509_EXTENSION)
+DEFINE_STACK_OF_STRING()
+
static char *strip_spaces(char *name);
static int sk_strcmp(const char *const *a, const char *const *b);
static STACK_OF(OPENSSL_STRING) *get_email(const X509_NAME *name,
#include <openssl/x509v3.h>
#include "x509_local.h"
+DEFINE_STACK_OF(X509_ATTRIBUTE)
+DEFINE_STACK_OF(ASN1_TYPE)
+
int X509at_get_attr_count(const STACK_OF(X509_ATTRIBUTE) *x)
{
return sk_X509_ATTRIBUTE_num(x);
#include <openssl/core_names.h>
#include "crypto/x509.h"
+DEFINE_STACK_OF(X509)
+
int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b)
{
int i;
#include <openssl/x509v3.h>
#include "x509_local.h"
+DEFINE_STACK_OF(X509_LOOKUP)
+DEFINE_STACK_OF(X509_OBJECT)
+DEFINE_STACK_OF(X509_CRL)
+DEFINE_STACK_OF(X509)
+
X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method)
{
X509_LOOKUP *ret = OPENSSL_zalloc(sizeof(*ret));
#include <openssl/buffer.h>
#include "crypto/x509.h"
+DEFINE_STACK_OF(X509_NAME_ENTRY)
+
/*
* Limit to ensure we don't overflow: much greater than
* anything encountered in practice.
#include <openssl/objects.h>
#include <openssl/buffer.h>
+DEFINE_STACK_OF(X509_ATTRIBUTE)
+
X509 *X509_REQ_to_X509(X509_REQ *r, int days, EVP_PKEY *pkey)
{
X509 *ret = NULL;
#include <openssl/x509v3.h>
#include "crypto/x509.h"
+DEFINE_STACK_OF(X509_TRUST)
+DEFINE_STACK_OF(ASN1_OBJECT)
+
static int tr_cmp(const X509_TRUST *const *a, const X509_TRUST *const *b);
static void trtable_free(X509_TRUST *p);
#include <openssl/x509v3.h>
#include "x509_local.h"
+DEFINE_STACK_OF(X509_EXTENSION)
+
int X509v3_get_ext_count(const STACK_OF(X509_EXTENSION) *x)
{
if (x == NULL)
#include "crypto/x509.h"
#include "x509_local.h"
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(X509_REVOKED)
+DEFINE_STACK_OF(GENERAL_NAME)
+DEFINE_STACK_OF(X509_CRL)
+DEFINE_STACK_OF(DIST_POINT)
+DEFINE_STACK_OF_STRING()
+
/* CRL score values */
/* No unhandled critical extensions */
#include "x509_local.h"
+DEFINE_STACK_OF(ASN1_OBJECT)
+DEFINE_STACK_OF(X509_VERIFY_PARAM)
+DEFINE_STACK_OF_STRING()
+
/* X509_VERIFY_PARAM functions */
#define SET_HOST 0
#include <openssl/x509.h>
#include "crypto/x509.h"
+DEFINE_STACK_OF(X509_REVOKED)
+
int X509_CRL_set_version(X509_CRL *x, long version)
{
if (x == NULL)
#include <openssl/x509.h>
#include "crypto/x509.h"
+DEFINE_STACK_OF(X509_NAME_ENTRY)
+
int X509_NAME_get_text_by_NID(const X509_NAME *name, int nid,
char *buf, int len)
{
#include <openssl/x509.h>
#include "x509_local.h"
+DEFINE_STACK_OF(ASN1_TYPE)
+
/*-
* X509_ATTRIBUTE: this has the following form:
*
#include <openssl/x509v3.h>
#include "x509_local.h"
+DEFINE_STACK_OF(GENERAL_NAME)
+DEFINE_STACK_OF(GENERAL_NAMES)
+DEFINE_STACK_OF(X509_REVOKED)
+DEFINE_STACK_OF(X509_EXTENSION)
+
static int X509_REVOKED_cmp(const X509_REVOKED *const *a,
const X509_REVOKED *const *b);
static int setup_idp(X509_CRL *crl, ISSUING_DIST_POINT *idp);
#include "crypto/asn1.h"
#include "x509_local.h"
+DEFINE_STACK_OF(X509_NAME_ENTRY)
+DEFINE_STACK_OF(ASN1_VALUE)
+
/*
* Maximum length of X509_NAME: much larger than anything we should
* ever see in practice.
#include <openssl/x509.h>
#include "crypto/x509.h"
+DEFINE_STACK_OF(X509_ATTRIBUTE)
+
/*-
* X509_REQ_INFO is handled in an unusual way to get round
* invalid encodings. Some broken certificate requests don't
#include <openssl/x509v3.h>
#include "crypto/x509.h"
+DEFINE_STACK_OF(IPAddressFamily)
+
ASN1_SEQUENCE_enc(X509_CINF, enc, 0) = {
ASN1_EXP_OPT(X509_CINF, version, ASN1_INTEGER, 0),
ASN1_EMBED(X509_CINF, serialNumber, ASN1_INTEGER),
#include <openssl/x509.h>
#include "crypto/x509.h"
+DEFINE_STACK_OF(ASN1_OBJECT)
+
/*
* X509_CERT_AUX routines. These are used to encode additional user
* modifiable data about a certificate. This data is appended to the X509
In the description here, B<I<TYPE>> is used
as a placeholder for any of the OpenSSL datatypes, such as B<X509>.
-STACK_OF() returns the name for a stack of the specified B<I<TYPE>>.
-DEFINE_STACK_OF() creates set of functions for a stack of B<I<TYPE>>. This
-will mean that type B<I<TYPE>> is stored in each stack, the type is referenced by
+The STACK_OF() macro returns the name for a stack of the specified B<I<TYPE>>.
+This is an opaque pointer to a structure declaration.
+This can be used in every header file that references the stack.
+There are several B<DEFINE...> macros that create static inline functions
+for all of the functions described on this page.
+This should normally be used in one source file, and the stack manipulation
+is wrapped with application-specific functions.
+
+DEFINE_STACK_OF() creates set of functions for a stack of B<I<TYPE>> elements.
+The type is referenced by
B<STACK_OF>(B<I<TYPE>>) and each function name begins with B<sk_I<TYPE>_>.
-For example:
-
- TYPE *sk_TYPE_value(STACK_OF(TYPE) *sk, int idx);
-
DEFINE_STACK_OF_CONST() is identical to DEFINE_STACK_OF() except
-each element is constant. For example:
+each element is constant.
+ /* DEFINE_STACK_OF(TYPE) */
+ TYPE *sk_TYPE_value(STACK_OF(TYPE) *sk, int idx);
+ /* DEFINE_STACK_OF_CONST(TYPE) */
const TYPE *sk_TYPE_value(STACK_OF(TYPE) *sk, int idx);
-DEFINE_SPECIAL_STACK_OF() defines a stack of B<I<TYPE>> but
-each function uses B<FUNCNAME> in the function name. For example:
+DEFINE_SPECIAL_STACK_OF() and DEFINE_SPECIAL_STACK_OF_CONST() are similar
+except B<FUNCNAME> is used in the function names:
+ /* DEFINE_SPECIAL_STACK_OF(TYPE, FUNCNAME) */
TYPE *sk_FUNCNAME_value(STACK_OF(TYPE) *sk, int idx);
-
-DEFINE_SPECIAL_STACK_OF_CONST() is similar except that each element is
-constant:
-
+ /* DEFINE_SPECIAL_STACK_OF(TYPE, FUNCNAME) */
const TYPE *sk_FUNCNAME_value(STACK_OF(TYPE) *sk, int idx);
B<sk_I<TYPE>_num>() returns the number of elements in I<sk> or -1 if I<sk> is
# include <openssl/rsa.h>
# include <openssl/dsa.h>
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(X509_NAME)
+
/*
* This module uses several "new" interfaces, among which is
* CertGetCertificateContextProperty. CERT_KEY_PROV_INFO_PROP_ID is
#include "rand.inc"
+DEFINE_STACK_OF(SSL_COMP)
+
/* unused, to avoid warning. */
static int idx;
#include "fuzzer.h"
#include "rand.inc"
+DEFINE_STACK_OF(OSSL_CMP_ITAV)
+
int FuzzerInitialize(int *argc, char ***argv)
{
OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
#include "rand.inc"
+DEFINE_STACK_OF(SSL_COMP)
+
static const uint8_t kCertificateDER[] = {
0x30, 0x82, 0x02, 0xff, 0x30, 0x82, 0x01, 0xe7, 0xa0, 0x03, 0x02, 0x01,
0x02, 0x02, 0x11, 0x00, 0xb1, 0x84, 0xee, 0x34, 0x99, 0x98, 0x76, 0xfb,
# define SMIME_OLDMIME 0x400
# define SMIME_CRLFEOL 0x800
# define SMIME_STREAM 0x1000
- struct X509_algor_st;
-DEFINE_STACK_OF(X509_ALGOR)
+
+DEFINE_OR_DECLARE_STACK_OF(ASN1_GENERALSTRING)
+DEFINE_OR_DECLARE_STACK_OF(ASN1_INTEGER)
+DEFINE_OR_DECLARE_STACK_OF(ASN1_OBJECT)
+DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
+DEFINE_OR_DECLARE_STACK_OF(ASN1_UTF8STRING)
+DEFINE_OR_DECLARE_STACK_OF(X509_ALGOR)
+DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
# define ASN1_STRING_FLAG_BITS_LEFT 0x08/* Set if 0x07 has bits left value */
/*
(B_ASN1_PRINTABLESTRING|B_ASN1_T61STRING|B_ASN1_BMPSTRING|B_ASN1_UTF8STRING)
# define PKCS9STRING_TYPE (DIRSTRING_TYPE|B_ASN1_IA5STRING)
-typedef struct asn1_string_table_st {
+struct asn1_string_table_st {
int nid;
long minsize;
long maxsize;
unsigned long mask;
unsigned long flags;
-} ASN1_STRING_TABLE;
+};
-DEFINE_STACK_OF(ASN1_STRING_TABLE)
/* size limits: this stuff is taken straight from RFC2459 */
ASN1_STRFLGS_DUMP_UNKNOWN | \
ASN1_STRFLGS_DUMP_DER)
-DEFINE_STACK_OF(ASN1_INTEGER)
-
-DEFINE_STACK_OF(ASN1_GENERALSTRING)
-DEFINE_STACK_OF(ASN1_UTF8STRING)
-
-typedef struct asn1_type_st {
+struct asn1_type_st {
int type;
union {
char *ptr;
ASN1_STRING *sequence;
ASN1_VALUE *asn1_value;
} value;
-} ASN1_TYPE;
+};
-DEFINE_STACK_OF(ASN1_TYPE)
typedef STACK_OF(ASN1_TYPE) ASN1_SEQUENCE_ANY;
void *ASN1_TYPE_unpack_sequence(const ASN1_ITEM *it, const ASN1_TYPE *t);
DECLARE_ASN1_FUNCTIONS(ASN1_OBJECT)
-DEFINE_STACK_OF(ASN1_OBJECT)
ASN1_STRING *ASN1_STRING_new(void);
void ASN1_STRING_free(ASN1_STRING *a);
DECLARE_ASN1_ITEM(ZLONG)
# endif
-DEFINE_STACK_OF(ASN1_VALUE)
+DEFINE_OR_DECLARE_STACK_OF(ASN1_VALUE)
/* Functions used internally by the ASN1 code */
typedef int BIO_info_cb(BIO *, int, int);
typedef BIO_info_cb bio_info_cb; /* backward compatibility */
-DEFINE_STACK_OF(BIO)
+DEFINE_OR_DECLARE_STACK_OF(BIO)
/* Prefix and suffix callback in ASN1 BIO */
typedef int asn1_ps_func (BIO *b, unsigned char **pbuf, int *plen,
# define OSSL_CMP_CERTORENCCERT_CERTIFICATE 0
# define OSSL_CMP_CERTORENCCERT_ENCRYPTEDCERT 1
+DEFINE_OR_DECLARE_STACK_OF(OSSL_CMP_CERTSTATUS)
+DEFINE_OR_DECLARE_STACK_OF(OSSL_CMP_ITAV)
+DEFINE_OR_DECLARE_STACK_OF(OSSL_CMP_PKISI)
+DEFINE_OR_DECLARE_STACK_OF(OSSL_CMP_CERTREPMESSAGE)
+DEFINE_OR_DECLARE_STACK_OF(OSSL_CMP_CERTRESPONSE)
+
/* data type declarations */
typedef struct ossl_cmp_ctx_st OSSL_CMP_CTX;
typedef struct ossl_cmp_pkiheader_st OSSL_CMP_PKIHEADER;
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_MSG)
DECLARE_ASN1_ENCODE_FUNCTIONS(OSSL_CMP_MSG, OSSL_CMP_MSG, OSSL_CMP_MSG)
typedef struct ossl_cmp_certstatus_st OSSL_CMP_CERTSTATUS;
-DEFINE_STACK_OF(OSSL_CMP_CERTSTATUS)
typedef struct ossl_cmp_itav_st OSSL_CMP_ITAV;
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_ITAV)
-DEFINE_STACK_OF(OSSL_CMP_ITAV)
typedef struct ossl_cmp_revrepcontent_st OSSL_CMP_REVREPCONTENT;
typedef struct ossl_cmp_pkisi_st OSSL_CMP_PKISI;
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_PKISI)
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_PKISI)
-DEFINE_STACK_OF(OSSL_CMP_PKISI)
typedef struct ossl_cmp_certrepmessage_st OSSL_CMP_CERTREPMESSAGE;
-DEFINE_STACK_OF(OSSL_CMP_CERTREPMESSAGE)
typedef struct ossl_cmp_pollrep_st OSSL_CMP_POLLREP;
typedef STACK_OF(OSSL_CMP_POLLREP) OSSL_CMP_POLLREPCONTENT;
typedef struct ossl_cmp_certresponse_st OSSL_CMP_CERTRESPONSE;
-DEFINE_STACK_OF(OSSL_CMP_CERTRESPONSE)
typedef STACK_OF(ASN1_UTF8STRING) OSSL_CMP_PKIFREETEXT;
/*
typedef struct CMS_RecipientEncryptedKey_st CMS_RecipientEncryptedKey;
typedef struct CMS_OtherKeyAttribute_st CMS_OtherKeyAttribute;
-DEFINE_STACK_OF(CMS_SignerInfo)
-DEFINE_STACK_OF(CMS_RecipientEncryptedKey)
-DEFINE_STACK_OF(CMS_RecipientInfo)
-DEFINE_STACK_OF(CMS_RevocationInfoChoice)
+DEFINE_OR_DECLARE_STACK_OF(CMS_SignerInfo)
+DEFINE_OR_DECLARE_STACK_OF(CMS_RecipientEncryptedKey)
+DEFINE_OR_DECLARE_STACK_OF(CMS_RecipientInfo)
+DEFINE_OR_DECLARE_STACK_OF(CMS_RevocationInfoChoice)
+
DECLARE_ASN1_FUNCTIONS(CMS_ContentInfo)
DECLARE_ASN1_FUNCTIONS(CMS_ReceiptRequest)
DECLARE_ASN1_PRINT_FUNCTION(CMS_ContentInfo)
char *value;
} CONF_VALUE;
-DEFINE_STACK_OF(CONF_VALUE)
+DEFINE_OR_DECLARE_STACK_OF(CONF_VALUE)
+DEFINE_OR_DECLARE_STACK_OF(CONF_MODULE)
+
DEFINE_LHASH_OF(CONF_VALUE);
struct conf_st;
typedef struct conf_imodule_st CONF_IMODULE;
typedef struct conf_module_st CONF_MODULE;
-DEFINE_STACK_OF(CONF_MODULE)
-DEFINE_STACK_OF(CONF_IMODULE)
+STACK_OF(CONF_IMODULE);
/* DSO module function typedefs */
typedef int conf_init_func (CONF_IMODULE *md, const CONF *cnf);
extern "C" {
# endif
+DEFINE_OR_DECLARE_STACK_OF(OSSL_CRMF_MSG)
+DEFINE_OR_DECLARE_STACK_OF(OSSL_CRMF_CERTID)
+
# define OSSL_CRMF_POPOPRIVKEY_THISMESSAGE 0
# define OSSL_CRMF_POPOPRIVKEY_SUBSEQUENTMESSAGE 1
# define OSSL_CRMF_POPOPRIVKEY_DHMAC 2
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_ENCRYPTEDVALUE)
typedef struct ossl_crmf_msg_st OSSL_CRMF_MSG;
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_MSG)
-DEFINE_STACK_OF(OSSL_CRMF_MSG)
typedef struct ossl_crmf_attributetypeandvalue_st OSSL_CRMF_ATTRIBUTETYPEANDVALUE;
typedef struct ossl_crmf_pbmparameter_st OSSL_CRMF_PBMPARAMETER;
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_PBMPARAMETER)
typedef struct ossl_crmf_certrequest_st OSSL_CRMF_CERTREQUEST;
typedef struct ossl_crmf_certid_st OSSL_CRMF_CERTID;
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_CERTID)
-DEFINE_STACK_OF(OSSL_CRMF_CERTID)
typedef struct ossl_crmf_pkipublicationinfo_st OSSL_CRMF_PKIPUBLICATIONINFO;
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_PKIPUBLICATIONINFO)
OPENSSL_CTX *ctx;
STACK_OF(void) *sk;
};
-DEFINE_STACK_OF(void)
+
+DEFINE_OR_DECLARE_STACK_OF(void)
/*
* Per class, we have a STACK of function pointers.
/* 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)
+
typedef enum {
CT_LOG_ENTRY_TYPE_NOT_SET = -1,
CT_LOG_ENTRY_TYPE_X509 = 0,
SCT_VALIDATION_STATUS_UNKNOWN_VERSION
} sct_validation_status_t;
-DEFINE_STACK_OF(SCT)
-DEFINE_STACK_OF(CTLOG)
-
/******************************************
* CT policy evaluation context functions *
******************************************/
# include <openssl/x509.h>
# include <openssl/esserr.h>
+DEFINE_OR_DECLARE_STACK_OF(ESS_CERT_ID)
+DEFINE_OR_DECLARE_STACK_OF(ESS_CERT_ID_V2)
+
typedef struct ESS_issuer_serial ESS_ISSUER_SERIAL;
typedef struct ESS_cert_id ESS_CERT_ID;
typedef struct ESS_signing_cert ESS_SIGNING_CERT;
-DEFINE_STACK_OF(ESS_CERT_ID)
-
typedef struct ESS_signing_cert_v2_st ESS_SIGNING_CERT_V2;
typedef struct ESS_cert_id_v2_st ESS_CERT_ID_V2;
-DEFINE_STACK_OF(ESS_CERT_ID_V2)
DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_ISSUER_SERIAL)
DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_ISSUER_SERIAL, ESS_ISSUER_SERIAL)
# define OCSP_RESPID_KEY 0x400
# define OCSP_NOTIME 0x800
-typedef struct ocsp_cert_id_st OCSP_CERTID;
-
-DEFINE_STACK_OF(OCSP_CERTID)
+DEFINE_OR_DECLARE_STACK_OF(OCSP_CERTID)
+DEFINE_OR_DECLARE_STACK_OF(OCSP_ONEREQ)
+DEFINE_OR_DECLARE_STACK_OF(OCSP_RESPID)
+DEFINE_OR_DECLARE_STACK_OF(OCSP_SINGLERESP)
+typedef struct ocsp_cert_id_st OCSP_CERTID;
typedef struct ocsp_one_request_st OCSP_ONEREQ;
-
-DEFINE_STACK_OF(OCSP_ONEREQ)
-
typedef struct ocsp_req_info_st OCSP_REQINFO;
typedef struct ocsp_signature_st OCSP_SIGNATURE;
typedef struct ocsp_request_st OCSP_REQUEST;
# define V_OCSP_RESPID_NAME 0
# define V_OCSP_RESPID_KEY 1
-DEFINE_STACK_OF(OCSP_RESPID)
typedef struct ocsp_revoked_info_st OCSP_REVOKEDINFO;
typedef struct ocsp_cert_status_st OCSP_CERTSTATUS;
typedef struct ocsp_single_response_st OCSP_SINGLERESP;
-DEFINE_STACK_OF(OCSP_SINGLERESP)
typedef struct ocsp_response_data_st OCSP_RESPDATA;
# define KEY_EX 0x10
# define KEY_SIG 0x80
+DEFINE_OR_DECLARE_STACK_OF(PKCS12_SAFEBAG)
+
typedef struct PKCS12_MAC_DATA_st PKCS12_MAC_DATA;
typedef struct PKCS12_st PKCS12;
typedef struct PKCS12_SAFEBAG_st PKCS12_SAFEBAG;
-DEFINE_STACK_OF(PKCS12_SAFEBAG)
-
typedef struct pkcs12_bag_st PKCS12_BAGS;
# define PKCS12_ERROR 0
extern "C" {
#endif
+
/*-
Encryption_ID DES-CBC
Digest_ID MD5
/* The private key to sign with */
EVP_PKEY *pkey;
} PKCS7_SIGNER_INFO;
-
-DEFINE_STACK_OF(PKCS7_SIGNER_INFO)
+DEFINE_OR_DECLARE_STACK_OF(PKCS7_SIGNER_INFO)
typedef struct pkcs7_recip_info_st {
ASN1_INTEGER *version; /* version 0 */
ASN1_OCTET_STRING *enc_key;
X509 *cert; /* get the pub-key from this */
} PKCS7_RECIP_INFO;
+DEFINE_OR_DECLARE_STACK_OF(PKCS7_RECIP_INFO)
-DEFINE_STACK_OF(PKCS7_RECIP_INFO)
typedef struct pkcs7_signed_st {
ASN1_INTEGER *version; /* version 1 */
ASN1_TYPE *other;
} d;
} PKCS7;
+DEFINE_OR_DECLARE_STACK_OF(PKCS7)
-DEFINE_STACK_OF(PKCS7)
# define PKCS7_OP_SET_DETACHED_SIGNATURE 1
# define PKCS7_OP_GET_DETACHED_SIGNATURE 2
return (sk_##t1##_compfunc)OPENSSL_sk_set_cmp_func((OPENSSL_STACK *)sk, (OPENSSL_sk_compfunc)compare); \
}
-# define DEFINE_SPECIAL_STACK_OF(t1, t2) SKM_DEFINE_STACK_OF(t1, t2, t2)
# define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
+# define DEFINE_STACK_OF_CONST(t) SKM_DEFINE_STACK_OF(t, const t, t)
+# define DEFINE_SPECIAL_STACK_OF(t1, t2) SKM_DEFINE_STACK_OF(t1, t2, t2)
# define DEFINE_SPECIAL_STACK_OF_CONST(t1, t2) \
SKM_DEFINE_STACK_OF(t1, const t2, t2)
-# define DEFINE_STACK_OF_CONST(t) SKM_DEFINE_STACK_OF(t, const t, t)
/*-
* Strings are special: normally an lhash entry will point to a single
typedef char *OPENSSL_STRING;
typedef const char *OPENSSL_CSTRING;
+# define DEFINE_STACK_OF_STRING() \
+ DEFINE_SPECIAL_STACK_OF(OPENSSL_STRING, char)
+# define DEFINE_STACK_OF_CSTRING() \
+ DEFINE_SPECIAL_STACK_OF_CONST(OPENSSL_CSTRING, char)
+
+/*
+ * If we're building OpenSSL, or we have no-deprecated configured,
+ * then we don't define the inline functions (see |SKM_DEFINE_STACK_OF|,
+ * above), we just declare the stack datatypes. Otherwise, for compatibility
+ * and to not remove the API's, we define the functions. We have the
+ * trailing semicolon so that uses of this never need it.
+ */
+#if defined(OPENSSL_BUILDING_OPENSSL) || defined(OPENSSL_NO_DEPRECATED_3_0)
+# define DEFINE_OR_DECLARE_STACK_OF(s) STACK_OF(s);
+# define DEFINE_OR_DECLARE_STACK_OF_STRING() STACK_OF(OPENSSL_STRING);
+# define DEFINE_OR_DECLARE_STACK_OF_CSTRING() STACK_OF(OPENSSL_CSTRING);
+#else
+# define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
+# define DEFINE_OR_DECLARE_STACK_OF_STRING() DEFINE_STACK_OF_STRING()
+# define DEFINE_OR_DECLARE_STACK_OF_CSTRING() DEFINE_STACK_OF_CSTRING()
+#endif
+
/*-
* Confusingly, LHASH_OF(STRING) deals with char ** throughout, but
* STACK_OF(STRING) is really more like STACK_OF(char), only, as mentioned
* chars. So, we have to implement STRING specially for STACK_OF. This is
* dealt with in the autogenerated macros below.
*/
-DEFINE_SPECIAL_STACK_OF(OPENSSL_STRING, char)
-DEFINE_SPECIAL_STACK_OF_CONST(OPENSSL_CSTRING, char)
+DEFINE_OR_DECLARE_STACK_OF_STRING()
+DEFINE_OR_DECLARE_STACK_OF_CSTRING()
+#if !defined(OPENSSL_NO_DEPRECATED_3_0)
/*
- * Similarly, we sometimes use a block of characters, NOT nul-terminated.
+ * This is not used by OpenSSL. A block of bytes, NOT nul-terminated.
* These should also be distinguished from "normal" stacks.
*/
typedef void *OPENSSL_BLOCK;
DEFINE_SPECIAL_STACK_OF(OPENSSL_BLOCK, void)
+#endif
/*
* If called without higher optimization (min. -xO3) the Oracle Developer
extern "C" {
# endif
+DEFINE_OR_DECLARE_STACK_OF(SRP_gN_cache)
+DEFINE_OR_DECLARE_STACK_OF(SRP_user_pwd)
+DEFINE_OR_DECLARE_STACK_OF(SRP_gN)
+
typedef struct SRP_gN_cache_st {
char *b64_bn;
BIGNUM *bn;
} SRP_gN_cache;
-
-DEFINE_STACK_OF(SRP_gN_cache)
-
typedef struct SRP_user_pwd_st {
/* Owned by us. */
char *id;
int SRP_user_pwd_set1_ids(SRP_user_pwd *user_pwd, const char *id, const char *info);
int SRP_user_pwd_set0_sv(SRP_user_pwd *user_pwd, BIGNUM *s, BIGNUM *v);
-DEFINE_STACK_OF(SRP_user_pwd)
typedef struct SRP_VBASE_st {
STACK_OF(SRP_user_pwd) *users_pwd;
const BIGNUM *N;
} SRP_gN;
-DEFINE_STACK_OF(SRP_gN)
SRP_VBASE *SRP_VBASE_new(char *seed_key);
void SRP_VBASE_free(SRP_VBASE *vb);
typedef struct ssl_conf_ctx_st SSL_CONF_CTX;
typedef struct ssl_comp_st SSL_COMP;
-STACK_OF(SSL_CIPHER);
-STACK_OF(SSL_COMP);
+DEFINE_OR_DECLARE_STACK_OF(SSL_CIPHER)
+DEFINE_OR_DECLARE_STACK_OF(SSL_COMP)
+DEFINE_OR_DECLARE_STACK_OF(SRTP_PROTECTION_PROFILE)
+DEFINE_OR_DECLARE_STACK_OF(SSL_COMP)
/* SRTP protection profiles for use with the use_srtp extension (RFC 5764)*/
typedef struct srtp_protection_profile_st {
unsigned long id;
} SRTP_PROTECTION_PROFILE;
-DEFINE_STACK_OF(SRTP_PROTECTION_PROFILE)
typedef int (*tls_session_ticket_ext_cb_fn)(SSL *s, const unsigned char *data,
int len, void *arg);
* These need to be after the above set of includes due to a compiler bug
* in VisualStudio 2015
*/
-DEFINE_STACK_OF_CONST(SSL_CIPHER)
-DEFINE_STACK_OF(SSL_COMP)
/* compatibility */
# define SSL_set_app_data(s,arg) (SSL_set_ex_data(s,0,(char *)(arg)))
# include <openssl/x509.h>
# include <openssl/x509v3.h>
+DEFINE_OR_DECLARE_STACK_OF(EVP_MD)
+
typedef struct TS_msg_imprint_st TS_MSG_IMPRINT;
typedef struct TS_req_st TS_REQ;
typedef struct TS_accuracy_st TS_ACCURACY;
typedef struct TS_resp_ctx TS_RESP_CTX;
-DEFINE_STACK_OF_CONST(EVP_MD)
-
/* Creates a response context that can be used for generating responses. */
TS_RESP_CTX *TS_RESP_CTX_new(void);
void TS_RESP_CTX_free(TS_RESP_CTX *ctx);
typedef int ASN1_NULL;
# endif
+typedef struct asn1_type_st ASN1_TYPE;
typedef struct asn1_object_st ASN1_OBJECT;
+typedef struct asn1_string_table_st ASN1_STRING_TABLE;
typedef struct ASN1_ITEM_st ASN1_ITEM;
typedef struct asn1_pctx_st ASN1_PCTX;
* about a string or a prompt, including test data for a verification prompt.
*/
typedef struct ui_string_st UI_STRING;
-DEFINE_STACK_OF(UI_STRING)
+
+DEFINE_OR_DECLARE_STACK_OF(UI_STRING)
/*
* The different types of strings that are currently supported. This is only
typedef struct X509_name_entry_st X509_NAME_ENTRY;
-DEFINE_STACK_OF(X509_NAME_ENTRY)
-
-DEFINE_STACK_OF(X509_NAME)
+DEFINE_OR_DECLARE_STACK_OF(X509_NAME_ENTRY)
+DEFINE_OR_DECLARE_STACK_OF(X509_NAME)
+DEFINE_OR_DECLARE_STACK_OF(X509)
+DEFINE_OR_DECLARE_STACK_OF(X509_REVOKED)
+DEFINE_OR_DECLARE_STACK_OF(X509_CRL)
# define X509_EX_V_NETSCAPE_HACK 0x8000
# define X509_EX_V_INIT 0x0001
typedef struct X509_extension_st X509_EXTENSION;
-
+DEFINE_OR_DECLARE_STACK_OF(X509_EXTENSION)
typedef STACK_OF(X509_EXTENSION) X509_EXTENSIONS;
-
-DEFINE_STACK_OF(X509_EXTENSION)
-
typedef struct x509_attributes_st X509_ATTRIBUTE;
-
-DEFINE_STACK_OF(X509_ATTRIBUTE)
-
+DEFINE_OR_DECLARE_STACK_OF(X509_ATTRIBUTE)
typedef struct X509_req_info_st X509_REQ_INFO;
-
typedef struct X509_req_st X509_REQ;
-
typedef struct x509_cert_aux_st X509_CERT_AUX;
-
typedef struct x509_cinf_st X509_CINF;
-DEFINE_STACK_OF(X509)
-
/* This is used for a table of trust checking functions */
typedef struct x509_trust_st {
int arg1;
void *arg2;
} X509_TRUST;
+DEFINE_OR_DECLARE_STACK_OF(X509_TRUST)
-DEFINE_STACK_OF(X509_TRUST)
/* standard trust ids */
XN_FLAG_FN_LN | \
XN_FLAG_FN_ALIGN)
-DEFINE_STACK_OF(X509_REVOKED)
-
typedef struct X509_crl_info_st X509_CRL_INFO;
-DEFINE_STACK_OF(X509_CRL)
-
typedef struct private_key_st {
int version;
/* The PKCS#8 data types */
int enc_len;
char *enc_data;
} X509_INFO;
-
-DEFINE_STACK_OF(X509_INFO)
+DEFINE_OR_DECLARE_STACK_OF(X509_INFO)
/*
* The next 2 structures and their 8 routines are used to manipulate Netscape's
#define X509_LU_FAIL 0
#endif
-DEFINE_STACK_OF(X509_LOOKUP)
-DEFINE_STACK_OF(X509_OBJECT)
-DEFINE_STACK_OF(X509_VERIFY_PARAM)
+DEFINE_OR_DECLARE_STACK_OF(X509_LOOKUP)
+DEFINE_OR_DECLARE_STACK_OF(X509_OBJECT)
+DEFINE_OR_DECLARE_STACK_OF(X509_VERIFY_PARAM)
int X509_STORE_set_depth(X509_STORE *store, int depth);
extern "C" {
#endif
+DEFINE_OR_DECLARE_STACK_OF(GENERAL_NAME)
+DEFINE_OR_DECLARE_STACK_OF(X509V3_EXT_METHOD)
+DEFINE_OR_DECLARE_STACK_OF(GENERAL_NAMES)
+DEFINE_OR_DECLARE_STACK_OF(ACCESS_DESCRIPTION)
+DEFINE_OR_DECLARE_STACK_OF(DIST_POINT)
+DEFINE_OR_DECLARE_STACK_OF(SXNETID)
+DEFINE_OR_DECLARE_STACK_OF(POLICYQUALINFO)
+DEFINE_OR_DECLARE_STACK_OF(POLICYINFO)
+DEFINE_OR_DECLARE_STACK_OF(POLICY_MAPPING)
+DEFINE_OR_DECLARE_STACK_OF(GENERAL_SUBTREE)
+DEFINE_OR_DECLARE_STACK_OF(X509_PURPOSE)
+DEFINE_OR_DECLARE_STACK_OF(X509_POLICY_NODE)
+DEFINE_OR_DECLARE_STACK_OF(ASIdOrRange)
+DEFINE_OR_DECLARE_STACK_OF(IPAddressOrRange)
+DEFINE_OR_DECLARE_STACK_OF(IPAddressFamily)
+DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING)
+DEFINE_OR_DECLARE_STACK_OF(ADMISSIONS)
+DEFINE_OR_DECLARE_STACK_OF(PROFESSION_INFO)
+
/* Forward reference */
struct v3_ext_method;
struct v3_ext_ctx;
typedef struct v3_ext_method X509V3_EXT_METHOD;
-DEFINE_STACK_OF(X509V3_EXT_METHOD)
-
/* ext_flags values */
# define X509V3_EXT_DYNAMIC 0x1
# define X509V3_EXT_CTX_DEP 0x2
typedef STACK_OF(ASN1_INTEGER) TLS_FEATURE;
-DEFINE_STACK_OF(GENERAL_NAME)
typedef STACK_OF(GENERAL_NAME) GENERAL_NAMES;
-DEFINE_STACK_OF(GENERAL_NAMES)
-
-DEFINE_STACK_OF(ACCESS_DESCRIPTION)
typedef struct DIST_POINT_NAME_st {
int type;
typedef STACK_OF(DIST_POINT) CRL_DIST_POINTS;
-DEFINE_STACK_OF(DIST_POINT)
-
struct AUTHORITY_KEYID_st {
ASN1_OCTET_STRING *keyid;
GENERAL_NAMES *issuer;
ASN1_OCTET_STRING *user;
} SXNETID;
-DEFINE_STACK_OF(SXNETID)
-
typedef struct SXNET_st {
ASN1_INTEGER *version;
STACK_OF(SXNETID) *ids;
} d;
} POLICYQUALINFO;
-DEFINE_STACK_OF(POLICYQUALINFO)
-
typedef struct POLICYINFO_st {
ASN1_OBJECT *policyid;
STACK_OF(POLICYQUALINFO) *qualifiers;
typedef STACK_OF(POLICYINFO) CERTIFICATEPOLICIES;
-DEFINE_STACK_OF(POLICYINFO)
-
typedef struct POLICY_MAPPING_st {
ASN1_OBJECT *issuerDomainPolicy;
ASN1_OBJECT *subjectDomainPolicy;
} POLICY_MAPPING;
-DEFINE_STACK_OF(POLICY_MAPPING)
-
typedef STACK_OF(POLICY_MAPPING) POLICY_MAPPINGS;
typedef struct GENERAL_SUBTREE_st {
ASN1_INTEGER *maximum;
} GENERAL_SUBTREE;
-DEFINE_STACK_OF(GENERAL_SUBTREE)
-
struct NAME_CONSTRAINTS_st {
STACK_OF(GENERAL_SUBTREE) *permittedSubtrees;
STACK_OF(GENERAL_SUBTREE) *excludedSubtrees;
# define X509V3_ADD_DELETE 5L
# define X509V3_ADD_SILENT 0x10
-DEFINE_STACK_OF(X509_PURPOSE)
-
DECLARE_ASN1_FUNCTIONS(BASIC_CONSTRAINTS)
DECLARE_ASN1_FUNCTIONS(SXNET)
unsigned long chtype);
void X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent);
-DEFINE_STACK_OF(X509_POLICY_NODE)
#ifndef OPENSSL_NO_RFC3779
typedef struct ASRange_st {
} ASIdOrRange;
typedef STACK_OF(ASIdOrRange) ASIdOrRanges;
-DEFINE_STACK_OF(ASIdOrRange)
# define ASIdentifierChoice_inherit 0
# define ASIdentifierChoice_asIdsOrRanges 1
} IPAddressOrRange;
typedef STACK_OF(IPAddressOrRange) IPAddressOrRanges;
-DEFINE_STACK_OF(IPAddressOrRange)
# define IPAddressChoice_inherit 0
# define IPAddressChoice_addressesOrRanges 1
} IPAddressFamily;
typedef STACK_OF(IPAddressFamily) IPAddrBlocks;
-DEFINE_STACK_OF(IPAddressFamily)
DECLARE_ASN1_FUNCTIONS(IPAddressRange)
DECLARE_ASN1_FUNCTIONS(IPAddressOrRange)
#endif /* OPENSSL_NO_RFC3779 */
-DEFINE_STACK_OF(ASN1_STRING)
/*
* Admission Syntax
DECLARE_ASN1_FUNCTIONS(PROFESSION_INFO)
DECLARE_ASN1_FUNCTIONS(ADMISSIONS)
DECLARE_ASN1_FUNCTIONS(ADMISSION_SYNTAX)
-DEFINE_STACK_OF(ADMISSIONS)
-DEFINE_STACK_OF(PROFESSION_INFO)
typedef STACK_OF(PROFESSION_INFO) PROFESSION_INFOS;
const ASN1_OBJECT *NAMING_AUTHORITY_get0_authorityId(
#ifndef OPENSSL_NO_SRTP
+DEFINE_STACK_OF(SRTP_PROTECTION_PROFILE)
+
static SRTP_PROTECTION_PROFILE srtp_known_profiles[] = {
{
"SRTP_AES128_CM_SHA1_80",
#include <openssl/x509v3.h>
#include "internal/cryptlib.h"
+DEFINE_STACK_OF(X509_NAME)
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF_CONST(SSL_CIPHER)
+
#define TLS13_NUM_CIPHERS OSSL_NELEM(tls13_ciphers)
#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
#define SSL3_NUM_SCSVS OSSL_NELEM(ssl3_scsvs)
#include "ssl_cert_table.h"
#include "internal/thread_once.h"
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(X509_NAME)
+
static int ssl_security_default_callback(const SSL *s, const SSL_CTX *ctx,
int op, int bits, int nid, void *other,
void *ex);
#include "internal/thread_once.h"
#include "internal/cryptlib.h"
+DEFINE_STACK_OF(SSL_COMP)
+DEFINE_STACK_OF_CONST(SSL_CIPHER)
+
/* NB: make sure indices in these tables match values above */
typedef struct {
#include <openssl/dh.h>
#include "internal/nelem.h"
+DEFINE_STACK_OF(X509_NAME)
+
/*
* structure holding name tables. This is used for permitted elements in lists
* such as TLSv1.
#include "internal/refcount.h"
#include "internal/ktls.h"
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(X509_NAME)
+DEFINE_STACK_OF_CONST(SSL_CIPHER)
+DEFINE_STACK_OF(X509_EXTENSION)
+DEFINE_STACK_OF(OCSP_RESPID)
+DEFINE_STACK_OF(SRTP_PROTECTION_PROFILE)
+DEFINE_STACK_OF(SCT)
+
static int ssl_undefined_function_1(SSL *ssl, SSL3_RECORD *r, size_t s, int t)
{
(void)r;
#include <openssl/x509v3.h>
#include <openssl/pem.h>
+DEFINE_STACK_OF(X509)
+
static int ssl_set_cert(CERT *c, X509 *x509);
static int ssl_set_pkey(CERT *c, EVP_PKEY *pkey);
#include "ssl_local.h"
#include "statem/statem_local.h"
+DEFINE_STACK_OF(X509)
+
static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s);
static void SSL_SESSION_list_add(SSL_CTX *ctx, SSL_SESSION *s);
static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck);
#include "statem_local.h"
#include "internal/cryptlib.h"
+DEFINE_STACK_OF(X509_NAME)
+
static int final_renegotiate(SSL *s, unsigned int context, int sent);
static int init_server_name(SSL *s, unsigned int context);
static int final_server_name(SSL *s, unsigned int context, int sent);
#include "internal/cryptlib.h"
#include "statem_local.h"
+DEFINE_STACK_OF(SRTP_PROTECTION_PROFILE)
+DEFINE_STACK_OF_CONST(SSL_CIPHER)
+DEFINE_STACK_OF(OCSP_RESPID)
+
EXT_RETURN tls_construct_ctos_renegotiate(SSL *s, WPACKET *pkt,
unsigned int context, X509 *x,
size_t chainidx)
#include "statem_local.h"
#include "internal/cryptlib.h"
+DEFINE_STACK_OF(SRTP_PROTECTION_PROFILE)
+DEFINE_STACK_OF(OCSP_RESPID)
+DEFINE_STACK_OF(X509_EXTENSION)
+
#define COOKIE_STATE_FORMAT_VERSION 0
/*
#include <openssl/trace.h>
#include <internal/cryptlib.h>
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(SSL_COMP)
+DEFINE_STACK_OF_CONST(SSL_CIPHER)
+
static MSG_PROCESS_RETURN tls_process_as_hello_retry_request(SSL *s, PACKET *pkt);
static MSG_PROCESS_RETURN tls_process_encrypted_extensions(SSL *s, PACKET *pkt);
#include <openssl/x509.h>
#include <openssl/trace.h>
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(X509_NAME)
+DEFINE_STACK_OF_CONST(SSL_CIPHER)
+
/*
* Map error codes to TLS/SSL alart types.
*/
#include <openssl/core_names.h>
#include <openssl/asn1t.h>
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(SSL_COMP)
+DEFINE_STACK_OF_CONST(SSL_CIPHER)
+
#define TICKET_NONCE_SIZE 8
typedef struct {
#include "ssl_local.h"
#include <openssl/ct.h>
+DEFINE_STACK_OF_CONST(SSL_CIPHER)
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(X509_NAME)
+
static const SIGALG_LOOKUP *find_sig_alg(SSL *s, X509 *x, EVP_PKEY *pkey);
static int tls12_sigalg_allowed(const SSL *s, int op, const SIGALG_LOOKUP *lu);
#include "internal/nelem.h"
#include "testutil.h"
+DEFINE_STACK_OF(SSL_CIPHER)
+
static SSL_CTX *ctx;
static SSL *s;
#include "internal/nelem.h"
#include "testutil.h"
+DEFINE_STACK_OF_CONST(SSL_CIPHER)
+
typedef struct cipherlist_test_fixture {
const char *test_case_name;
SSL_CTX *server;
#include "internal/nelem.h"
#include "testutil.h"
+DEFINE_STACK_OF(SSL_CIPHER)
+
typedef struct cipher_id_name {
int id;
const char *name;
#ifndef NDEBUG /* tests need mock server, which is available only if !NDEBUG */
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(OSSL_CMP_ITAV)
+
static const char *server_key_f;
static const char *server_cert_f;
static const char *client_key_f;
#include <openssl/x509_vfy.h>
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(ASN1_UTF8STRING)
+DEFINE_STACK_OF(X509_EXTENSION)
+DEFINE_STACK_OF(OSSL_CMP_ITAV)
+DEFINE_STACK_OF(POLICYINFO)
+
typedef struct test_fixture {
const char *test_case_name;
OSSL_CMP_CTX *ctx;
#include "cmp_testlib.h"
+DEFINE_STACK_OF(OSSL_CMP_ITAV)
+DEFINE_STACK_OF(ASN1_UTF8STRING)
+
static unsigned char rand_data[OSSL_CMP_TRANSACTIONID_LENGTH];
typedef struct test_fixture {
#include "cmp_testlib.h"
+DEFINE_STACK_OF(OSSL_CMP_CERTRESPONSE)
+
static const char *server_cert_f;
static const char *pkcs10_f;
#include "cmp_testlib.h"
+DEFINE_STACK_OF(X509)
+
static const char *ir_protected_f;
static const char *ir_unprotected_f;
static const char *ip_PBM_f;
#include "cmp_testlib.h"
+DEFINE_STACK_OF(ASN1_UTF8STRING)
+
typedef struct test_fixture {
const char *test_case_name;
int pkistatus;
#include "cmp_testlib.h"
#include <openssl/rsa.h> /* needed in case config no-deprecated */
+DEFINE_STACK_OF(X509)
+
EVP_PKEY *load_pem_key(const char *file)
{
EVP_PKEY *key = NULL;
#include "cmp_testlib.h"
#include "../crypto/crmf/crmf_local.h" /* for manipulating POPO signature */
+DEFINE_STACK_OF(OSSL_CRMF_MSG)
static const char *server_f;
static const char *client_f;
#include "testutil.h"
+DEFINE_STACK_OF(X509)
+
static X509 *cert = NULL;
static EVP_PKEY *privkey = NULL;
#include <openssl/safestack.h>
#include <openssl/err.h>
+DEFINE_STACK_OF(CONF_VALUE)
+DEFINE_STACK_OF_CSTRING()
+
static STACK_OF(OPENSSL_CSTRING) *section_names = NULL;
static void collect_section_name(CONF_VALUE *v)
#include "testutil.h"
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(X509_CRL)
+
#define PARAM_TIME 1474934400 /* Sep 27th, 2016 */
static const char *kCRLTestRoot[] = {
#include <openssl/crypto.h>
#ifndef OPENSSL_NO_CT
+
+DEFINE_STACK_OF(SCT)
+
/* Used when declaring buffers to read text files into */
# define CT_TEST_MAX_FILE_SIZE 8096
#include "internal/nelem.h"
+DEFINE_STACK_OF(X509)
+
#define _UC(c) ((unsigned char)(c))
static const char *basedomain;
/* for SSL_READ_ETM() */
#include "../ssl/ssl_local.h"
+DEFINE_STACK_OF(SSL_CIPHER)
+
static int debug = 0;
static unsigned int clnt_psk_callback(SSL *ssl, const char *hint,
#include "testutil.h"
#include "evp_test.h"
+DEFINE_STACK_OF_STRING()
+
#define AAD_NUM 4
typedef struct evp_test_method_st EVP_TEST_METHOD;
#include <netinet/sctp.h>
#endif
+DEFINE_STACK_OF(X509_NAME)
+
HANDSHAKE_RESULT *HANDSHAKE_RESULT_new(void)
{
HANDSHAKE_RESULT *ret;
#include "testutil.h"
+DEFINE_STACK_OF(CONF_VALUE)
+
static const ASN1_ITEM *x509_it = NULL;
static X509 *x509 = NULL;
#define SERVER "mock.server"
#include "testutil.h"
+DEFINE_STACK_OF(X509)
+
static const char *certstr;
static const char *privkeystr;
#include "ssl_test_ctx.h"
#include "testutil.h"
+DEFINE_STACK_OF(X509_NAME)
+
static CONF *conf = NULL;
static OSSL_PROVIDER *defctxnull = NULL, *thisprov = NULL;
static OPENSSL_CTX *libctx = NULL;
# define strcasecmp _stricmp
#endif
+DEFINE_STACK_OF(CONF_VALUE)
+DEFINE_STACK_OF(X509_NAME)
+
static const int default_app_data_size = 256;
/* Default set to be as small as possible to exercise fragmentation. */
static const int default_max_fragment_size = 512;
#include "internal/ktls.h"
#include "../ssl/ssl_local.h"
+DEFINE_STACK_OF(OCSP_RESPID)
+DEFINE_STACK_OF(X509)
+DEFINE_STACK_OF(X509_NAME)
+
static OPENSSL_CTX *libctx = NULL;
static OSSL_PROVIDER *defctxnull = NULL;
static SRP_VBASE *vbase = NULL;
+DEFINE_STACK_OF(SRP_user_pwd)
+
static int ssl_srp_cb(SSL *s, int *ad, void *arg)
{
int ret = SSL3_AL_FATAL;
#include "ssltestlib.h"
#include "testutil.h"
+DEFINE_STACK_OF(SSL_CIPHER)
+
static int docorrupt = 0;
static void copy_flags(BIO *bio)
# include <unistd.h>
#endif
+DEFINE_STACK_OF(SSL_COMP)
+DEFINE_STACK_OF_STRING()
+
static SSL_CTX *s_ctx = NULL;
static SSL_CTX *s_ctx2 = NULL;
# define strcasecmp _stricmp
#endif
+DEFINE_STACK_OF(GENERAL_NAME)
+
static const char *const names[] = {
"a", "b", ".", "*", "@",
".a", "a.", ".b", "b.", ".*", "*.", "*@", "@*", "a@", "@a", "b@", "..",
#include <openssl/err.h>
#include "testutil.h"
+DEFINE_STACK_OF(X509)
+
static const char *roots_f;
static const char *untrusted_f;
static const char *bad_f;
PKCS7_is_detached(3)
STACK_OF(3)
SKM_DEFINE_STACK_OF(3)
+DEFINE_OR_DECLARE_STACK_OF(3)
+DEFINE_OR_DECLARE_STACK_OF_STRING(3)
+DEFINE_OR_DECLARE_STACK_OF_CSTRING(3)
+DEFINE_STACK_OF_STRING(3)
+DEFINE_STACK_OF_CSTRING(3)
U64(3)
SSL_set_mtu(3)
DTLS_set_link_mtu(3)
{ regexp => qr/DEFINE_STACK_OF_CONST<<<\((.*)\)>>>/,
massager => sub { return ("SKM_DEFINE_STACK_OF($1,const $1,$1)"); },
},
+ { regexp => qr/DEFINE_STACK_OF_STRING<<<\((.*?)\)>>>/,
+ massager => sub {
+ return ("DEFINE_SPECIAL_STACK_OF(OPENSSL_STRING, char)");
+ }
+ },
+ { regexp => qr/DEFINE_STACK_OF_CSTRING<<<\((.*?)\)>>>/,
+ massager => sub {
+ return ("DEFINE_SPECIAL_STACK_OF_CONST(OPENSSL_CSTRING, char)");
+ }
+ },
+ # DEFINE_OR_DECLARE macro calls must be interpretted as DEFINE macro
+ # calls, because that's what they look like to the external apps.
+ # (if that ever changes, we must change the substitutions to STACK_OF)
+ { regexp => qr/DEFINE_OR_DECLARE_STACK_OF<<<\((.*?)\)>>>/,
+ massager => sub { return ("DEFINE_STACK_OF($1)"); }
+ },
+ { regexp => qr/DEFINE_OR_DECLARE_STACK_OF_STRING<<<\(\)>>>/,
+ massager => sub { return ("DEFINE_STACK_OF_STRING()"); },
+ },
+ { regexp => qr/DEFINE_OR_DECLARE_STACK_OF_CSTRING<<<\(\)>>>/,
+ massager => sub { return ("DEFINE_STACK_OF_CSTRING()"); },
+ },
#####
# ASN1 stuff