summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2010-07-25 10:48:29 +0200
committerSimon Josefsson <simon@josefsson.org>2010-07-25 10:48:29 +0200
commitdf9038676902b4da243e802ca34f85a40e661b22 (patch)
treea48f8bfe81114b62e4f55b343c4cd8e29fb715d6
parent79e34700083ea05129a2528d53dda161a04e3d27 (diff)
downloadgnutls-df9038676902b4da243e802ca34f85a40e661b22.tar.gz
Indent code.
-rw-r--r--lib/crypto-api.c6
-rw-r--r--lib/gnutls_algorithms.c6
-rw-r--r--lib/x509/privkey.c11
-rw-r--r--src/certtool.c14
-rw-r--r--src/cli.c3
5 files changed, 21 insertions, 19 deletions
diff --git a/lib/crypto-api.c b/lib/crypto-api.c
index cad9914132..183fcb36e6 100644
--- a/lib/crypto-api.c
+++ b/lib/crypto-api.c
@@ -114,7 +114,7 @@ void
gnutls_cipher_deinit (gnutls_cipher_hd_t handle)
{
_gnutls_cipher_deinit ((cipher_hd_st *) handle);
- gnutls_free(handle);
+ gnutls_free (handle);
}
@@ -199,7 +199,7 @@ void
gnutls_hmac_deinit (gnutls_hmac_hd_t handle, void *digest)
{
_gnutls_hmac_deinit ((digest_hd_st *) handle, digest);
- gnutls_free(handle);
+ gnutls_free (handle);
}
/**
@@ -320,7 +320,7 @@ void
gnutls_hash_deinit (gnutls_hash_hd_t handle, void *digest)
{
_gnutls_hash_deinit ((digest_hd_st *) handle, digest);
- gnutls_free(handle);
+ gnutls_free (handle);
}
/**
diff --git a/lib/gnutls_algorithms.c b/lib/gnutls_algorithms.c
index 28b786db5c..aacbe3410c 100644
--- a/lib/gnutls_algorithms.c
+++ b/lib/gnutls_algorithms.c
@@ -2122,9 +2122,9 @@ typedef struct gnutls_pk_entry gnutls_pk_entry;
static const gnutls_pk_entry pk_algorithms[] = {
{"RSA", PK_PKIX1_RSA_OID, GNUTLS_PK_RSA},
- {"RSA (X.509)", PK_X509_RSA_OID, GNUTLS_PK_RSA}, /* some certificates use this OID for RSA */
- {"RSA (MD5)", SIG_RSA_MD5_OID, GNUTLS_PK_RSA}, /* some other broken certificates set RSA with MD5 as an indicator of RSA */
- {"RSA (SHA1)", SIG_RSA_SHA1_OID, GNUTLS_PK_RSA}, /* some other broken certificates set RSA with SHA1 as an indicator of RSA */
+ {"RSA (X.509)", PK_X509_RSA_OID, GNUTLS_PK_RSA}, /* some certificates use this OID for RSA */
+ {"RSA (MD5)", SIG_RSA_MD5_OID, GNUTLS_PK_RSA}, /* some other broken certificates set RSA with MD5 as an indicator of RSA */
+ {"RSA (SHA1)", SIG_RSA_SHA1_OID, GNUTLS_PK_RSA}, /* some other broken certificates set RSA with SHA1 as an indicator of RSA */
{"DSA", PK_DSA_OID, GNUTLS_PK_DSA},
{"GOST R 34.10-2001", PK_GOST_R3410_2001_OID, 0},
{"GOST R 34.10-94", PK_GOST_R3410_94_OID, 0},
diff --git a/lib/x509/privkey.c b/lib/x509/privkey.c
index bc1c31e3c6..4332cd825e 100644
--- a/lib/x509/privkey.c
+++ b/lib/x509/privkey.c
@@ -358,7 +358,8 @@ gnutls_x509_privkey_import (gnutls_x509_privkey_t key,
result =
_gnutls_fbase64_decode (PEM_KEY_RSA, data->data, data->size, &out);
- if (result >= 0) key->pk_algorithm = GNUTLS_PK_RSA;
+ if (result >= 0)
+ key->pk_algorithm = GNUTLS_PK_RSA;
if (result == GNUTLS_E_BASE64_UNEXPECTED_HEADER_ERROR)
{
@@ -371,7 +372,7 @@ gnutls_x509_privkey_import (gnutls_x509_privkey_t key,
if (result == 0)
result = GNUTLS_E_INTERNAL_ERROR;
gnutls_assert ();
-
+
goto failover;
}
@@ -433,9 +434,9 @@ failover:
#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);
+ _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
diff --git a/src/certtool.c b/src/certtool.c
index 8d6efd29e5..51139badcb 100644
--- a/src/certtool.c
+++ b/src/certtool.c
@@ -173,9 +173,10 @@ generate_private_key_int (void)
{
key_type = GNUTLS_PK_DSA;
if (info.bits > 1024)
- {
- fprintf(stderr, "It is suggested for compatibility with other implementations to use DSA keys bit length 1024\n");
- }
+ {
+ fprintf (stderr,
+ "It is suggested for compatibility with other implementations to use DSA keys bit length 1024\n");
+ }
}
else
key_type = GNUTLS_PK_RSA;
@@ -1540,12 +1541,11 @@ privkey_info (void)
if (info.pkcs8 || ret == GNUTLS_E_BASE64_UNEXPECTED_HEADER_ERROR)
{
if (info.pass)
- pass = info.pass;
+ pass = info.pass;
else
- pass = get_pass ();
+ pass = get_pass ();
ret = gnutls_x509_privkey_import_pkcs8 (key, &pem,
- info.incert_format,
- pass, 0);
+ info.incert_format, pass, 0);
}
if (ret < 0)
error (EXIT_FAILURE, 0, "import error: %s", gnutls_strerror (ret));
diff --git a/src/cli.c b/src/cli.c
index 5a205ff473..d472883b0b 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -512,7 +512,8 @@ init_tls_session (const char *hostname)
gnutls_certificate_client_set_retrieve_function (xcred, cert_callback);
gnutls_certificate_set_verify_function (xcred, cert_verify_callback);
- gnutls_certificate_set_verify_flags(xcred, GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT);
+ gnutls_certificate_set_verify_flags (xcred,
+ GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT);
/* send the fingerprint */
#ifdef ENABLE_OPENPGP