summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/crypto-api.c6
-rw-r--r--lib/gnutls_algorithms.c6
-rw-r--r--lib/x509/privkey.c11
3 files changed, 12 insertions, 11 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