mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-06-27 07:33:41 +08:00
Update Windows support
This commit is contained in:
@@ -15,8 +15,10 @@
|
||||
#include <gmssl/digest.h>
|
||||
|
||||
const char *digests[] = {
|
||||
// "md5",
|
||||
#ifdef ENABLE_BROKEN_CRYPTO
|
||||
"md5",
|
||||
"sha1",
|
||||
#endif
|
||||
"sm3",
|
||||
"sha224",
|
||||
"sha256",
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// currently we only has SHA-1 test suites
|
||||
#ifdef ENABLE_BROKEN_CRYPTO
|
||||
HASH_DRBG drbg;
|
||||
|
||||
uint8_t entropy[sizeof(EntropyInput)/2];
|
||||
@@ -87,6 +89,6 @@ int main(void)
|
||||
printf("%02x", out[i]);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@ static struct {
|
||||
"b8a11f5c5ee1879ec3454e5f3c738d2d"
|
||||
"9d201395faa4b61a96c8",
|
||||
},
|
||||
#ifdef ENABLE_BROKEN_CRYPTO
|
||||
{
|
||||
// test 4
|
||||
"sha1",
|
||||
@@ -141,6 +142,7 @@ static struct {
|
||||
"b3bae548aa53d423b0d1f27ebba6f5e5"
|
||||
"673a081d70cce7acfc48",
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
int test_hkdf(void)
|
||||
|
||||
@@ -101,6 +101,8 @@ void test(void)
|
||||
|
||||
static int test_pbkdf2_genkey(void)
|
||||
{
|
||||
// FIXME: currently we only has SHA-1 tests, replace with SHA-256
|
||||
#ifdef ENABLE_BROKEN_CRYPTO
|
||||
int i;
|
||||
uint8_t key[64];
|
||||
uint8_t buf[64];
|
||||
@@ -123,7 +125,7 @@ static int test_pbkdf2_genkey(void)
|
||||
fprintf(stderr, "test_pbkdf2_genkey test %d ok\n", i);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
printf("%s() ok\n", __FUNCTION__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user