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 /include | |
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 'include')
-rw-r--r-- | include/openssl/asn1t.h | 71 | ||||
-rw-r--r-- | include/openssl/cmac.h | 2 | ||||
-rw-r--r-- | include/openssl/dh.h | 14 | ||||
-rw-r--r-- | include/openssl/dsa.h | 2 | ||||
-rw-r--r-- | include/openssl/ec.h | 2 | ||||
-rw-r--r-- | include/openssl/hmac.h | 2 | ||||
-rw-r--r-- | include/openssl/rsa.h | 2 | ||||
-rw-r--r-- | include/openssl/ssl.h | 2 |
8 files changed, 96 insertions, 1 deletions
diff --git a/include/openssl/asn1t.h b/include/openssl/asn1t.h index dfd9dac161..6467e4a645 100644 --- a/include/openssl/asn1t.h +++ b/include/openssl/asn1t.h @@ -84,7 +84,10 @@ extern "C" { # define ASN1_ITEM_start(itname) \ OPENSSL_GLOBAL const ASN1_ITEM itname##_it = { -# define ASN1_ITEM_end(itname) \ +# define static_ASN1_ITEM_start(itname) \ + static const ASN1_ITEM itname##_it = { + +# define ASN1_ITEM_end(itname) \ }; # else @@ -122,6 +125,17 @@ extern "C" { 0,\ #tname \ ASN1_ITEM_end(tname) +# define static_ASN1_ITEM_TEMPLATE_END(tname) \ + ;\ + static_ASN1_ITEM_start(tname) \ + ASN1_ITYPE_PRIMITIVE,\ + -1,\ + &tname##_item_tt,\ + 0,\ + NULL,\ + 0,\ + #tname \ + ASN1_ITEM_end(tname) /* This is a ASN1 type which just embeds a template */ @@ -151,6 +165,8 @@ extern "C" { # define ASN1_SEQUENCE_END(stname) ASN1_SEQUENCE_END_name(stname, stname) +# define static_ASN1_SEQUENCE_END(stname) static_ASN1_SEQUENCE_END_name(stname, stname) + # define ASN1_SEQUENCE_END_name(stname, tname) \ ;\ ASN1_ITEM_start(tname) \ @@ -163,6 +179,18 @@ extern "C" { #stname \ ASN1_ITEM_end(tname) +# define static_ASN1_SEQUENCE_END_name(stname, tname) \ + ;\ + static_ASN1_ITEM_start(tname) \ + ASN1_ITYPE_SEQUENCE,\ + V_ASN1_SEQUENCE,\ + tname##_seq_tt,\ + sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ + NULL,\ + sizeof(stname),\ + #stname \ + ASN1_ITEM_end(tname) + # define ASN1_NDEF_SEQUENCE(tname) \ ASN1_SEQUENCE(tname) @@ -196,12 +224,26 @@ extern "C" { sizeof(tname),\ #tname \ ASN1_ITEM_end(tname) +# define static_ASN1_NDEF_SEQUENCE_END(tname) \ + ;\ + static_ASN1_ITEM_start(tname) \ + ASN1_ITYPE_NDEF_SEQUENCE,\ + V_ASN1_SEQUENCE,\ + tname##_seq_tt,\ + sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ + NULL,\ + sizeof(tname),\ + #tname \ + ASN1_ITEM_end(tname) # define ASN1_BROKEN_SEQUENCE_END(stname) ASN1_SEQUENCE_END_ref(stname, stname) +# define static_ASN1_BROKEN_SEQUENCE_END(stname) \ + static_ASN1_SEQUENCE_END_ref(stname, stname) # define ASN1_SEQUENCE_END_enc(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname) # define ASN1_SEQUENCE_END_cb(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname) +# define static_ASN1_SEQUENCE_END_cb(stname, tname) static_ASN1_SEQUENCE_END_ref(stname, tname) # define ASN1_SEQUENCE_END_ref(stname, tname) \ ;\ @@ -214,6 +256,17 @@ extern "C" { sizeof(stname),\ #stname \ ASN1_ITEM_end(tname) +# define static_ASN1_SEQUENCE_END_ref(stname, tname) \ + ;\ + static_ASN1_ITEM_start(tname) \ + ASN1_ITYPE_SEQUENCE,\ + V_ASN1_SEQUENCE,\ + tname##_seq_tt,\ + sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\ + &tname##_aux,\ + sizeof(stname),\ + #stname \ + ASN1_ITEM_end(tname) # define ASN1_NDEF_SEQUENCE_END_cb(stname, tname) \ ;\ @@ -259,8 +312,12 @@ extern "C" { # define ASN1_CHOICE_END(stname) ASN1_CHOICE_END_name(stname, stname) +# define static_ASN1_CHOICE_END(stname) static_ASN1_CHOICE_END_name(stname, stname) + # define ASN1_CHOICE_END_name(stname, tname) ASN1_CHOICE_END_selector(stname, tname, type) +# define static_ASN1_CHOICE_END_name(stname, tname) static_ASN1_CHOICE_END_selector(stname, tname, type) + # define ASN1_CHOICE_END_selector(stname, tname, selname) \ ;\ ASN1_ITEM_start(tname) \ @@ -273,6 +330,18 @@ extern "C" { #stname \ ASN1_ITEM_end(tname) +# define static_ASN1_CHOICE_END_selector(stname, tname, selname) \ + ;\ + static_ASN1_ITEM_start(tname) \ + ASN1_ITYPE_CHOICE,\ + offsetof(stname,selname) ,\ + tname##_ch_tt,\ + sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\ + NULL,\ + sizeof(stname),\ + #stname \ + ASN1_ITEM_end(tname) + # define ASN1_CHOICE_END_cb(stname, tname, selname) \ ;\ ASN1_ITEM_start(tname) \ diff --git a/include/openssl/cmac.h b/include/openssl/cmac.h index 175be8348a..cc729c4d57 100644 --- a/include/openssl/cmac.h +++ b/include/openssl/cmac.h @@ -76,6 +76,8 @@ int CMAC_Update(CMAC_CTX *ctx, const void *data, size_t dlen); int CMAC_Final(CMAC_CTX *ctx, unsigned char *out, size_t *poutlen); int CMAC_resume(CMAC_CTX *ctx); +extern const EVP_PKEY_METHOD cmac_pkey_meth; + #ifdef __cplusplus } #endif diff --git a/include/openssl/dh.h b/include/openssl/dh.h index f5b03d32f5..6e928edcc2 100644 --- a/include/openssl/dh.h +++ b/include/openssl/dh.h @@ -342,6 +342,20 @@ int DH_KDF_X9_42(unsigned char *out, size_t outlen, # define EVP_PKEY_DH_KDF_X9_42 2 # endif +extern const EVP_PKEY_METHOD dh_pkey_meth; +extern const EVP_PKEY_METHOD dhx_pkey_meth; + +#define declare_dh_bn(x) \ + const extern BIGNUM _bignum_dh##x##_p;\ + const extern BIGNUM _bignum_dh##x##_g;\ + const extern BIGNUM _bignum_dh##x##_q; + +declare_dh_bn(1024_160) +declare_dh_bn(2048_224) +declare_dh_bn(2048_256) + +#undef declare_dh_bn + /* BEGIN ERROR CODES */ /* * The following lines are auto generated by the script mkerr.pl. Any changes diff --git a/include/openssl/dsa.h b/include/openssl/dsa.h index 8fd55961cb..589216e741 100644 --- a/include/openssl/dsa.h +++ b/include/openssl/dsa.h @@ -276,6 +276,8 @@ DH *DSA_dup_DH(const DSA *r); # define EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS (EVP_PKEY_ALG_CTRL + 2) # define EVP_PKEY_CTRL_DSA_PARAMGEN_MD (EVP_PKEY_ALG_CTRL + 3) +extern const EVP_PKEY_METHOD dsa_pkey_meth; + /* BEGIN ERROR CODES */ /* * The following lines are auto generated by the script mkerr.pl. Any changes diff --git a/include/openssl/ec.h b/include/openssl/ec.h index 6ea4e419c4..c3cd8edd7d 100644 --- a/include/openssl/ec.h +++ b/include/openssl/ec.h @@ -1067,6 +1067,8 @@ int EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off); # define EVP_PKEY_ECDH_KDF_NONE 1 # define EVP_PKEY_ECDH_KDF_X9_62 2 +extern const EVP_PKEY_METHOD ec_pkey_meth; + /* BEGIN ERROR CODES */ /* * The following lines are auto generated by the script mkerr.pl. Any changes diff --git a/include/openssl/hmac.h b/include/openssl/hmac.h index 81aa49da49..d7ecf54ad8 100644 --- a/include/openssl/hmac.h +++ b/include/openssl/hmac.h @@ -104,6 +104,8 @@ __owur int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags); +extern const EVP_PKEY_METHOD hmac_pkey_meth; + #ifdef __cplusplus } #endif diff --git a/include/openssl/rsa.h b/include/openssl/rsa.h index 9abb2a1eda..536a78e08b 100644 --- a/include/openssl/rsa.h +++ b/include/openssl/rsa.h @@ -508,6 +508,8 @@ RSA *RSAPrivateKey_dup(RSA *rsa); */ # define RSA_FLAG_CHECKED 0x0800 +extern const EVP_PKEY_METHOD rsa_pkey_meth; + /* BEGIN ERROR CODES */ /* * The following lines are auto generated by the script mkerr.pl. Any changes diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index 10f8041d10..1334eb6161 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h @@ -1884,6 +1884,8 @@ __owur void *SSL_CTX_get0_security_ex_data(const SSL_CTX *ctx); __owur const struct openssl_ssl_test_functions *SSL_test_functions(void); # endif +extern const char SSL_version_str[]; + /* BEGIN ERROR CODES */ /* * The following lines are auto generated by the script mkerr.pl. Any changes |