]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
ENABLE_PKI is no more
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 10 Feb 2012 12:39:11 +0000 (13:39 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 10 Feb 2012 12:39:49 +0000 (13:39 +0100)
20 files changed:
lib/gnutls_x509.c
lib/x509/crl.c
lib/x509/crl_write.c
lib/x509/crq.c
lib/x509/extensions.c
lib/x509/mpi.c
lib/x509/output.c
lib/x509/pkcs12.c
lib/x509/pkcs12_bag.c
lib/x509/pkcs12_encr.c
lib/x509/pkcs7.c
lib/x509/privkey.c
lib/x509/privkey_pkcs8.c
lib/x509/sign.c
lib/x509/verify.c
lib/x509/x509.c
lib/x509/x509_write.c
src/cli.c
src/dh.c
src/serv.c

index c048feadf3ac58805aceebb908d55d5bfbad7f10..d270650f36e8e521315933998086ccf2c7379887 100644 (file)
@@ -563,8 +563,6 @@ read_key_mem (gnutls_certificate_credentials_t res,
   return 0;
 }
 
-#ifdef ENABLE_PKCS11
-
 /* Reads a private key from a token.
  */
 static int
@@ -773,8 +771,6 @@ cleanup:
   return ret;
 }
 
-#endif /* ENABLE_PKCS11 */
-
 /* Reads a certificate file
  */
 static int
@@ -1590,8 +1586,6 @@ gnutls_certificate_set_x509_trust_file (gnutls_certificate_credentials_t cred,
   return ret;
 }
 
-#ifdef ENABLE_PKI
-
 static int
 parse_pem_crl_mem (gnutls_x509_trust_list_t tlist, 
                    const char * input_crl, unsigned int input_crl_size)
@@ -2294,5 +2288,3 @@ gnutls_certificate_free_crls (gnutls_certificate_credentials_t sc)
   /* do nothing for now */
   return;
 }
-
-#endif
index c1b9005556a46a6da9ef7fc1f296b16489ccb995..46712bc3ae362e77a3425f73fa81375612b6ab1a 100644 (file)
@@ -23,8 +23,6 @@
 #include <gnutls_int.h>
 #include <libtasn1.h>
 
-#ifdef ENABLE_PKI
-
 #include <gnutls_datum.h>
 #include <gnutls_global.h>
 #include <gnutls_errors.h>
@@ -1300,4 +1298,3 @@ error:
   return ret;
 }
 
-#endif
index 32b85701f70928386532bbc50567443138091d0d..9964551271c02b3eefd8e9d13dcd81b86db0681e 100644 (file)
@@ -25,8 +25,6 @@
 
 #include <gnutls_int.h>
 
-#ifdef ENABLE_PKI
-
 #include <gnutls_datum.h>
 #include <gnutls_global.h>
 #include <gnutls_errors.h>
@@ -508,4 +506,3 @@ gnutls_x509_crl_privkey_sign (gnutls_x509_crl_t crl, gnutls_x509_crt_t issuer,
   return 0;
 }
 
-#endif /* ENABLE_PKI */
index a7e56f5bd96baf25eaa46138794e6d7a2c5cc2f5..e21341ebba514220473a693db051d739e9712647 100644 (file)
@@ -26,8 +26,6 @@
 
 #include <gnutls_int.h>
 
-#ifdef ENABLE_PKI
-
 #include <gnutls_datum.h>
 #include <gnutls_global.h>
 #include <gnutls_errors.h>
@@ -2492,5 +2490,3 @@ cleanup:
   return ret;
 }
 
-#endif /* ENABLE_PKI */
-
index 166e63d2877787b15d8c972644cb2f2e5e2dd4bc..a429bfea278ad29c0d5545115a642888809eecd9 100644 (file)
@@ -514,7 +514,6 @@ _gnutls_x509_crl_set_extension (gnutls_x509_crl_t crl,
                         ext_data, critical);
 }
 
-#ifdef ENABLE_PKI
 int
 _gnutls_x509_crq_set_extension (gnutls_x509_crq_t crq,
                                 const char *ext_id,
@@ -608,8 +607,6 @@ _gnutls_x509_crq_set_extension (gnutls_x509_crq_t crq,
   return 0;
 }
 
-#endif
-
 /* Here we only extract the KeyUsage field, from the DER encoded
  * extension.
  */
index f69eb4c9b5e70d98cbc6d6f0f169e931be45670a..baef1ee89fcac9d27ff1c1d34193b21fe17723f8 100644 (file)
@@ -160,8 +160,6 @@ _gnutls_x509_crt_get_mpis (gnutls_x509_crt_t cert,
                                "tbsCertificate.subjectPublicKeyInfo", params);
 }
 
-#ifdef ENABLE_PKI
-
 /* Extracts DSA and RSA parameters from a certificate.
  */
 int
@@ -175,9 +173,6 @@ _gnutls_x509_crq_get_mpis (gnutls_x509_crq_t cert,
                                params);
 }
 
-#endif
-
-
 /*
  * This function writes and encodes the parameters for DSS or RSA keys.
  * This is the "signatureAlgorithm" fields.
index 827845f427b62122868f991a92c49c08628f8fd3..a16ec4a7da6143ea3634ddde67b71dedfcf84c44 100644 (file)
@@ -437,8 +437,6 @@ print_key_usage (gnutls_buffer_st * str, const char *prefix, int type,
     addf (str, _("%s\t\t\tKey decipher only.\n"), prefix);
 }
 
-#ifdef ENABLE_PKI
-
 static void
 print_crldist (gnutls_buffer_st * str, gnutls_x509_crt_t cert)
 {
@@ -600,8 +598,6 @@ print_key_purpose (gnutls_buffer_st * str, const char *prefix, int type,
     }
 }
 
-#endif
-
 static void
 print_basic (gnutls_buffer_st * str, const char *prefix, int type,
              cert_type_t cert)
@@ -967,10 +963,7 @@ print_extensions (gnutls_buffer_st * str, const char *prefix, int type,
           addf (str, _("%s\t\tKey Purpose (%s):\n"), prefix,
                 critical ? _("critical") : _("not critical"));
 
-#ifdef ENABLE_PKI
           print_key_purpose (str, prefix, type, cert);
-#endif
-
           keypurpose_idx++;
         }
       else if (strcmp (oid, "2.5.29.17") == 0)
@@ -1014,11 +1007,8 @@ print_extensions (gnutls_buffer_st * str, const char *prefix, int type,
           addf (str, _("%s\t\tCRL Distribution points (%s):\n"), prefix,
                 critical ? _("critical") : _("not critical"));
 
-#ifdef ENABLE_PKI
           if (type == TYPE_CRT)
             print_crldist (str, cert.crt);
-#endif
-
           crldist_idx++;
         }
       else if (strcmp (oid, "1.3.6.1.5.5.7.1.14") == 0)
@@ -1252,7 +1242,6 @@ print_cert (gnutls_buffer_st * str, gnutls_x509_crt_t cert, int notsigned)
         addf (str, _("\tCertificate Security Level: %s (%d bits)\n"),
               gnutls_sec_param_get_name (gnutls_pk_bits_to_sec_param
                                          (err, bits)), bits);
-#ifdef ENABLE_PKI
         err = gnutls_pubkey_init(&pubkey);
         if (err < 0)
          {
@@ -1347,7 +1336,6 @@ print_cert (gnutls_buffer_st * str, gnutls_x509_crt_t cert, int notsigned)
           }
         
         gnutls_pubkey_deinit(pubkey);
-#endif
       }
   }
 
@@ -1736,8 +1724,6 @@ gnutls_x509_crt_print (gnutls_x509_crt_t cert,
     }
 }
 
-#ifdef ENABLE_PKI
-
 static void
 print_crl (gnutls_buffer_st * str, gnutls_x509_crl_t crl, int notsigned)
 {
@@ -2392,4 +2378,3 @@ gnutls_x509_crq_print (gnutls_x509_crq_t crq,
   return ret;
 }
 
-#endif /* ENABLE_PKI */
index a20f2442a05f6e33380b1edd66513fe80eb709fd..f26fd4fa3516ac235ef886fc707db45d08e03668 100644 (file)
@@ -26,8 +26,6 @@
 #include <gnutls_int.h>
 #include <libtasn1.h>
 
-#ifdef ENABLE_PKI
-
 #include <gnutls_datum.h>
 #include <gnutls_global.h>
 #include <gnutls_errors.h>
@@ -1330,5 +1328,3 @@ cleanup:
 
 }
 
-
-#endif /* ENABLE_PKI */
index 90a1b781323ab8dd23a0e8400d2a90cf515d950f..38d01e9c73a52994d756ae26a430f75a5b2d8fa5 100644 (file)
@@ -25,8 +25,6 @@
 
 #include <gnutls_int.h>
 
-#ifdef ENABLE_PKI
-
 #include <gnutls_datum.h>
 #include <gnutls_global.h>
 #include <gnutls_errors.h>
@@ -827,6 +825,3 @@ gnutls_pkcs12_bag_encrypt (gnutls_pkcs12_bag_t bag, const char *pass,
 
   return 0;
 }
-
-
-#endif /* ENABLE_PKI */
index 680e069e9f736dc43c791f6791d047f696bf40a9..68b528686434823e41e911d75846f08e8c9b3db0 100644 (file)
@@ -21,8 +21,6 @@
 
 #include <gnutls_int.h>
 
-#ifdef ENABLE_PKI
-
 #include <gnutls_mpi.h>
 #include <gnutls_errors.h>
 #include <x509_int.h>
@@ -196,4 +194,3 @@ cleanup:
   return rc;
 }
 
-#endif /* ENABLE_PKI */
index fa0f554a2a2897ca410cfdefa73e0338170815a3..6e2e405466b0ac7d99dd974e4922e6d422c6a9d8 100644 (file)
@@ -26,8 +26,6 @@
 #include <gnutls_int.h>
 #include <libtasn1.h>
 
-#ifdef ENABLE_PKI
-
 #include <gnutls_datum.h>
 #include <gnutls_global.h>
 #include <gnutls_errors.h>
@@ -1028,5 +1026,4 @@ cleanup:
     asn1_delete_structure (&c2);
   return result;
 }
-
-#endif /* ENABLE_PKI */
\ No newline at end of file
index 089acd09cf64e4e873653e815f0225c5a47e5f1c..40501276b5a162568f89a82e2cccb4fbd13f6b91 100644 (file)
@@ -544,14 +544,12 @@ gnutls_x509_privkey_import (gnutls_x509_privkey_t key,
 
 failover:
   /* Try PKCS #8 */
-#ifdef ENABLE_PKI
   if (result == GNUTLS_E_BASE64_UNEXPECTED_HEADER_ERROR)
     {
       _gnutls_debug_log ("Falling back to PKCS #8 key decoding\n");
       result = gnutls_x509_privkey_import_pkcs8 (key, data, format,
                                                  NULL, GNUTLS_PKCS_PLAIN);
     }
-#endif
 
   if (need_free)
     _gnutls_free_datum (&_data);
@@ -1430,7 +1428,6 @@ gnutls_x509_privkey_get_key_id (gnutls_x509_privkey_t key,
 }
 
 
-#ifdef ENABLE_PKI
 /*-
  * _gnutls_x509_privkey_sign_hash2:
  * @signer: Holds the signer's key
@@ -1647,4 +1644,3 @@ gnutls_x509_privkey_fix (gnutls_x509_privkey_t key)
   return 0;
 }
 
-#endif
index 2006095d63aabec3592974ffbf1ffaf3a8573ed7..dc0be3857e830987e2410c40286cab6da3c3b8f7 100644 (file)
@@ -22,8 +22,6 @@
 
 #include <gnutls_int.h>
 
-#ifdef ENABLE_PKI
-
 #include <gnutls_datum.h>
 #include <gnutls_global.h>
 #include <gnutls_errors.h>
@@ -2439,5 +2437,3 @@ error:
   return result;
 }
 
-
-#endif
index c40a1dea6d8747e8c38c684941579d62cd7558a3..cd9d1be0e826f066a5ed040912741ee50650298c 100644 (file)
@@ -26,8 +26,6 @@
 
 #include <gnutls_int.h>
 
-#ifdef ENABLE_PKI
-
 #include <gnutls_errors.h>
 #include <libtasn1.h>
 #include <gnutls_global.h>
@@ -172,4 +170,3 @@ _gnutls_x509_pkix_sign (ASN1_TYPE src, const char *src_name,
   return 0;
 }
 
-#endif
index f80506f718ecdb03ed7c8640dd1e34a18f9cbd28..1c34269c180410babdf2dbce5c9e756a27d7bd65 100644 (file)
@@ -872,7 +872,6 @@ int i, ret;
 
   /* Check for revoked certificates in the chain. 
    */
-#ifdef ENABLE_PKI
   for (i = 0; i < cert_list_length; i++)
     {
       ret = gnutls_x509_crt_check_revocation (cert_list[i],
@@ -883,7 +882,6 @@ int i, ret;
           *verify |= GNUTLS_CERT_INVALID;
         }
     }
-#endif
 
   return 0;
 }
@@ -917,10 +915,6 @@ gnutls_x509_crt_verify (gnutls_x509_crt_t cert,
   return 0;
 }
 
-
-
-#ifdef ENABLE_PKI
-
 /**
  * gnutls_x509_crl_check_issuer:
  * @crl: is the CRL to be checked
@@ -1146,4 +1140,3 @@ cleanup:
   return result;
 }
 
-#endif
index d3fbe594c3af9566bccd34396b00c125544887ad..253a2416ea447e1455f0a15bc8145069ed8fd376 100644 (file)
@@ -2350,8 +2350,6 @@ gnutls_x509_crt_get_key_id (gnutls_x509_crt_t crt, unsigned int flags,
 }
 
 
-#ifdef ENABLE_PKI
-
 /* This is exactly as gnutls_x509_crt_check_revocation() except that
  * it calls func.
  */
@@ -3036,7 +3034,6 @@ cleanup:
 
 }
 
-#endif
 /**
  * gnutls_x509_crt_list_import2:
  * @certs: The structures to store the parsed certificate. Must not be initialized.
index dff582c2ebf9348bb697a505ca58430489f274d9..4e3149357bd648d0332af9bc8e22c5b9f300df72 100644 (file)
@@ -25,8 +25,6 @@
 
 #include <gnutls_int.h>
 
-#ifdef ENABLE_PKI
-
 #include <gnutls_datum.h>
 #include <gnutls_global.h>
 #include <gnutls_errors.h>
@@ -1339,6 +1337,3 @@ gnutls_x509_crt_privkey_sign (gnutls_x509_crt_t crt, gnutls_x509_crt_t issuer,
 
   return 0;
 }
-
-
-#endif /* ENABLE_PKI */
index c3194c605571f728e23100fbd3165ede01a09c7d..7953728b908d76883fb4ed91af7c1dc3e1b2ef15 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -1409,7 +1409,6 @@ init_global_tls_stuff (void)
           printf ("Processed %d CA certificate(s).\n", ret);
         }
     }
-#ifdef ENABLE_PKI
   if (x509_crlfile != NULL)
     {
       ret = gnutls_certificate_set_x509_crl_file (xcred, x509_crlfile,
@@ -1423,7 +1422,6 @@ init_global_tls_stuff (void)
           printf ("Processed %d CRL(s).\n", ret);
         }
     }
-#endif
 
   load_keys ();
 
index 3c0eacbb17fd2dc179f2b457a375d6dbd9e579f8..88845bf2317d99f6e199308e27f1236c966eec1e 100644 (file)
--- a/src/dh.c
+++ b/src/dh.c
@@ -20,8 +20,6 @@
 
 #include <config.h>
 
-#ifdef ENABLE_PKI
-
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
@@ -241,4 +239,3 @@ generate_prime (int how, common_info_st * info)
   return 0;
 }
 
-#endif
index d2277cb41e5f1bc0a2438824bf4768be14d96eba..33b0fe9fec118e5bd86ad49306b7f38a372db792 100644 (file)
@@ -988,7 +988,6 @@ main (int argc, char **argv)
           printf ("Processed %d CA certificate(s).\n", ret);
         }
     }
-#ifdef ENABLE_PKI
   if (x509_crlfile != NULL)
     {
       if ((ret = gnutls_certificate_set_x509_crl_file
@@ -1003,7 +1002,6 @@ main (int argc, char **argv)
           printf ("Processed %d CRL(s).\n", ret);
         }
     }
-#endif
 
 #ifdef ENABLE_OPENPGP
   if (pgp_keyring != NULL)