Enable -Wmissing-variable-declarations and

-Wincompatible-pointer-types-discards-qualifiers (the latter did not require
any code changes).

Reviewed-by: Rich Salz <rsalz@openssl.org>
master
Ben Laurie 8 years ago
parent 4c7103a5ee
commit df2ee0e27d

@ -103,11 +103,10 @@ my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare
# TODO(openssl-team): fix problems and investigate if (at least) the
# following warnings can also be enabled:
# -Wswitch-enum, -Wunused-macros, -Wmissing-field-initializers,
# -Wmissing-variable-declarations,
# -Wincompatible-pointer-types-discards-qualifiers, -Wcast-align,
# -Wcast-align,
# -Wunreachable-code -Wunused-parameter -Wlanguage-extension-token
# -Wextended-offsetof
my $clang_devteam_warn = "-Wno-unused-parameter -Wno-missing-field-initializers -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Qunused-arguments";
my $clang_devteam_warn = "-Wno-unused-parameter -Wno-missing-field-initializers -Wno-language-extension-token -Wno-extended-offsetof -Wconditional-uninitialized -Qunused-arguments -Wincompatible-pointer-types-discards-qualifiers -Wmissing-variable-declarations";
my $strict_warnings = 0;

@ -573,6 +573,12 @@ int raw_write_stdout(const void *, int);
# define TM_STOP 1
double app_tminterval(int stop, int usertime);
/* this is an accident waiting to happen (-Wshadow is your friend) */
extern int verify_depth;
extern int verify_quiet;
extern int verify_error;
extern int verify_return_error;
# include "progs.h"
#endif

@ -95,7 +95,7 @@ static int cms_set_pkey_param(EVP_PKEY_CTX *pctx,
# define SMIME_SIGN_RECEIPT (15 | SMIME_IP | SMIME_OP)
# define SMIME_VERIFY_RECEIPT (16 | SMIME_IP)
int verify_err = 0;
static int verify_err = 0;
typedef struct cms_key_param_st cms_key_param;

@ -116,14 +116,14 @@ OPTIONS ecparam_options[] = {
{NULL}
};
OPT_PAIR forms[] = {
static OPT_PAIR forms[] = {
{"compressed", POINT_CONVERSION_COMPRESSED},
{"uncompressed", POINT_CONVERSION_UNCOMPRESSED},
{"hybrid", POINT_CONVERSION_HYBRID},
{NULL}
};
OPT_PAIR encodings[] = {
static OPT_PAIR encodings[] = {
{"named_curve", OPENSSL_EC_NAMED_CURVE},
{"explicit", 0},
{NULL}

@ -160,7 +160,7 @@ static void list_pkey(void);
static void list_type(FUNC_TYPE ft);
char *default_config_file = NULL;
CONF *config = NULL;
static CONF *config = NULL;
BIO *bio_in = NULL;
BIO *bio_out = NULL;
BIO *bio_err = NULL;

@ -65,7 +65,6 @@ extern int list_main(int argc, char *argv[]);
extern int help_main(int argc, char *argv[]);
extern int exit_main(int argc, char *argv[]);
#ifdef INCLUDE_FUNCTION_TABLE
extern OPTIONS asn1parse_options[];
extern OPTIONS ca_options[];
extern OPTIONS ciphers_options[];
@ -114,7 +113,9 @@ extern OPTIONS rehash_options[];
extern OPTIONS list_options[];
extern OPTIONS help_options[];
extern OPTIONS exit_options[];
FUNCTION functions[] = {
#ifdef INCLUDE_FUNCTION_TABLE
static FUNCTION functions[] = {
{ FT_general, "asn1parse", asn1parse_main, asn1parse_options },
{ FT_general, "ca", ca_main, ca_options },
#if !defined(OPENSSL_NO_SOCK)

@ -33,11 +33,13 @@ foreach (@ARGV) {
printf "extern int %s_main(int argc, char *argv[]);\n", $_;
}
printf "\n#ifdef INCLUDE_FUNCTION_TABLE\n";
print "\n";
foreach (@ARGV) {
printf "extern OPTIONS %s_options[];\n", $_;
}
printf "FUNCTION functions[] = {\n";
print "\n#ifdef INCLUDE_FUNCTION_TABLE\n";
print "static FUNCTION functions[] = {\n";
foreach (@ARGV) {
$str=" { FT_general, \"$_\", ${_}_main, ${_}_options },\n";
if (/^s_/ || /^ciphers$/) {

@ -131,8 +131,8 @@ int verify_depth = 0;
int verify_quiet = 0;
int verify_error = X509_V_OK;
int verify_return_error = 0;
unsigned char cookie_secret[COOKIE_SECRET_LENGTH];
int cookie_initialized = 0;
static unsigned char cookie_secret[COOKIE_SECRET_LENGTH];
static int cookie_initialized = 0;
static const char *lookup(int val, const STRINT_PAIR* list, const char* def)
{

@ -395,7 +395,7 @@ static char *ssl_give_srp_client_pwd_cb(SSL *s, void *arg)
#endif
char *srtp_profiles = NULL;
static char *srtp_profiles = NULL;
#ifndef OPENSSL_NO_NEXTPROTONEG
/* This the context that we pass to next_proto_cb */

@ -232,7 +232,7 @@ static char *s_dcert_file = NULL, *s_dkey_file = NULL, *s_dchain_file = NULL;
static int s_nbio = 0;
#endif
static int s_nbio_test = 0;
int s_crlf = 0;
static int s_crlf = 0;
static SSL_CTX *ctx = NULL;
static SSL_CTX *ctx2 = NULL;
static int www = 0;
@ -2366,7 +2366,7 @@ static int init_ssl_connection(SSL *con)
int i;
const char *str;
X509 *peer;
long verify_error;
long verify_err;
char buf[BUFSIZ];
#if !defined(OPENSSL_NO_NEXTPROTONEG)
const unsigned char *next_proto_neg;
@ -2409,10 +2409,10 @@ static int init_ssl_connection(SSL *con)
BIO_printf(bio_err, "ERROR\n");
verify_error = SSL_get_verify_result(con);
if (verify_error != X509_V_OK) {
verify_err = SSL_get_verify_result(con);
if (verify_err != X509_V_OK) {
BIO_printf(bio_err, "verify error:%s\n",
X509_verify_cert_error_string(verify_error));
X509_verify_cert_error_string(verify_err));
}
/* Always print any error messages */
ERR_print_errors(bio_err);

@ -405,7 +405,7 @@ OPTIONS speed_options[] = {
#define D_IGE_192_AES 27
#define D_IGE_256_AES 28
#define D_GHASH 29
OPT_PAIR doit_choices[] = {
static OPT_PAIR doit_choices[] = {
#ifndef OPENSSL_NO_MD2
{"md2", D_MD2},
#endif

@ -65,14 +65,6 @@
#endif
#include "internal/asn1_int.h"
extern const EVP_PKEY_ASN1_METHOD rsa_asn1_meths[];
extern const EVP_PKEY_ASN1_METHOD dsa_asn1_meths[];
extern const EVP_PKEY_ASN1_METHOD dh_asn1_meth;
extern const EVP_PKEY_ASN1_METHOD dhx_asn1_meth;
extern const EVP_PKEY_ASN1_METHOD eckey_asn1_meth;
extern const EVP_PKEY_ASN1_METHOD hmac_asn1_meth;
extern const EVP_PKEY_ASN1_METHOD cmac_asn1_meth;
/* Keep this sorted in type order !! */
static const EVP_PKEY_ASN1_METHOD *standard_methods[] = {
#ifndef OPENSSL_NO_RSA

@ -103,7 +103,7 @@ typedef struct {
ASN1_SEQUENCE(asn1_int_oct) = {
ASN1_SIMPLE(asn1_int_oct, num, LONG),
ASN1_SIMPLE(asn1_int_oct, oct, ASN1_OCTET_STRING)
} ASN1_SEQUENCE_END(asn1_int_oct)
} static_ASN1_SEQUENCE_END(asn1_int_oct)
DECLARE_ASN1_ITEM(asn1_int_oct)

@ -86,7 +86,7 @@ typedef struct netscape_encrypted_pkey_st {
ASN1_BROKEN_SEQUENCE(NETSCAPE_ENCRYPTED_PKEY) = {
ASN1_SIMPLE(NETSCAPE_ENCRYPTED_PKEY, os, ASN1_OCTET_STRING),
ASN1_SIMPLE(NETSCAPE_ENCRYPTED_PKEY, enckey, X509_SIG)
} ASN1_BROKEN_SEQUENCE_END(NETSCAPE_ENCRYPTED_PKEY)
} static_ASN1_BROKEN_SEQUENCE_END(NETSCAPE_ENCRYPTED_PKEY)
DECLARE_ASN1_FUNCTIONS_const(NETSCAPE_ENCRYPTED_PKEY)
DECLARE_ASN1_ENCODE_FUNCTIONS_const(NETSCAPE_ENCRYPTED_PKEY,NETSCAPE_ENCRYPTED_PKEY)
@ -96,7 +96,7 @@ ASN1_SEQUENCE(NETSCAPE_PKEY) = {
ASN1_SIMPLE(NETSCAPE_PKEY, version, LONG),
ASN1_SIMPLE(NETSCAPE_PKEY, algor, X509_ALGOR),
ASN1_SIMPLE(NETSCAPE_PKEY, private_key, ASN1_OCTET_STRING)
} ASN1_SEQUENCE_END(NETSCAPE_PKEY)
} static_ASN1_SEQUENCE_END(NETSCAPE_PKEY)
DECLARE_ASN1_FUNCTIONS_const(NETSCAPE_PKEY)
DECLARE_ASN1_ENCODE_FUNCTIONS_const(NETSCAPE_PKEY,NETSCAPE_PKEY)

@ -82,7 +82,7 @@ ASN1_SEQUENCE(SCRYPT_PARAMS) = {
ASN1_SIMPLE(SCRYPT_PARAMS, blockSize, ASN1_INTEGER),
ASN1_SIMPLE(SCRYPT_PARAMS, parallelizationParameter, ASN1_INTEGER),
ASN1_OPT(SCRYPT_PARAMS, keyLength, ASN1_INTEGER),
} ASN1_SEQUENCE_END(SCRYPT_PARAMS)
} static_ASN1_SEQUENCE_END(SCRYPT_PARAMS)
DECLARE_ASN1_ALLOC_FUNCTIONS(SCRYPT_PARAMS)
IMPLEMENT_ASN1_ALLOC_FUNCTIONS(SCRYPT_PARAMS)

@ -74,7 +74,7 @@
/* ASN1_PCTX routines */
ASN1_PCTX default_pctx = {
static ASN1_PCTX default_pctx = {
ASN1_PCTX_FLAGS_SHOW_ABSENT, /* flags */
0, /* nm_flags */
0, /* cert_flags */

@ -219,7 +219,8 @@ bn_depr.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
bn_depr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bn_depr.o: ../include/internal/bn_int.h ../include/internal/cryptlib.h
bn_depr.o: bn_depr.c bn_lcl.h
bn_dh.o: ../../e_os.h ../../include/openssl/bn.h ../../include/openssl/crypto.h
bn_dh.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_dh.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
bn_dh.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
bn_dh.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
bn_dh.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
@ -399,8 +400,9 @@ bn_srp.o: ../../e_os.h ../../include/openssl/bn.h
bn_srp.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
bn_srp.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
bn_srp.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
bn_srp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
bn_srp.o: ../include/internal/bn_int.h bn_lcl.h bn_srp.c
bn_srp.o: ../../include/openssl/srp.h ../../include/openssl/stack.h
bn_srp.o: ../../include/openssl/symhacks.h ../include/internal/bn_int.h
bn_srp.o: ../include/internal/bn_srp.h bn_lcl.h bn_srp.c
bn_word.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
bn_word.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
bn_word.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h

@ -56,6 +56,7 @@
*
*/
#include <openssl/dh.h>
#include "bn_lcl.h"
#include "e_os.h"

@ -1,5 +1,7 @@
#include "bn_lcl.h"
#include "e_os.h"
#include <openssl/srp.h>
#include <internal/bn_srp.h>
#ifndef OPENSSL_NO_SRP

@ -67,7 +67,7 @@ ASN1_SEQUENCE(CMS_IssuerAndSerialNumber) = {
ASN1_SEQUENCE(CMS_OtherCertificateFormat) = {
ASN1_SIMPLE(CMS_OtherCertificateFormat, otherCertFormat, ASN1_OBJECT),
ASN1_OPT(CMS_OtherCertificateFormat, otherCert, ASN1_ANY)
} ASN1_SEQUENCE_END(CMS_OtherCertificateFormat)
} static_ASN1_SEQUENCE_END(CMS_OtherCertificateFormat)
ASN1_CHOICE(CMS_CertificateChoices) = {
ASN1_SIMPLE(CMS_CertificateChoices, d.certificate, X509),
@ -80,12 +80,12 @@ ASN1_CHOICE(CMS_CertificateChoices) = {
ASN1_CHOICE(CMS_SignerIdentifier) = {
ASN1_SIMPLE(CMS_SignerIdentifier, d.issuerAndSerialNumber, CMS_IssuerAndSerialNumber),
ASN1_IMP(CMS_SignerIdentifier, d.subjectKeyIdentifier, ASN1_OCTET_STRING, 0)
} ASN1_CHOICE_END(CMS_SignerIdentifier)
} static_ASN1_CHOICE_END(CMS_SignerIdentifier)
ASN1_NDEF_SEQUENCE(CMS_EncapsulatedContentInfo) = {
ASN1_SIMPLE(CMS_EncapsulatedContentInfo, eContentType, ASN1_OBJECT),
ASN1_NDEF_EXP_OPT(CMS_EncapsulatedContentInfo, eContent, ASN1_OCTET_STRING_NDEF, 0)
} ASN1_NDEF_SEQUENCE_END(CMS_EncapsulatedContentInfo)
} static_ASN1_NDEF_SEQUENCE_END(CMS_EncapsulatedContentInfo)
/* Minor tweak to operation: free up signer key, cert */
static int cms_si_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
@ -114,7 +114,7 @@ ASN1_SEQUENCE_cb(CMS_SignerInfo, cms_si_cb) = {
ASN1_SEQUENCE(CMS_OtherRevocationInfoFormat) = {
ASN1_SIMPLE(CMS_OtherRevocationInfoFormat, otherRevInfoFormat, ASN1_OBJECT),
ASN1_OPT(CMS_OtherRevocationInfoFormat, otherRevInfo, ASN1_ANY)
} ASN1_SEQUENCE_END(CMS_OtherRevocationInfoFormat)
} static_ASN1_SEQUENCE_END(CMS_OtherRevocationInfoFormat)
ASN1_CHOICE(CMS_RevocationInfoChoice) = {
ASN1_SIMPLE(CMS_RevocationInfoChoice, d.crl, X509_CRL),
@ -133,13 +133,13 @@ ASN1_NDEF_SEQUENCE(CMS_SignedData) = {
ASN1_SEQUENCE(CMS_OriginatorInfo) = {
ASN1_IMP_SET_OF_OPT(CMS_OriginatorInfo, certificates, CMS_CertificateChoices, 0),
ASN1_IMP_SET_OF_OPT(CMS_OriginatorInfo, crls, CMS_RevocationInfoChoice, 1)
} ASN1_SEQUENCE_END(CMS_OriginatorInfo)
} static_ASN1_SEQUENCE_END(CMS_OriginatorInfo)
ASN1_NDEF_SEQUENCE(CMS_EncryptedContentInfo) = {
ASN1_SIMPLE(CMS_EncryptedContentInfo, contentType, ASN1_OBJECT),
ASN1_SIMPLE(CMS_EncryptedContentInfo, contentEncryptionAlgorithm, X509_ALGOR),
ASN1_IMP_OPT(CMS_EncryptedContentInfo, encryptedContent, ASN1_OCTET_STRING_NDEF, 0)
} ASN1_NDEF_SEQUENCE_END(CMS_EncryptedContentInfo)
} static_ASN1_NDEF_SEQUENCE_END(CMS_EncryptedContentInfo)
ASN1_SEQUENCE(CMS_KeyTransRecipientInfo) = {
ASN1_SIMPLE(CMS_KeyTransRecipientInfo, version, LONG),
@ -162,7 +162,7 @@ ASN1_SEQUENCE(CMS_RecipientKeyIdentifier) = {
ASN1_CHOICE(CMS_KeyAgreeRecipientIdentifier) = {
ASN1_SIMPLE(CMS_KeyAgreeRecipientIdentifier, d.issuerAndSerialNumber, CMS_IssuerAndSerialNumber),
ASN1_IMP(CMS_KeyAgreeRecipientIdentifier, d.rKeyId, CMS_RecipientKeyIdentifier, 0)
} ASN1_CHOICE_END(CMS_KeyAgreeRecipientIdentifier)
} static_ASN1_CHOICE_END(CMS_KeyAgreeRecipientIdentifier)
static int cms_rek_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
void *exarg)
@ -188,7 +188,7 @@ ASN1_CHOICE(CMS_OriginatorIdentifierOrKey) = {
ASN1_SIMPLE(CMS_OriginatorIdentifierOrKey, d.issuerAndSerialNumber, CMS_IssuerAndSerialNumber),
ASN1_IMP(CMS_OriginatorIdentifierOrKey, d.subjectKeyIdentifier, ASN1_OCTET_STRING, 0),
ASN1_IMP(CMS_OriginatorIdentifierOrKey, d.originatorKey, CMS_OriginatorPublicKey, 1)
} ASN1_CHOICE_END(CMS_OriginatorIdentifierOrKey)
} static_ASN1_CHOICE_END(CMS_OriginatorIdentifierOrKey)
static int cms_kari_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
void *exarg)
@ -217,7 +217,7 @@ ASN1_SEQUENCE(CMS_KEKIdentifier) = {
ASN1_SIMPLE(CMS_KEKIdentifier, keyIdentifier, ASN1_OCTET_STRING),
ASN1_OPT(CMS_KEKIdentifier, date, ASN1_GENERALIZEDTIME),
ASN1_OPT(CMS_KEKIdentifier, other, CMS_OtherKeyAttribute)
} ASN1_SEQUENCE_END(CMS_KEKIdentifier)
} static_ASN1_SEQUENCE_END(CMS_KEKIdentifier)
ASN1_SEQUENCE(CMS_KEKRecipientInfo) = {
ASN1_SIMPLE(CMS_KEKRecipientInfo, version, LONG),
@ -236,7 +236,7 @@ ASN1_SEQUENCE(CMS_PasswordRecipientInfo) = {
ASN1_SEQUENCE(CMS_OtherRecipientInfo) = {
ASN1_SIMPLE(CMS_OtherRecipientInfo, oriType, ASN1_OBJECT),
ASN1_OPT(CMS_OtherRecipientInfo, oriValue, ASN1_ANY)
} ASN1_SEQUENCE_END(CMS_OtherRecipientInfo)
} static_ASN1_SEQUENCE_END(CMS_OtherRecipientInfo)
/* Free up RecipientInfo additional data */
static int cms_ri_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
@ -299,13 +299,13 @@ ASN1_NDEF_SEQUENCE(CMS_AuthenticatedData) = {
ASN1_IMP_SET_OF_OPT(CMS_AuthenticatedData, authAttrs, X509_ALGOR, 2),
ASN1_SIMPLE(CMS_AuthenticatedData, mac, ASN1_OCTET_STRING),
ASN1_IMP_SET_OF_OPT(CMS_AuthenticatedData, unauthAttrs, X509_ALGOR, 3)
} ASN1_NDEF_SEQUENCE_END(CMS_AuthenticatedData)
} static_ASN1_NDEF_SEQUENCE_END(CMS_AuthenticatedData)
ASN1_NDEF_SEQUENCE(CMS_CompressedData) = {
ASN1_SIMPLE(CMS_CompressedData, version, LONG),
ASN1_SIMPLE(CMS_CompressedData, compressionAlgorithm, X509_ALGOR),
ASN1_SIMPLE(CMS_CompressedData, encapContentInfo, CMS_EncapsulatedContentInfo),
} ASN1_NDEF_SEQUENCE_END(CMS_CompressedData)
} static_ASN1_NDEF_SEQUENCE_END(CMS_CompressedData)
/* This is the ANY DEFINED BY table for the top level ContentInfo structure */
@ -383,7 +383,7 @@ ASN1_ITEM_TEMPLATE_END(CMS_Attributes_Verify)
ASN1_CHOICE(CMS_ReceiptsFrom) = {
ASN1_IMP(CMS_ReceiptsFrom, d.allOrFirstTier, LONG, 0),
ASN1_IMP_SEQUENCE_OF(CMS_ReceiptsFrom, d.receiptList, GENERAL_NAMES, 1)
} ASN1_CHOICE_END(CMS_ReceiptsFrom)
} static_ASN1_CHOICE_END(CMS_ReceiptsFrom)
ASN1_SEQUENCE(CMS_ReceiptRequest) = {
ASN1_SIMPLE(CMS_ReceiptRequest, signedContentIdentifier, ASN1_OCTET_STRING),
@ -413,7 +413,7 @@ ASN1_SEQUENCE(CMS_SharedInfo) = {
ASN1_SIMPLE(CMS_SharedInfo, keyInfo, X509_ALGOR),
ASN1_EXP_OPT(CMS_SharedInfo, entityUInfo, ASN1_OCTET_STRING, 0),
ASN1_EXP_OPT(CMS_SharedInfo, suppPubInfo, ASN1_OCTET_STRING, 2),
} ASN1_SEQUENCE_END(CMS_SharedInfo)
} static_ASN1_SEQUENCE_END(CMS_SharedInfo)
int CMS_SharedInfo_encode(unsigned char **pder, X509_ALGOR *kekalg,
ASN1_OCTET_STRING *ukm, int keylen)

@ -60,8 +60,6 @@
#include <openssl/cms.h>
#include "cms_lcl.h"
DECLARE_ASN1_ITEM(CMS_DigestedData)
/* CMS DigestedData Utilities */
CMS_ContentInfo *cms_DigestedData_create(const EVP_MD *md)

@ -63,8 +63,6 @@
/* CMS EncryptedData Utilities */
DECLARE_ASN1_ITEM(CMS_EncryptedData)
/* Return BIO based on EncryptedContentInfo and key */
BIO *cms_EncryptedContent_init_bio(CMS_EncryptedContentInfo *ec)

@ -65,11 +65,6 @@
/* CMS EnvelopedData Utilities */
DECLARE_ASN1_ITEM(CMS_EnvelopedData)
DECLARE_ASN1_ITEM(CMS_KeyTransRecipientInfo)
DECLARE_ASN1_ITEM(CMS_KEKRecipientInfo)
DECLARE_ASN1_ITEM(CMS_OtherKeyAttribute)
DECLARE_STACK_OF(CMS_RecipientInfo)
CMS_EnvelopedData *cms_get0_enveloped(CMS_ContentInfo *cms)

@ -61,9 +61,6 @@
#include <openssl/cms.h>
#include "cms_lcl.h"
DECLARE_ASN1_ITEM(CMS_ReceiptRequest)
DECLARE_ASN1_ITEM(CMS_Receipt)
IMPLEMENT_ASN1_FUNCTIONS(CMS_ReceiptRequest)
/* ESS services: for now just Signed Receipt related */

@ -63,11 +63,6 @@
#include "cms_lcl.h"
#include "internal/asn1_int.h"
DECLARE_ASN1_ITEM(CMS_KeyAgreeRecipientInfo)
DECLARE_ASN1_ITEM(CMS_RecipientEncryptedKey)
DECLARE_ASN1_ITEM(CMS_OriginatorPublicKey)
DECLARE_ASN1_ITEM(CMS_RecipientKeyIdentifier)
/* Key Agreement Recipient Info (KARI) routines */
int CMS_RecipientInfo_kari_get0_alg(CMS_RecipientInfo *ri,

@ -464,6 +464,22 @@ int cms_RecipientInfo_kari_encrypt(CMS_ContentInfo *cms,
int cms_RecipientInfo_pwri_crypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri,
int en_de);
DECLARE_ASN1_ITEM(CMS_CertificateChoices)
DECLARE_ASN1_ITEM(CMS_DigestedData)
DECLARE_ASN1_ITEM(CMS_EncryptedData)
DECLARE_ASN1_ITEM(CMS_EnvelopedData)
DECLARE_ASN1_ITEM(CMS_KEKRecipientInfo)
DECLARE_ASN1_ITEM(CMS_KeyAgreeRecipientInfo)
DECLARE_ASN1_ITEM(CMS_KeyTransRecipientInfo)
DECLARE_ASN1_ITEM(CMS_OriginatorPublicKey)
DECLARE_ASN1_ITEM(CMS_OtherKeyAttribute)
DECLARE_ASN1_ITEM(CMS_Receipt)
DECLARE_ASN1_ITEM(CMS_ReceiptRequest)
DECLARE_ASN1_ITEM(CMS_RecipientEncryptedKey)
DECLARE_ASN1_ITEM(CMS_RecipientKeyIdentifier)
DECLARE_ASN1_ITEM(CMS_RevocationInfoChoice)
DECLARE_ASN1_ITEM(CMS_SignedData)
#ifdef __cplusplus
}
#endif

@ -64,8 +64,6 @@
IMPLEMENT_ASN1_FUNCTIONS(CMS_ContentInfo)
IMPLEMENT_ASN1_PRINT_FUNCTION(CMS_ContentInfo)
DECLARE_ASN1_ITEM(CMS_CertificateChoices)
DECLARE_ASN1_ITEM(CMS_RevocationInfoChoice)
DECLARE_STACK_OF(CMS_CertificateChoices)
DECLARE_STACK_OF(CMS_RevocationInfoChoice)

@ -64,8 +64,6 @@
/* CMS SignedData Utilities */
DECLARE_ASN1_ITEM(CMS_SignedData)
static CMS_SignedData *cms_get0_signed(CMS_ContentInfo *cms)
{
if (OBJ_obj2nid(cms->contentType) != NID_pkcs7_signed) {

@ -67,8 +67,6 @@
# include <openssl/cms.h>
#endif
extern const EVP_PKEY_ASN1_METHOD dhx_asn1_meth;
/*
* i2d/d2i like DH parameter functions which use the appropriate routine for
* PKCS#3 DH or X9.42 DH.

@ -85,7 +85,7 @@ ASN1_SEQUENCE_cb(DHparams, dh_cb) = {
ASN1_SIMPLE(DH, p, BIGNUM),
ASN1_SIMPLE(DH, g, BIGNUM),
ASN1_OPT(DH, length, ZLONG),
} ASN1_SEQUENCE_END_cb(DH, DHparams)
} static_ASN1_SEQUENCE_END_cb(DH, DHparams)
IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(DH, DHparams, DHparams)
@ -110,7 +110,7 @@ typedef struct {
ASN1_SEQUENCE(DHvparams) = {
ASN1_SIMPLE(int_dhvparams, seed, ASN1_BIT_STRING),
ASN1_SIMPLE(int_dhvparams, counter, BIGNUM)
} ASN1_SEQUENCE_END_name(int_dhvparams, DHvparams)
} static_ASN1_SEQUENCE_END_name(int_dhvparams, DHvparams)
ASN1_SEQUENCE(DHxparams) = {
ASN1_SIMPLE(int_dhx942_dh, p, BIGNUM),
@ -118,7 +118,7 @@ ASN1_SEQUENCE(DHxparams) = {
ASN1_SIMPLE(int_dhx942_dh, q, BIGNUM),
ASN1_OPT(int_dhx942_dh, j, BIGNUM),
ASN1_OPT(int_dhx942_dh, vparams, DHvparams),
} ASN1_SEQUENCE_END_name(int_dhx942_dh, DHxparams)
} static_ASN1_SEQUENCE_END_name(int_dhx942_dh, DHxparams)
int_dhx942_dh *d2i_int_dhx(int_dhx942_dh **a,
const unsigned char **pp, long length);

@ -61,11 +61,6 @@
#include <openssl/dh.h>
#include <openssl/bn.h>
#define make_dh_bn(x) \
const extern BIGNUM _bignum_dh##x##_p;\
const extern BIGNUM _bignum_dh##x##_g;\
const extern BIGNUM _bignum_dh##x##_q;
/*
* Macro to make a DH structure from BIGNUM data. NB: although just copying
* the BIGNUM static pointers would be more efficient we can't as they get
@ -90,10 +85,6 @@ DH * DH_get_##x(void) \
return dh; \
}
make_dh_bn(1024_160)
make_dh_bn(2048_224)
make_dh_bn(2048_256)
make_dh(1024_160)
make_dh(2048_224)
make_dh(2048_256)

@ -86,7 +86,7 @@ static int sig_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
ASN1_SEQUENCE_cb(DSA_SIG, sig_cb) = {
ASN1_SIMPLE(DSA_SIG, r, CBIGNUM),
ASN1_SIMPLE(DSA_SIG, s, CBIGNUM)
} ASN1_SEQUENCE_END_cb(DSA_SIG, DSA_SIG)
} static_ASN1_SEQUENCE_END_cb(DSA_SIG, DSA_SIG)
IMPLEMENT_ASN1_FUNCTIONS_const(DSA_SIG)
@ -114,7 +114,7 @@ ASN1_SEQUENCE_cb(DSAPrivateKey, dsa_cb) = {
ASN1_SIMPLE(DSA, g, BIGNUM),
ASN1_SIMPLE(DSA, pub_key, BIGNUM),
ASN1_SIMPLE(DSA, priv_key, CBIGNUM)
} ASN1_SEQUENCE_END_cb(DSA, DSAPrivateKey)
} static_ASN1_SEQUENCE_END_cb(DSA, DSAPrivateKey)
IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(DSA, DSAPrivateKey, DSAPrivateKey)
@ -122,7 +122,7 @@ ASN1_SEQUENCE_cb(DSAparams, dsa_cb) = {
ASN1_SIMPLE(DSA, p, BIGNUM),
ASN1_SIMPLE(DSA, q, BIGNUM),
ASN1_SIMPLE(DSA, g, BIGNUM),
} ASN1_SEQUENCE_END_cb(DSA, DSAparams)
} static_ASN1_SEQUENCE_END_cb(DSA, DSAparams)
IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(DSA, DSAparams, DSAparams)
@ -137,7 +137,7 @@ ASN1_SEQUENCE(DSAPublicKey) = {
ASN1_SIMPLE(DSA, p, BIGNUM),
ASN1_SIMPLE(DSA, q, BIGNUM),
ASN1_SIMPLE(DSA, g, BIGNUM)
} ASN1_SEQUENCE_END_name(DSA, DSAPublicKey)
} static_ASN1_SEQUENCE_END_name(DSA, DSAPublicKey)
IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(DSA, DSAPublicKey, DSAPublicKey)

@ -204,7 +204,7 @@ ASN1_SEQUENCE(X9_62_PENTANOMIAL) = {
ASN1_SIMPLE(X9_62_PENTANOMIAL, k1, LONG),
ASN1_SIMPLE(X9_62_PENTANOMIAL, k2, LONG),
ASN1_SIMPLE(X9_62_PENTANOMIAL, k3, LONG)
} ASN1_SEQUENCE_END(X9_62_PENTANOMIAL)
} static_ASN1_SEQUENCE_END(X9_62_PENTANOMIAL)
DECLARE_ASN1_ALLOC_FUNCTIONS(X9_62_PENTANOMIAL)
IMPLEMENT_ASN1_ALLOC_FUNCTIONS(X9_62_PENTANOMIAL)
@ -221,7 +221,7 @@ ASN1_SEQUENCE(X9_62_CHARACTERISTIC_TWO) = {
ASN1_SIMPLE(X9_62_CHARACTERISTIC_TWO, m, LONG),
ASN1_SIMPLE(X9_62_CHARACTERISTIC_TWO, type, ASN1_OBJECT),
ASN1_ADB_OBJECT(X9_62_CHARACTERISTIC_TWO)
} ASN1_SEQUENCE_END(X9_62_CHARACTERISTIC_TWO)
} static_ASN1_SEQUENCE_END(X9_62_CHARACTERISTIC_TWO)
DECLARE_ASN1_ALLOC_FUNCTIONS(X9_62_CHARACTERISTIC_TWO)
IMPLEMENT_ASN1_ALLOC_FUNCTIONS(X9_62_CHARACTERISTIC_TWO)
@ -236,13 +236,13 @@ ASN1_ADB(X9_62_FIELDID) = {
ASN1_SEQUENCE(X9_62_FIELDID) = {
ASN1_SIMPLE(X9_62_FIELDID, fieldType, ASN1_OBJECT),
ASN1_ADB_OBJECT(X9_62_FIELDID)
} ASN1_SEQUENCE_END(X9_62_FIELDID)
} static_ASN1_SEQUENCE_END(X9_62_FIELDID)
ASN1_SEQUENCE(X9_62_CURVE) = {
ASN1_SIMPLE(X9_62_CURVE, a, ASN1_OCTET_STRING),
ASN1_SIMPLE(X9_62_CURVE, b, ASN1_OCTET_STRING),
ASN1_OPT(X9_62_CURVE, seed, ASN1_BIT_STRING)
} ASN1_SEQUENCE_END(X9_62_CURVE)
} static_ASN1_SEQUENCE_END(X9_62_CURVE)
ASN1_SEQUENCE(ECPARAMETERS) = {
ASN1_SIMPLE(ECPARAMETERS, version, LONG),
@ -251,7 +251,7 @@ ASN1_SEQUENCE(ECPARAMETERS) = {
ASN1_SIMPLE(ECPARAMETERS, base, ASN1_OCTET_STRING),
ASN1_SIMPLE(ECPARAMETERS, order, ASN1_INTEGER),
ASN1_OPT(ECPARAMETERS, cofactor, ASN1_INTEGER)
} ASN1_SEQUENCE_END(ECPARAMETERS)
} static_ASN1_SEQUENCE_END(ECPARAMETERS)
DECLARE_ASN1_ALLOC_FUNCTIONS(ECPARAMETERS)
IMPLEMENT_ASN1_ALLOC_FUNCTIONS(ECPARAMETERS)
@ -260,7 +260,7 @@ ASN1_CHOICE(ECPKPARAMETERS) = {
ASN1_SIMPLE(ECPKPARAMETERS, value.named_curve, ASN1_OBJECT),
ASN1_SIMPLE(ECPKPARAMETERS, value.parameters, ECPARAMETERS),
ASN1_SIMPLE(ECPKPARAMETERS, value.implicitlyCA, ASN1_NULL)
} ASN1_CHOICE_END(ECPKPARAMETERS)
} static_ASN1_CHOICE_END(ECPKPARAMETERS)
DECLARE_ASN1_FUNCTIONS_const(ECPKPARAMETERS)
DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECPKPARAMETERS, ECPKPARAMETERS)
@ -271,7 +271,7 @@ ASN1_SEQUENCE(EC_PRIVATEKEY) = {
ASN1_SIMPLE(EC_PRIVATEKEY, privateKey, ASN1_OCTET_STRING),
ASN1_EXP_OPT(EC_PRIVATEKEY, parameters, ECPKPARAMETERS, 0),
ASN1_EXP_OPT(EC_PRIVATEKEY, publicKey, ASN1_BIT_STRING, 1)
} ASN1_SEQUENCE_END(EC_PRIVATEKEY)
} static_ASN1_SEQUENCE_END(EC_PRIVATEKEY)
DECLARE_ASN1_FUNCTIONS_const(EC_PRIVATEKEY)
DECLARE_ASN1_ENCODE_FUNCTIONS_const(EC_PRIVATEKEY, EC_PRIVATEKEY)

@ -60,7 +60,7 @@
ASN1_SEQUENCE(ECDSA_SIG) = {
ASN1_SIMPLE(ECDSA_SIG, r, CBIGNUM),
ASN1_SIMPLE(ECDSA_SIG, s, CBIGNUM)
} ASN1_SEQUENCE_END(ECDSA_SIG)
} static_ASN1_SEQUENCE_END(ECDSA_SIG)
DECLARE_ASN1_FUNCTIONS_const(ECDSA_SIG)
DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECDSA_SIG, ECDSA_SIG)

@ -100,19 +100,20 @@ eng_cnf.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
eng_cnf.o: ../include/internal/cryptlib.h eng_cnf.c eng_int.h
eng_cryptodev.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
eng_cryptodev.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
eng_cryptodev.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
eng_cryptodev.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
eng_cryptodev.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
eng_cryptodev.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
eng_cryptodev.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
eng_cryptodev.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
eng_cryptodev.o: ../../include/openssl/obj_mac.h
eng_cryptodev.o: ../../include/openssl/err.h ../../include/openssl/evp.h
eng_cryptodev.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
eng_cryptodev.o: ../../include/openssl/objects.h
eng_cryptodev.o: ../../include/openssl/opensslconf.h
eng_cryptodev.o: ../../include/openssl/opensslv.h
eng_cryptodev.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
eng_cryptodev.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
eng_cryptodev.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
eng_cryptodev.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
eng_cryptodev.o: eng_cryptodev.c
eng_cryptodev.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
eng_cryptodev.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
eng_cryptodev.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
eng_cryptodev.o: ../../include/openssl/x509_vfy.h eng_cryptodev.c
eng_ctrl.o: ../../e_os.h ../../include/openssl/asn1.h
eng_ctrl.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
eng_ctrl.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h

@ -535,7 +535,7 @@ static int cryptodev_cleanup(EVP_CIPHER_CTX *ctx)
*/
/* RC4 */
const EVP_CIPHER cryptodev_rc4 = {
static const EVP_CIPHER cryptodev_rc4 = {
NID_rc4,
1, 16, 0,
EVP_CIPH_VARIABLE_LENGTH,
@ -549,7 +549,7 @@ const EVP_CIPHER cryptodev_rc4 = {
};
/* DES CBC EVP */
const EVP_CIPHER cryptodev_des_cbc = {
static const EVP_CIPHER cryptodev_des_cbc = {
NID_des_cbc,
8, 8, 8,
EVP_CIPH_CBC_MODE,
@ -563,7 +563,7 @@ const EVP_CIPHER cryptodev_des_cbc = {
};
/* 3DES CBC EVP */
const EVP_CIPHER cryptodev_3des_cbc = {
static const EVP_CIPHER cryptodev_3des_cbc = {
NID_des_ede3_cbc,
8, 24, 8,
EVP_CIPH_CBC_MODE,
@ -576,7 +576,7 @@ const EVP_CIPHER cryptodev_3des_cbc = {
NULL
};
const EVP_CIPHER cryptodev_bf_cbc = {
static const EVP_CIPHER cryptodev_bf_cbc = {
NID_bf_cbc,
8, 16, 8,
EVP_CIPH_CBC_MODE,
@ -589,7 +589,7 @@ const EVP_CIPHER cryptodev_bf_cbc = {
NULL
};
const EVP_CIPHER cryptodev_cast_cbc = {
static const EVP_CIPHER cryptodev_cast_cbc = {
NID_cast5_cbc,
8, 16, 8,
EVP_CIPH_CBC_MODE,
@ -602,7 +602,7 @@ const EVP_CIPHER cryptodev_cast_cbc = {
NULL
};
const EVP_CIPHER cryptodev_aes_cbc = {
static const EVP_CIPHER cryptodev_aes_cbc = {
NID_aes_128_cbc,
16, 16, 16,
EVP_CIPH_CBC_MODE,
@ -615,7 +615,7 @@ const EVP_CIPHER cryptodev_aes_cbc = {
NULL
};
const EVP_CIPHER cryptodev_aes_192_cbc = {
static const EVP_CIPHER cryptodev_aes_192_cbc = {
NID_aes_192_cbc,
16, 24, 16,
EVP_CIPH_CBC_MODE,
@ -628,7 +628,7 @@ const EVP_CIPHER cryptodev_aes_192_cbc = {
NULL
};
const EVP_CIPHER cryptodev_aes_256_cbc = {
static const EVP_CIPHER cryptodev_aes_256_cbc = {
NID_aes_256_cbc,
16, 32, 16,
EVP_CIPH_CBC_MODE,

@ -290,7 +290,6 @@ e_null.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
e_null.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
e_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
e_null.o: ../include/internal/cryptlib.h e_null.c
e_old.o: e_old.c
e_rc2.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
e_rc2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
e_rc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
@ -756,20 +755,22 @@ pmeth_gn.o: ../include/internal/cryptlib.h ../include/internal/evp_int.h
pmeth_gn.o: pmeth_gn.c
pmeth_lib.o: ../../e_os.h ../../include/openssl/asn1.h
pmeth_lib.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
pmeth_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
pmeth_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
pmeth_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
pmeth_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
pmeth_lib.o: ../../include/openssl/cmac.h ../../include/openssl/crypto.h
pmeth_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
pmeth_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
pmeth_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
pmeth_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h
pmeth_lib.o: ../../include/openssl/evp.h ../../include/openssl/hmac.h
pmeth_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
pmeth_lib.o: ../../include/openssl/objects.h
pmeth_lib.o: ../../include/openssl/opensslconf.h
pmeth_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
pmeth_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
pmeth_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
pmeth_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
pmeth_lib.o: ../../include/openssl/x509_vfy.h ../include/internal/asn1_int.h
pmeth_lib.o: ../include/internal/cryptlib.h ../include/internal/evp_int.h
pmeth_lib.o: pmeth_lib.c
pmeth_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
pmeth_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
pmeth_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
pmeth_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
pmeth_lib.o: ../include/internal/asn1_int.h ../include/internal/cryptlib.h
pmeth_lib.o: ../include/internal/evp_int.h pmeth_lib.c
scrypt.o: ../../include/internal/numbers.h ../../include/openssl/asn1.h
scrypt.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
scrypt.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h

@ -60,8 +60,13 @@
#include <stdio.h>
#include <stdlib.h>
#include "internal/cryptlib.h"
#include <openssl/objects.h>
#include <openssl/cmac.h>
#include <openssl/dh.h>
#include <openssl/dsa.h>
#include <openssl/evp.h>
#include <openssl/hmac.h>
#include <openssl/objects.h>
#include <openssl/rsa.h>
#ifndef OPENSSL_NO_ENGINE
# include <openssl/engine.h>
#endif
@ -71,11 +76,7 @@
typedef int sk_cmp_fn_type(const char *const *a, const char *const *b);
DECLARE_STACK_OF(EVP_PKEY_METHOD)
STACK_OF(EVP_PKEY_METHOD) *app_pkey_methods = NULL;
extern const EVP_PKEY_METHOD rsa_pkey_meth, dh_pkey_meth, dsa_pkey_meth;
extern const EVP_PKEY_METHOD ec_pkey_meth, hmac_pkey_meth, cmac_pkey_meth;
extern const EVP_PKEY_METHOD dhx_pkey_meth;
static STACK_OF(EVP_PKEY_METHOD) *app_pkey_methods = NULL;
static const EVP_PKEY_METHOD *standard_methods[] = {
#ifndef OPENSSL_NO_RSA

@ -104,6 +104,14 @@ struct evp_pkey_asn1_method_st {
ASN1_BIT_STRING *sig);
} /* EVP_PKEY_ASN1_METHOD */ ;
extern const EVP_PKEY_ASN1_METHOD cmac_asn1_meth;
extern const EVP_PKEY_ASN1_METHOD dh_asn1_meth;
extern const EVP_PKEY_ASN1_METHOD dhx_asn1_meth;
extern const EVP_PKEY_ASN1_METHOD dsa_asn1_meths[];
extern const EVP_PKEY_ASN1_METHOD eckey_asn1_meth;
extern const EVP_PKEY_ASN1_METHOD hmac_asn1_meth;
extern const EVP_PKEY_ASN1_METHOD rsa_asn1_meths[];
/*
* These are used internally in the ASN1_OBJECT to keep track of whether the
* names and data need to be free()ed

@ -214,4 +214,4 @@ v3_ocsp.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
v3_ocsp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
v3_ocsp.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
v3_ocsp.o: ../../include/openssl/x509v3.h ../include/internal/cryptlib.h
v3_ocsp.o: ocsp_lcl.h v3_ocsp.c
v3_ocsp.o: ../x509v3/ext_dat.h ocsp_lcl.h v3_ocsp.c

@ -64,6 +64,7 @@
# include <openssl/ocsp.h>
# include "ocsp_lcl.h"
# include <openssl/x509v3.h>
# include "../x509v3/ext_dat.h"
/*
* OCSP extensions and a couple of CRL entry extensions

@ -31,7 +31,7 @@
#endif
#ifdef IMPLEMENTED
size_t secure_mem_used;
static size_t secure_mem_used;
static int secure_mem_initialized;
static int too_late;

@ -64,7 +64,7 @@
ASN1_SEQUENCE(TS_MSG_IMPRINT) = {
ASN1_SIMPLE(TS_MSG_IMPRINT, hash_algo, X509_ALGOR),
ASN1_SIMPLE(TS_MSG_IMPRINT, hashed_msg, ASN1_OCTET_STRING)
} ASN1_SEQUENCE_END(TS_MSG_IMPRINT)
} static_ASN1_SEQUENCE_END(TS_MSG_IMPRINT)
IMPLEMENT_ASN1_FUNCTIONS_const(TS_MSG_IMPRINT)
IMPLEMENT_ASN1_DUP_FUNCTION(TS_MSG_IMPRINT)
@ -98,7 +98,7 @@ ASN1_SEQUENCE(TS_REQ) = {
ASN1_OPT(TS_REQ, nonce, ASN1_INTEGER),
ASN1_OPT(TS_REQ, cert_req, ASN1_FBOOLEAN),
ASN1_IMP_SEQUENCE_OF_OPT(TS_REQ, extensions, X509_EXTENSION, 0)
} ASN1_SEQUENCE_END(TS_REQ)
} static_ASN1_SEQUENCE_END(TS_REQ)
IMPLEMENT_ASN1_FUNCTIONS_const(TS_REQ)
IMPLEMENT_ASN1_DUP_FUNCTION(TS_REQ)
@ -127,7 +127,7 @@ ASN1_SEQUENCE(TS_ACCURACY) = {
ASN1_OPT(TS_ACCURACY, seconds, ASN1_INTEGER),
ASN1_IMP_OPT(TS_ACCURACY, millis, ASN1_INTEGER, 0),
ASN1_IMP_OPT(TS_ACCURACY, micros, ASN1_INTEGER, 1)
} ASN1_SEQUENCE_END(TS_ACCURACY)
} static_ASN1_SEQUENCE_END(TS_ACCURACY)
IMPLEMENT_ASN1_FUNCTIONS_const(TS_ACCURACY)
IMPLEMENT_ASN1_DUP_FUNCTION(TS_ACCURACY)
@ -143,7 +143,7 @@ ASN1_SEQUENCE(TS_TST_INFO) = {
ASN1_OPT(TS_TST_INFO, nonce, ASN1_INTEGER),
ASN1_EXP_OPT(TS_TST_INFO, tsa, GENERAL_NAME, 0),
ASN1_IMP_SEQUENCE_OF_OPT(TS_TST_INFO, extensions, X509_EXTENSION, 1)
} ASN1_SEQUENCE_END(TS_TST_INFO)
} static_ASN1_SEQUENCE_END(TS_TST_INFO)
IMPLEMENT_ASN1_FUNCTIONS_const(TS_TST_INFO)
IMPLEMENT_ASN1_DUP_FUNCTION(TS_TST_INFO)
@ -174,7 +174,7 @@ ASN1_SEQUENCE(TS_STATUS_INFO) = {
ASN1_SIMPLE(TS_STATUS_INFO, status, ASN1_INTEGER),
ASN1_SEQUENCE_OF_OPT(TS_STATUS_INFO, text, ASN1_UTF8STRING),
ASN1_OPT(TS_STATUS_INFO, failure_info, ASN1_BIT_STRING)
} ASN1_SEQUENCE_END(TS_STATUS_INFO)
} static_ASN1_SEQUENCE_END(TS_STATUS_INFO)
IMPLEMENT_ASN1_FUNCTIONS_const(TS_STATUS_INFO)
IMPLEMENT_ASN1_DUP_FUNCTION(TS_STATUS_INFO)
@ -223,7 +223,7 @@ static int ts_resp_cb(int op, ASN1_VALUE **pval, const ASN1_ITEM *it,
ASN1_SEQUENCE_cb(TS_RESP, ts_resp_cb) = {
ASN1_SIMPLE(TS_RESP, status_info, TS_STATUS_INFO),
ASN1_OPT(TS_RESP, token, PKCS7),
} ASN1_SEQUENCE_END_cb(TS_RESP, TS_RESP)
} static_ASN1_SEQUENCE_END_cb(TS_RESP, TS_RESP)
IMPLEMENT_ASN1_FUNCTIONS_const(TS_RESP)
@ -253,7 +253,7 @@ int i2d_TS_RESP_fp(FILE *fp, TS_RESP *a)
ASN1_SEQUENCE(ESS_ISSUER_SERIAL) = {
ASN1_SEQUENCE_OF(ESS_ISSUER_SERIAL, issuer, GENERAL_NAME),
ASN1_SIMPLE(ESS_ISSUER_SERIAL, serial, ASN1_INTEGER)
} ASN1_SEQUENCE_END(ESS_ISSUER_SERIAL)
} static_ASN1_SEQUENCE_END(ESS_ISSUER_SERIAL)
IMPLEMENT_ASN1_FUNCTIONS_const(ESS_ISSUER_SERIAL)
IMPLEMENT_ASN1_DUP_FUNCTION(ESS_ISSUER_SERIAL)
@ -261,7 +261,7 @@ IMPLEMENT_ASN1_DUP_FUNCTION(ESS_ISSUER_SERIAL)
ASN1_SEQUENCE(ESS_CERT_ID) = {
ASN1_SIMPLE(ESS_CERT_ID, hash, ASN1_OCTET_STRING),
ASN1_OPT(ESS_CERT_ID, issuer_serial, ESS_ISSUER_SERIAL)
} ASN1_SEQUENCE_END(ESS_CERT_ID)
} static_ASN1_SEQUENCE_END(ESS_CERT_ID)
IMPLEMENT_ASN1_FUNCTIONS_const(ESS_CERT_ID)
IMPLEMENT_ASN1_DUP_FUNCTION(ESS_CERT_ID)
@ -269,7 +269,7 @@ IMPLEMENT_ASN1_DUP_FUNCTION(ESS_CERT_ID)
ASN1_SEQUENCE(ESS_SIGNING_CERT) = {
ASN1_SEQUENCE_OF(ESS_SIGNING_CERT, cert_ids, ESS_CERT_ID),
ASN1_SEQUENCE_OF_OPT(ESS_SIGNING_CERT, policy_info, POLICYINFO)
} ASN1_SEQUENCE_END(ESS_SIGNING_CERT)
} static_ASN1_SEQUENCE_END(ESS_SIGNING_CERT)
IMPLEMENT_ASN1_FUNCTIONS_const(ESS_SIGNING_CERT)
IMPLEMENT_ASN1_DUP_FUNCTION(ESS_SIGNING_CERT)

@ -99,7 +99,7 @@ static void free_dir(X509_LOOKUP *lu);
static int add_cert_dir(BY_DIR *ctx, const char *dir, int type);
static int get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name,
X509_OBJECT *ret);
X509_LOOKUP_METHOD x509_dir_lookup = {
static X509_LOOKUP_METHOD x509_dir_lookup = {
"Load certs from files in a directory",
new_dir, /* new */
free_dir, /* free */

@ -70,7 +70,7 @@
static int by_file_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
long argl, char **ret);
X509_LOOKUP_METHOD x509_file_lookup = {
static X509_LOOKUP_METHOD x509_file_lookup = {
"Load file into cache",
NULL, /* new */
NULL, /* free */

@ -102,11 +102,11 @@ IMPLEMENT_ASN1_DUP_FUNCTION(X509_NAME_ENTRY)
ASN1_ITEM_TEMPLATE(X509_NAME_ENTRIES) =
ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SET_OF, 0, RDNS, X509_NAME_ENTRY)
ASN1_ITEM_TEMPLATE_END(X509_NAME_ENTRIES)
static_ASN1_ITEM_TEMPLATE_END(X509_NAME_ENTRIES)
ASN1_ITEM_TEMPLATE(X509_NAME_INTERNAL) =
ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, Name, X509_NAME_ENTRIES)
ASN1_ITEM_TEMPLATE_END(X509_NAME_INTERNAL)
static_ASN1_ITEM_TEMPLATE_END(X509_NAME_INTERNAL)
/*
* Normally that's where it would end: we'd have two nested STACK structures
@ -115,7 +115,7 @@ ASN1_ITEM_TEMPLATE_END(X509_NAME_INTERNAL)
* convert to the external form.
*/
const ASN1_EXTERN_FUNCS x509_name_ff = {
static const ASN1_EXTERN_FUNCS x509_name_ff = {
NULL,
x509_name_ex_new,
x509_name_ex_free,

@ -168,7 +168,7 @@ v3_addr.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
v3_addr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
v3_addr.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
v3_addr.o: ../../include/openssl/x509v3.h ../include/internal/cryptlib.h
v3_addr.o: v3_addr.c
v3_addr.o: ext_dat.h v3_addr.c
v3_akey.o: ../../e_os.h ../../include/openssl/asn1.h
v3_akey.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
v3_akey.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h
@ -183,7 +183,7 @@ v3_akey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
v3_akey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
v3_akey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
v3_akey.o: ../../include/openssl/x509v3.h ../include/internal/cryptlib.h
v3_akey.o: v3_akey.c
v3_akey.o: ext_dat.h v3_akey.c
v3_akeya.o: ../../e_os.h ../../include/openssl/asn1.h
v3_akeya.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
v3_akeya.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h
@ -212,7 +212,7 @@ v3_alt.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
v3_alt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
v3_alt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
v3_alt.o: ../../include/openssl/x509v3.h ../include/internal/cryptlib.h
v3_alt.o: v3_alt.c
v3_alt.o: ext_dat.h v3_alt.c
v3_asid.o: ../../e_os.h ../../include/openssl/asn1.h
v3_asid.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
v3_asid.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
@ -227,7 +227,7 @@ v3_asid.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
v3_asid.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
v3_asid.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
v3_asid.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
v3_asid.o: ../include/internal/cryptlib.h v3_asid.c
v3_asid.o: ../include/internal/cryptlib.h ext_dat.h v3_asid.c
v3_bcons.o: ../../e_os.h ../../include/openssl/asn1.h
v3_bcons.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
v3_bcons.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h
@ -242,7 +242,7 @@ v3_bcons.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
v3_bcons.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
v3_bcons.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
v3_bcons.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
v3_bcons.o: ../include/internal/cryptlib.h v3_bcons.c
v3_bcons.o: ../include/internal/cryptlib.h ext_dat.h v3_bcons.c
v3_bitst.o: ../../e_os.h ../../include/openssl/asn1.h
v3_bitst.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
v3_bitst.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
@ -256,7 +256,7 @@ v3_bitst.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
v3_bitst.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
v3_bitst.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
v3_bitst.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
v3_bitst.o: ../include/internal/cryptlib.h v3_bitst.c
v3_bitst.o: ../include/internal/cryptlib.h ext_dat.h v3_bitst.c
v3_conf.o: ../../e_os.h ../../include/openssl/asn1.h
v3_conf.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
v3_conf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
@ -286,7 +286,7 @@ v3_cpols.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
v3_cpols.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
v3_cpols.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
v3_cpols.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
v3_cpols.o: ../include/internal/cryptlib.h pcy_int.h v3_cpols.c
v3_cpols.o: ../include/internal/cryptlib.h ext_dat.h pcy_int.h v3_cpols.c
v3_crld.o: ../../e_os.h ../../include/openssl/asn1.h
v3_crld.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
v3_crld.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h
@ -301,7 +301,7 @@ v3_crld.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
v3_crld.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
v3_crld.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
v3_crld.o: ../../include/openssl/x509v3.h ../include/internal/cryptlib.h
v3_crld.o: ../include/internal/x509_int.h v3_crld.c
v3_crld.o: ../include/internal/x509_int.h ext_dat.h v3_crld.c
v3_enum.o: ../../e_os.h ../../include/openssl/asn1.h
v3_enum.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
v3_enum.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
@ -315,7 +315,7 @@ v3_enum.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
v3_enum.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
v3_enum.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
v3_enum.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
v3_enum.o: ../include/internal/cryptlib.h v3_enum.c
v3_enum.o: ../include/internal/cryptlib.h ext_dat.h v3_enum.c
v3_extku.o: ../../e_os.h ../../include/openssl/asn1.h
v3_extku.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
v3_extku.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h
@ -330,7 +330,7 @@ v3_extku.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
v3_extku.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
v3_extku.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
v3_extku.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
v3_extku.o: ../include/internal/cryptlib.h v3_extku.c
v3_extku.o: ../include/internal/cryptlib.h ext_dat.h v3_extku.c
v3_genn.o: ../../e_os.h ../../include/openssl/asn1.h
v3_genn.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
v3_genn.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h