diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-12-16 17:30:42 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-12-16 17:30:42 +0100 |
commit | 6eb6bbfe8e504a611145f454f4045e8f49fd5e44 (patch) | |
tree | baba850cc86ee2d9d61de89da1cdfe408ad8694a /tests/pkcs12_s2k.c | |
parent | bdcfdac13179eccee6294402f2654fece149f82b (diff) | |
download | gnutls-6eb6bbfe8e504a611145f454f4045e8f49fd5e44.tar.gz |
Indented code. Use same indentation but with -nut to avoid usage of tabs. In several editors tabs can be configured not to be 8 spaces and this produces artifacts with the current indentation that is a mixture of tabs and spaces.
Diffstat (limited to 'tests/pkcs12_s2k.c')
-rw-r--r-- | tests/pkcs12_s2k.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/tests/pkcs12_s2k.c b/tests/pkcs12_s2k.c index 41c8d1299f..c00ba590ce 100644 --- a/tests/pkcs12_s2k.c +++ b/tests/pkcs12_s2k.c @@ -124,25 +124,25 @@ doit (void) for (i = 1; i < 4; i++) { for (j = 0; j < 3; j++) - { - rc = - _gnutls_pkcs12_string_to_key (i, salt[j], strlen (salt[j]), - j + i + 15, pw[j], sizeof (key), - key); - if (rc < 0) - fail ("_gnutls_pkcs12_string_to_key failed[0]: %d\n", rc); - - if (strcmp (_gnutls_bin2hex (key, sizeof (key), - tmp, sizeof (tmp), NULL), - values[x]) != 0) - fail ("_gnutls_pkcs12_string_to_key failed[1]\n"); - - if (debug) - printf ("ij: %d.%d: %s\n", i, j, - _gnutls_bin2hex (key, sizeof (key), tmp, sizeof (tmp), - NULL)); - x++; - } + { + rc = + _gnutls_pkcs12_string_to_key (i, salt[j], strlen (salt[j]), + j + i + 15, pw[j], sizeof (key), + key); + if (rc < 0) + fail ("_gnutls_pkcs12_string_to_key failed[0]: %d\n", rc); + + if (strcmp (_gnutls_bin2hex (key, sizeof (key), + tmp, sizeof (tmp), NULL), + values[x]) != 0) + fail ("_gnutls_pkcs12_string_to_key failed[1]\n"); + + if (debug) + printf ("ij: %d.%d: %s\n", i, j, + _gnutls_bin2hex (key, sizeof (key), tmp, sizeof (tmp), + NULL)); + x++; + } } if (debug) printf ("\n"); @@ -150,19 +150,19 @@ doit (void) for (i = 0; i < sizeof (tv) / sizeof (tv[0]); i++) { rc = _gnutls_pkcs12_string_to_key (tv[i].id, tv[i].salt, 8, - tv[i].iter, tv[i].password, - tv[i].keylen, key); + tv[i].iter, tv[i].password, + tv[i].keylen, key); if (rc < 0) - fail ("_gnutls_pkcs12_string_to_key failed[2]: %d\n", rc); + fail ("_gnutls_pkcs12_string_to_key failed[2]: %d\n", rc); if (memcmp (_gnutls_bin2hex (key, tv[i].keylen, - tmp, sizeof (tmp), NULL), - tv[i].key, tv[i].keylen) != 0) - fail ("_gnutls_pkcs12_string_to_key failed[3]\n"); + tmp, sizeof (tmp), NULL), + tv[i].key, tv[i].keylen) != 0) + fail ("_gnutls_pkcs12_string_to_key failed[3]\n"); if (debug) - printf ("tv[%d]: %s\n", i, - _gnutls_bin2hex (key, tv[i].keylen, tmp, sizeof (tmp), NULL)); + printf ("tv[%d]: %s\n", i, + _gnutls_bin2hex (key, tv[i].keylen, tmp, sizeof (tmp), NULL)); } if (debug) printf ("\n"); |