diff options
Diffstat (limited to 'src/test/test-hmac.c')
-rw-r--r-- | src/test/test-hmac.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/test/test-hmac.c b/src/test/test-hmac.c index 5c73eca110..523f09495c 100644 --- a/src/test/test-hmac.c +++ b/src/test/test-hmac.c @@ -9,12 +9,10 @@ static void hmac_sha256_by_string(const char *key, const char *value, uint8_t re hmac_sha256(key, strlen(key), value, strlen(value), res); } -static void test_hmac(void) { +TEST(hmac) { uint8_t result[SHA256_DIGEST_SIZE]; char *hex_result = NULL; - log_info("/* %s */", __func__); - /* Results compared with output of 'echo -n "<input>" | openssl dgst -sha256 -hmac "<key>"' */ hmac_sha256_by_string("waldo", @@ -67,10 +65,4 @@ static void test_hmac(void) { hex_result = mfree(hex_result); } -int main(int argc, char **argv) { - test_setup_logging(LOG_INFO); - - test_hmac(); - - return 0; -} +DEFINE_TEST_MAIN(LOG_INFO); |