Cleanup OPENSSL_NO_xxx, part 1
[openssl.git] / crypto / x509v3 / pcy_cache.c
index 7cad12b51f4760180ea9ecb3c0effea40034701b..172b7e7ee4f46854859ae0b5767c026e4c374e16 100644 (file)
@@ -1,5 +1,5 @@
 /* pcy_cache.c */
-/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
+/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
  * project 2004.
  */
 /* ====================================================================
@@ -62,7 +62,8 @@
 
 #include "pcy_int.h"
 
-static int policy_data_cmp(void *pa, void *pb);
+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);
 
 /* Set cache entry according to CertificatePolicies extension.
@@ -138,7 +139,6 @@ static int policy_cache_new(X509 *x)
                return 0;
        cache->anyPolicy = NULL;
        cache->data = NULL;
-       cache->maps = NULL;
        cache->any_skip = -1;
        cache->explicit_skip = -1;
        cache->map_skip = -1;
@@ -232,7 +232,6 @@ static int policy_cache_new(X509 *x)
        
 }
 
-#if 0
 void policy_cache_free(X509_POLICY_CACHE *cache)
        {
        if (!cache)
@@ -243,7 +242,6 @@ void policy_cache_free(X509_POLICY_CACHE *cache)
                sk_X509_POLICY_DATA_pop_free(cache->data, policy_data_free);
        OPENSSL_free(cache);
        }
-#endif
 
 const X509_POLICY_CACHE *policy_cache_set(X509 *x)
        {
@@ -271,9 +269,9 @@ X509_POLICY_DATA *policy_cache_find_data(const X509_POLICY_CACHE *cache,
        return sk_X509_POLICY_DATA_value(cache->data, idx);
        }
 
-static int policy_data_cmp(void *pa, void *pb)
+static int policy_data_cmp(const X509_POLICY_DATA * const *a,
+                               const X509_POLICY_DATA * const *b)
        {
-       X509_POLICY_DATA **a = pa; X509_POLICY_DATA **b = pb;
        return OBJ_cmp((*a)->valid_policy, (*b)->valid_policy);
        }