summaryrefslogtreecommitdiff
path: root/regress/lib/libcrypto
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2014-05-15 14:13:47 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2014-05-15 14:13:47 +0000
commite59b9a4f8d5713688cbd50ef6020193192b210f9 (patch)
tree180022a15b5448b872ccae31281a96fd45681e14 /regress/lib/libcrypto
parent5fcf93034e0964f7fa6b229a6946310ceac35d47 (diff)
KNF.
Diffstat (limited to 'regress/lib/libcrypto')
-rw-r--r--regress/lib/libcrypto/aead/aeadtest.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/regress/lib/libcrypto/aead/aeadtest.c b/regress/lib/libcrypto/aead/aeadtest.c
index e74b9fca97e..4d96ed6de46 100644
--- a/regress/lib/libcrypto/aead/aeadtest.c
+++ b/regress/lib/libcrypto/aead/aeadtest.c
@@ -99,7 +99,8 @@ static const char NAMES[NUM_TYPES][6] = {
};
static unsigned char
-hex_digit(char h) {
+hex_digit(char h)
+{
if (h >= '0' && h <= '9')
return h - '0';
else if (h >= 'a' && h <= 'f')
@@ -144,7 +145,7 @@ run_test_case(const EVP_AEAD* aead, unsigned char bufs[NUM_TYPES][BUF_MAX],
EVP_AEAD_CTX ctx;
ssize_t n;
size_t un;
- unsigned char out[BUF_MAX+EVP_AEAD_MAX_TAG_LENGTH], out2[BUF_MAX];
+ unsigned char out[BUF_MAX + EVP_AEAD_MAX_TAG_LENGTH], out2[BUF_MAX];
if (!EVP_AEAD_CTX_init(&ctx, aead, bufs[KEY], lengths[KEY],
lengths[TAG], NULL)) {
@@ -164,8 +165,8 @@ run_test_case(const EVP_AEAD* aead, unsigned char bufs[NUM_TYPES][BUF_MAX],
if (un != lengths[CT] + lengths[TAG]) {
fprintf(stderr, "Bad output length on line %u: %u vs %u\n",
- line_no, (unsigned) un,
- (unsigned)(lengths[CT] + lengths[TAG]));
+ line_no, (unsigned) un,
+ (unsigned)(lengths[CT] + lengths[TAG]));
return 0;
}
@@ -188,7 +189,7 @@ run_test_case(const EVP_AEAD* aead, unsigned char bufs[NUM_TYPES][BUF_MAX],
if ((size_t)n != lengths[IN]) {
fprintf(stderr, "Bad decrypt on line %u: %u\n", line_no,
- (unsigned) n);
+ (unsigned) n);
return 0;
}
@@ -263,7 +264,7 @@ main(int argc, char **argv)
fprintf(stderr, "Aborting...\n");
return 4;
}
-
+
if (!run_test_case(aead, bufs, lengths, line_no))
return 4;