summaryrefslogtreecommitdiff
path: root/lib/gnutls_pk.c
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2010-10-14 15:02:12 +0200
committerSimon Josefsson <simon@josefsson.org>2010-10-14 15:02:12 +0200
commit03636f4440ae918d6f710935a00806469f65f1c6 (patch)
tree1969ad6201816d1eb1421d93ef6900ec3b647788 /lib/gnutls_pk.c
parent59425cbec511cdc314f2a22ee95b299f8fa06fc8 (diff)
downloadgnutls-03636f4440ae918d6f710935a00806469f65f1c6.tar.gz
Indent (using GNU indent 2.2.11).
Diffstat (limited to 'lib/gnutls_pk.c')
-rw-r--r--lib/gnutls_pk.c42
1 files changed, 23 insertions, 19 deletions
diff --git a/lib/gnutls_pk.c b/lib/gnutls_pk.c
index 9739869ad5..73609bf284 100644
--- a/lib/gnutls_pk.c
+++ b/lib/gnutls_pk.c
@@ -610,15 +610,16 @@ gnutls_pk_params_release (gnutls_pk_params_st * p)
}
}
-int _gnutls_calc_rsa_exp(bigint_t* params, unsigned int params_size)
+int
+_gnutls_calc_rsa_exp (bigint_t * params, unsigned int params_size)
{
-bigint_t tmp = _gnutls_mpi_alloc_like(params[0]);
+ bigint_t tmp = _gnutls_mpi_alloc_like (params[0]);
- if (params_size < RSA_PRIVATE_PARAMS-2)
- {
- gnutls_assert();
- return GNUTLS_E_INTERNAL_ERROR;
- }
+ if (params_size < RSA_PRIVATE_PARAMS - 2)
+ {
+ gnutls_assert ();
+ return GNUTLS_E_INTERNAL_ERROR;
+ }
if (tmp == NULL)
{
@@ -627,35 +628,38 @@ bigint_t tmp = _gnutls_mpi_alloc_like(params[0]);
}
/* [6] = d % p-1, [7] = d % q-1 */
- _gnutls_mpi_sub_ui(tmp, params[3], 1);
- params[6] = _gnutls_mpi_mod(params[2]/*d*/, tmp);
+ _gnutls_mpi_sub_ui (tmp, params[3], 1);
+ params[6] = _gnutls_mpi_mod (params[2] /*d */ , tmp);
- _gnutls_mpi_sub_ui(tmp, params[4], 1);
- params[7] = _gnutls_mpi_mod(params[2]/*d*/, tmp);
+ _gnutls_mpi_sub_ui (tmp, params[4], 1);
+ params[7] = _gnutls_mpi_mod (params[2] /*d */ , tmp);
- _gnutls_mpi_release(&tmp);
+ _gnutls_mpi_release (&tmp);
if (params[7] == NULL || params[6] == NULL)
{
- gnutls_assert ();
- return GNUTLS_E_MEMORY_ERROR;
+ gnutls_assert ();
+ return GNUTLS_E_MEMORY_ERROR;
}
return 0;
}
-int _gnutls_pk_get_hash_algorithm(gnutls_pk_algorithm_t pk, bigint_t* params, int params_size,
- gnutls_digest_algorithm_t *dig, unsigned int *mand)
+int
+_gnutls_pk_get_hash_algorithm (gnutls_pk_algorithm_t pk, bigint_t * params,
+ int params_size,
+ gnutls_digest_algorithm_t * dig,
+ unsigned int *mand)
{
if (mand)
{
if (pk == GNUTLS_PK_DSA)
- *mand = 1;
+ *mand = 1;
else
- *mand = 0;
+ *mand = 0;
}
return _gnutls_x509_verify_algorithm ((gnutls_mac_algorithm_t *) dig,
- NULL, pk, params, params_size);
+ NULL, pk, params, params_size);
}