summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gnutls_x509.c8
-rw-r--r--lib/x509/crl.c3
-rw-r--r--lib/x509/crl_write.c3
-rw-r--r--lib/x509/crq.c4
-rw-r--r--lib/x509/extensions.c3
-rw-r--r--lib/x509/mpi.c5
-rw-r--r--lib/x509/output.c15
-rw-r--r--lib/x509/pkcs12.c4
-rw-r--r--lib/x509/pkcs12_bag.c5
-rw-r--r--lib/x509/pkcs12_encr.c3
-rw-r--r--lib/x509/pkcs7.c5
-rw-r--r--lib/x509/privkey.c4
-rw-r--r--lib/x509/privkey_pkcs8.c4
-rw-r--r--lib/x509/sign.c3
-rw-r--r--lib/x509/verify.c7
-rw-r--r--lib/x509/x509.c3
-rw-r--r--lib/x509/x509_write.c5
-rw-r--r--src/cli.c2
-rw-r--r--src/dh.c3
-rw-r--r--src/serv.c2
20 files changed, 1 insertions, 90 deletions
diff --git a/lib/gnutls_x509.c b/lib/gnutls_x509.c
index c048feadf3..d270650f36 100644
--- a/lib/gnutls_x509.c
+++ b/lib/gnutls_x509.c
@@ -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
diff --git a/lib/x509/crl.c b/lib/x509/crl.c
index c1b9005556..46712bc3ae 100644
--- a/lib/x509/crl.c
+++ b/lib/x509/crl.c
@@ -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
diff --git a/lib/x509/crl_write.c b/lib/x509/crl_write.c
index 32b85701f7..9964551271 100644
--- a/lib/x509/crl_write.c
+++ b/lib/x509/crl_write.c
@@ -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 */
diff --git a/lib/x509/crq.c b/lib/x509/crq.c
index a7e56f5bd9..e21341ebba 100644
--- a/lib/x509/crq.c
+++ b/lib/x509/crq.c
@@ -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 */
-
diff --git a/lib/x509/extensions.c b/lib/x509/extensions.c
index 166e63d287..a429bfea27 100644
--- a/lib/x509/extensions.c
+++ b/lib/x509/extensions.c
@@ -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.
*/
diff --git a/lib/x509/mpi.c b/lib/x509/mpi.c
index f69eb4c9b5..baef1ee89f 100644
--- a/lib/x509/mpi.c
+++ b/lib/x509/mpi.c
@@ -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.
diff --git a/lib/x509/output.c b/lib/x509/output.c
index 827845f427..a16ec4a7da 100644
--- a/lib/x509/output.c
+++ b/lib/x509/output.c
@@ -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 */
diff --git a/lib/x509/pkcs12.c b/lib/x509/pkcs12.c
index a20f2442a0..f26fd4fa35 100644
--- a/lib/x509/pkcs12.c
+++ b/lib/x509/pkcs12.c
@@ -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 */
diff --git a/lib/x509/pkcs12_bag.c b/lib/x509/pkcs12_bag.c
index 90a1b78132..38d01e9c73 100644
--- a/lib/x509/pkcs12_bag.c
+++ b/lib/x509/pkcs12_bag.c
@@ -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 */
diff --git a/lib/x509/pkcs12_encr.c b/lib/x509/pkcs12_encr.c
index 680e069e9f..68b5286864 100644
--- a/lib/x509/pkcs12_encr.c
+++ b/lib/x509/pkcs12_encr.c
@@ -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 */
diff --git a/lib/x509/pkcs7.c b/lib/x509/pkcs7.c
index fa0f554a2a..6e2e405466 100644
--- a/lib/x509/pkcs7.c
+++ b/lib/x509/pkcs7.c
@@ -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
diff --git a/lib/x509/privkey.c b/lib/x509/privkey.c
index 089acd09cf..40501276b5 100644
--- a/lib/x509/privkey.c
+++ b/lib/x509/privkey.c
@@ -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
diff --git a/lib/x509/privkey_pkcs8.c b/lib/x509/privkey_pkcs8.c
index 2006095d63..dc0be3857e 100644
--- a/lib/x509/privkey_pkcs8.c
+++ b/lib/x509/privkey_pkcs8.c
@@ -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
diff --git a/lib/x509/sign.c b/lib/x509/sign.c
index c40a1dea6d..cd9d1be0e8 100644
--- a/lib/x509/sign.c
+++ b/lib/x509/sign.c
@@ -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
diff --git a/lib/x509/verify.c b/lib/x509/verify.c
index f80506f718..1c34269c18 100644
--- a/lib/x509/verify.c
+++ b/lib/x509/verify.c
@@ -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
diff --git a/lib/x509/x509.c b/lib/x509/x509.c
index d3fbe594c3..253a2416ea 100644
--- a/lib/x509/x509.c
+++ b/lib/x509/x509.c
@@ -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.
diff --git a/lib/x509/x509_write.c b/lib/x509/x509_write.c
index dff582c2eb..4e3149357b 100644
--- a/lib/x509/x509_write.c
+++ b/lib/x509/x509_write.c
@@ -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 */
diff --git a/src/cli.c b/src/cli.c
index c3194c6055..7953728b90 100644
--- 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 ();
diff --git a/src/dh.c b/src/dh.c
index 3c0eacbb17..88845bf231 100644
--- 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
diff --git a/src/serv.c b/src/serv.c
index d2277cb41e..33b0fe9fec 100644
--- a/src/serv.c
+++ b/src/serv.c
@@ -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)