From: Armin Novak Date: Tue, 29 Oct 2019 11:23:06 +0000 (+0100) Subject: Cleaned up TestCryptoHash X-Git-Tag: 2.0.0~275^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1fb716d864a52e07703df055054438b4cd9eaae9;p=platform%2Fupstream%2Ffreerdp.git Cleaned up TestCryptoHash --- diff --git a/winpr/libwinpr/crypto/test/TestCryptoHash.c b/winpr/libwinpr/crypto/test/TestCryptoHash.c index a3290b8..b1302af 100644 --- a/winpr/libwinpr/crypto/test/TestCryptoHash.c +++ b/winpr/libwinpr/crypto/test/TestCryptoHash.c @@ -4,8 +4,8 @@ #include #include -static const char* TEST_MD5_DATA = "test"; -static const BYTE* TEST_MD5_HASH = (BYTE*) "\x09\x8f\x6b\xcd\x46\x21\xd3\x73\xca\xde\x4e\x83\x26\x27\xb4\xf6"; +static const char TEST_MD5_DATA[] = "test"; +static const BYTE TEST_MD5_HASH[] = "\x09\x8f\x6b\xcd\x46\x21\xd3\x73\xca\xde\x4e\x83\x26\x27\xb4\xf6"; static BOOL test_crypto_hash_md5(void) { @@ -55,8 +55,8 @@ out: return result; } -static const char* TEST_MD4_DATA = "test"; -static const BYTE* TEST_MD4_HASH = (BYTE*) "\xdb\x34\x6d\x69\x1d\x7a\xcc\x4d\xc2\x62\x5d\xb1\x9f\x9e\x3f\x52"; +static const char TEST_MD4_DATA[] = "test"; +static const BYTE TEST_MD4_HASH[] = "\xdb\x34\x6d\x69\x1d\x7a\xcc\x4d\xc2\x62\x5d\xb1\x9f\x9e\x3f\x52"; static BOOL test_crypto_hash_md4(void) { @@ -106,8 +106,8 @@ out: return result; } -static const char* TEST_SHA1_DATA = "test"; -static const BYTE* TEST_SHA1_HASH = (BYTE*) "\xa9\x4a\x8f\xe5\xcc\xb1\x9b\xa6\x1c\x4c\x08\x73\xd3\x91\xe9\x87\x98\x2f\xbb\xd3"; +static const char TEST_SHA1_DATA[] = "test"; +static const BYTE TEST_SHA1_HASH[] = "\xa9\x4a\x8f\xe5\xcc\xb1\x9b\xa6\x1c\x4c\x08\x73\xd3\x91\xe9\x87\x98\x2f\xbb\xd3"; static BOOL test_crypto_hash_sha1(void) { @@ -158,9 +158,9 @@ out: return result; } -static const char* TEST_HMAC_MD5_DATA = "Hi There"; -static const BYTE* TEST_HMAC_MD5_KEY = (BYTE*) "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"; -static const BYTE* TEST_HMAC_MD5_HASH = (BYTE*) "\x92\x94\x72\x7a\x36\x38\xbb\x1c\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d"; +static const char TEST_HMAC_MD5_DATA[] = "Hi There"; +static const BYTE TEST_HMAC_MD5_KEY[] = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"; +static const BYTE TEST_HMAC_MD5_HASH[] = "\x92\x94\x72\x7a\x36\x38\xbb\x1c\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d"; static BOOL test_crypto_hash_hmac_md5(void) { @@ -212,9 +212,9 @@ out: return result; } -static const char* TEST_HMAC_SHA1_DATA = "Hi There"; -static const BYTE* TEST_HMAC_SHA1_KEY = (BYTE*) "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"; -static const BYTE* TEST_HMAC_SHA1_HASH = (BYTE*) "\xb6\x17\x31\x86\x55\x05\x72\x64\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1\x46\xbe\x00"; +static const char TEST_HMAC_SHA1_DATA[] = "Hi There"; +static const BYTE TEST_HMAC_SHA1_KEY[] = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"; +static const BYTE TEST_HMAC_SHA1_HASH[] = "\xb6\x17\x31\x86\x55\x05\x72\x64\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1\x46\xbe\x00"; static BOOL test_crypto_hash_hmac_sha1(void) { @@ -268,6 +268,9 @@ out: int TestCryptoHash(int argc, char* argv[]) { + WINPR_UNUSED(argc); + WINPR_UNUSED(argv); + winpr_InitializeSSL(WINPR_SSL_INIT_DEFAULT); if (!test_crypto_hash_md5())