diff options
author | Ben Laurie <ben@links.org> | 2015-09-05 13:32:58 +0100 |
---|---|---|
committer | Ben Laurie <ben@links.org> | 2015-09-11 04:51:55 +0100 |
commit | df2ee0e27d2db02660c1d15fe6a3e38be9df0a60 (patch) | |
tree | 8a86e360b2f0c811186bf7009f20d13b0c65b820 /crypto | |
parent | 4c7103a5eee1dc472e256ac8818610c6e98a9a39 (diff) |
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>
Diffstat (limited to 'crypto')
58 files changed, 173 insertions, 159 deletions
diff --git a/crypto/asn1/ameth_lib.c b/crypto/asn1/ameth_lib.c index feef015acc..2deb67917b 100644 --- a/crypto/asn1/ameth_lib.c +++ b/crypto/asn1/ameth_lib.c @@ -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 diff --git a/crypto/asn1/evp_asn1.c b/crypto/asn1/evp_asn1.c index 4c3f3e0ffe..b7e5620ec2 100644 --- a/crypto/asn1/evp_asn1.c +++ b/crypto/asn1/evp_asn1.c @@ -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) diff --git a/crypto/asn1/n_pkey.c b/crypto/asn1/n_pkey.c index 0c9c4c48c3..c42422c248 100644 --- a/crypto/asn1/n_pkey.c +++ b/crypto/asn1/n_pkey.c @@ -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) diff --git a/crypto/asn1/p5_scrypt.c b/crypto/asn1/p5_scrypt.c index 35ff396566..3667546634 100644 --- a/crypto/asn1/p5_scrypt.c +++ b/crypto/asn1/p5_scrypt.c @@ -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) diff --git a/crypto/asn1/tasn_prn.c b/crypto/asn1/tasn_prn.c index 5314c61b24..329ef94db1 100644 --- a/crypto/asn1/tasn_prn.c +++ b/crypto/asn1/tasn_prn.c @@ -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 */ diff --git a/crypto/bn/Makefile b/crypto/bn/Makefile index 7d55778d36..5d05e1b093 100644 --- a/crypto/bn/Makefile +++ b/crypto/bn/Makefile @@ -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 diff --git a/crypto/bn/bn_dh.c b/crypto/bn/bn_dh.c index cfd8c067a8..3a7282f740 100644 --- a/crypto/bn/bn_dh.c +++ b/crypto/bn/bn_dh.c @@ -56,6 +56,7 @@ * */ +#include <openssl/dh.h> #include "bn_lcl.h" #include "e_os.h" diff --git a/crypto/bn/bn_srp.c b/crypto/bn/bn_srp.c index 5dd31fc7bf..c575e6a245 100644 --- a/crypto/bn/bn_srp.c +++ b/crypto/bn/bn_srp.c @@ -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 diff --git a/crypto/cms/cms_asn1.c b/crypto/cms/cms_asn1.c index 893ad4657b..2bd3954e1f 100644 --- a/crypto/cms/cms_asn1.c +++ b/crypto/cms/cms_asn1.c @@ -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) diff --git a/crypto/cms/cms_dd.c b/crypto/cms/cms_dd.c index d4067859a3..7609b6f8d4 100644 --- a/crypto/cms/cms_dd.c +++ b/crypto/cms/cms_dd.c @@ -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) diff --git a/crypto/cms/cms_enc.c b/crypto/cms/cms_enc.c index 16b42251d1..fc66f60060 100644 --- a/crypto/cms/cms_enc.c +++ b/crypto/cms/cms_enc.c @@ -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) diff --git a/crypto/cms/cms_env.c b/crypto/cms/cms_env.c index f677a9bc4d..e133bcc6a7 100644 --- a/crypto/cms/cms_env.c +++ b/crypto/cms/cms_env.c @@ -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) diff --git a/crypto/cms/cms_ess.c b/crypto/cms/cms_ess.c index d75ea169e9..2149749983 100644 --- a/crypto/cms/cms_ess.c +++ b/crypto/cms/cms_ess.c @@ -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 */ diff --git a/crypto/cms/cms_kari.c b/crypto/cms/cms_kari.c index d56dd9b84b..77181bc775 100644 --- a/crypto/cms/cms_kari.c +++ b/crypto/cms/cms_kari.c @@ -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, diff --git a/crypto/cms/cms_lcl.h b/crypto/cms/cms_lcl.h index 1f27b0c04a..5b0551c4ca 100644 --- a/crypto/cms/cms_lcl.h +++ b/crypto/cms/cms_lcl.h @@ -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 diff --git a/crypto/cms/cms_lib.c b/crypto/cms/cms_lib.c index 0bfad69f27..ef18418ab6 100644 --- a/crypto/cms/cms_lib.c +++ b/crypto/cms/cms_lib.c @@ -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) diff --git a/crypto/cms/cms_sd.c b/crypto/cms/cms_sd.c index 338e515358..8fc407e6b9 100644 --- a/crypto/cms/cms_sd.c +++ b/crypto/cms/cms_sd.c @@ -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) { diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c index efb3d805e8..f0fcd83c52 100644 --- a/crypto/dh/dh_ameth.c +++ b/crypto/dh/dh_ameth.c @@ -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. diff --git a/crypto/dh/dh_asn1.c b/crypto/dh/dh_asn1.c index 0c6a1deb8b..cc307dc2df 100644 --- a/crypto/dh/dh_asn1.c +++ b/crypto/dh/dh_asn1.c @@ -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); diff --git a/crypto/dh/dh_rfc5114.c b/crypto/dh/dh_rfc5114.c index 752bf2cd12..61cd9ad4d1 100644 --- a/crypto/dh/dh_rfc5114.c +++ b/crypto/dh/dh_rfc5114.c @@ -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) diff --git a/crypto/dsa/dsa_asn1.c b/crypto/dsa/dsa_asn1.c index 85db147822..99bca3b260 100644 --- a/crypto/dsa/dsa_asn1.c +++ b/crypto/dsa/dsa_asn1.c @@ -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), |