Fix "defined but not used" warnings.
authorDr. Stephen Henson <steve@openssl.org>
Fri, 11 Sep 2015 17:16:23 +0000 (18:16 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Fri, 11 Sep 2015 17:16:23 +0000 (18:16 +0100)
Reviewed-by: Matt Caswell <matt@openssl.org>
crypto/include/internal/bn_srp.h
crypto/srp/srp_lib.c
crypto/x509v3/ext_dat.h
crypto/x509v3/v3_lib.c

index 61befd3..153c8cd 100644 (file)
@@ -21,16 +21,4 @@ extern const BIGNUM bn_generator_5;
 
 extern const BIGNUM bn_generator_2;
 
-static SRP_gN knowngN[] = {
-    {"8192", (BIGNUM *)&bn_generator_19, (BIGNUM *)&bn_group_8192},
-    {"6144", (BIGNUM *)&bn_generator_5, (BIGNUM *)&bn_group_6144},
-    {"4096", (BIGNUM *)&bn_generator_5, (BIGNUM *)&bn_group_4096},
-    {"3072", (BIGNUM *)&bn_generator_5, (BIGNUM *)&bn_group_3072},
-    {"2048", (BIGNUM *)&bn_generator_2, (BIGNUM *)&bn_group_2048},
-    {"1536", (BIGNUM *)&bn_generator_2, (BIGNUM *)&bn_group_1536},
-    {"1024", (BIGNUM *)&bn_generator_2, (BIGNUM *)&bn_group_1024},
-};
-
-# define KNOWN_GN_NUMBER sizeof(knowngN) / sizeof(SRP_gN)
-
 #endif
index 8930473..850ec2c 100644 (file)
@@ -306,6 +306,18 @@ int SRP_Verify_A_mod_N(BIGNUM *A, BIGNUM *N)
     return SRP_Verify_B_mod_N(A, N);
 }
 
+static SRP_gN knowngN[] = {
+    {"8192", (BIGNUM *)&bn_generator_19, (BIGNUM *)&bn_group_8192},
+    {"6144", (BIGNUM *)&bn_generator_5, (BIGNUM *)&bn_group_6144},
+    {"4096", (BIGNUM *)&bn_generator_5, (BIGNUM *)&bn_group_4096},
+    {"3072", (BIGNUM *)&bn_generator_5, (BIGNUM *)&bn_group_3072},
+    {"2048", (BIGNUM *)&bn_generator_2, (BIGNUM *)&bn_group_2048},
+    {"1536", (BIGNUM *)&bn_generator_2, (BIGNUM *)&bn_group_1536},
+    {"1024", (BIGNUM *)&bn_generator_2, (BIGNUM *)&bn_group_1024},
+};
+
+# define KNOWN_GN_NUMBER sizeof(knowngN) / sizeof(SRP_gN)
+
 /*
  * Check if G and N are kwown parameters. The values have been generated
  * from the ietf-tls-srp draft version 8
index 0e93d82..c1ddedb 100644 (file)
@@ -70,69 +70,3 @@ extern const X509V3_EXT_METHOD v3_policy_mappings, v3_policy_constraints;
 extern const X509V3_EXT_METHOD v3_name_constraints, v3_inhibit_anyp, v3_idp;
 extern const X509V3_EXT_METHOD v3_addr, v3_asid;
 extern const X509V3_EXT_METHOD v3_ct_scts[];
-
-/*
- * This table will be searched using OBJ_bsearch so it *must* kept in order
- * of the ext_nid values.
- */
-
-static const X509V3_EXT_METHOD *standard_exts[] = {
-    &v3_nscert,
-    &v3_ns_ia5_list[0],
-    &v3_ns_ia5_list[1],
-    &v3_ns_ia5_list[2],
-    &v3_ns_ia5_list[3],
-    &v3_ns_ia5_list[4],
-    &v3_ns_ia5_list[5],
-    &v3_ns_ia5_list[6],
-    &v3_skey_id,
-    &v3_key_usage,
-    &v3_pkey_usage_period,
-    &v3_alt[0],
-    &v3_alt[1],
-    &v3_bcons,
-    &v3_crl_num,
-    &v3_cpols,
-    &v3_akey_id,
-    &v3_crld,
-    &v3_ext_ku,
-    &v3_delta_crl,
-    &v3_crl_reason,
-#ifndef OPENSSL_NO_OCSP
-    &v3_crl_invdate,
-#endif
-    &v3_sxnet,
-    &v3_info,
-#ifndef OPENSSL_NO_RFC3779
-    &v3_addr,
-    &v3_asid,
-#endif
-#ifndef OPENSSL_NO_OCSP
-    &v3_ocsp_nonce,
-    &v3_ocsp_crlid,
-    &v3_ocsp_accresp,
-    &v3_ocsp_nocheck,
-    &v3_ocsp_acutoff,
-    &v3_ocsp_serviceloc,
-#endif
-    &v3_sinfo,
-    &v3_policy_constraints,
-#ifndef OPENSSL_NO_OCSP
-    &v3_crl_hold,
-#endif
-    &v3_pci,
-    &v3_name_constraints,
-    &v3_policy_mappings,
-    &v3_inhibit_anyp,
-    &v3_idp,
-    &v3_alt[2],
-    &v3_freshest_crl,
-#ifndef OPENSSL_NO_SCT
-    &v3_ct_scts[0],
-    &v3_ct_scts[1],
-#endif
-};
-
-/* Number of standard extensions */
-
-#define STANDARD_EXTENSION_COUNT OSSL_NELEM(standard_exts)
index 93af571..5073575 100644 (file)
@@ -96,6 +96,72 @@ DECLARE_OBJ_BSEARCH_CMP_FN(const X509V3_EXT_METHOD *,
 IMPLEMENT_OBJ_BSEARCH_CMP_FN(const X509V3_EXT_METHOD *,
                              const X509V3_EXT_METHOD *, ext);
 
+/*
+ * This table will be searched using OBJ_bsearch so it *must* kept in order
+ * of the ext_nid values.
+ */
+
+static const X509V3_EXT_METHOD *standard_exts[] = {
+    &v3_nscert,
+    &v3_ns_ia5_list[0],
+    &v3_ns_ia5_list[1],
+    &v3_ns_ia5_list[2],
+    &v3_ns_ia5_list[3],
+    &v3_ns_ia5_list[4],
+    &v3_ns_ia5_list[5],
+    &v3_ns_ia5_list[6],
+    &v3_skey_id,
+    &v3_key_usage,
+    &v3_pkey_usage_period,
+    &v3_alt[0],
+    &v3_alt[1],
+    &v3_bcons,
+    &v3_crl_num,
+    &v3_cpols,
+    &v3_akey_id,
+    &v3_crld,
+    &v3_ext_ku,
+    &v3_delta_crl,
+    &v3_crl_reason,
+#ifndef OPENSSL_NO_OCSP
+    &v3_crl_invdate,
+#endif
+    &v3_sxnet,
+    &v3_info,
+#ifndef OPENSSL_NO_RFC3779
+    &v3_addr,
+    &v3_asid,
+#endif
+#ifndef OPENSSL_NO_OCSP
+    &v3_ocsp_nonce,
+    &v3_ocsp_crlid,
+    &v3_ocsp_accresp,
+    &v3_ocsp_nocheck,
+    &v3_ocsp_acutoff,
+    &v3_ocsp_serviceloc,
+#endif
+    &v3_sinfo,
+    &v3_policy_constraints,
+#ifndef OPENSSL_NO_OCSP
+    &v3_crl_hold,
+#endif
+    &v3_pci,
+    &v3_name_constraints,
+    &v3_policy_mappings,
+    &v3_inhibit_anyp,
+    &v3_idp,
+    &v3_alt[2],
+    &v3_freshest_crl,
+#ifndef OPENSSL_NO_SCT
+    &v3_ct_scts[0],
+    &v3_ct_scts[1],
+#endif
+};
+
+/* Number of standard extensions */
+
+#define STANDARD_EXTENSION_COUNT OSSL_NELEM(standard_exts)
+
 const X509V3_EXT_METHOD *X509V3_EXT_get_nid(int nid)
 {
     X509V3_EXT_METHOD tmp;