Update gmssl help

This commit is contained in:
Zhi Guan
2024-05-13 21:44:48 +08:00
parent 7f3072e917
commit 1e2b75ff1a
8 changed files with 44 additions and 22 deletions

View File

@@ -168,9 +168,8 @@ static int test_sm4_ctr32_encrypt_blocks(void)
sm4_set_encrypt_key(&sm4_key, key);
sm4_ctr32_encrypt_blocks(&sm4_key, ctr, plaintext, 4, encrypted);
format_bytes(stderr, 0, 0, "sm4_ctr32", encrypted, 64);
/*
// FIXME: relace the corrent ciphertext
if (memcmp(encrypted, ciphertext, sizeof(ciphertext)) != 0) {
error_print();
return -1;

View File

@@ -819,7 +819,7 @@ int test_sm9_z256_exchange()
for (i = 0; i < klen; i++) {
if (skA[i] != skB[i]) {
printf("Exchange key different at byte %d\n", i);
printf("Exchange key different at byte %zu\n", i);
goto err;
}
} ++j;
@@ -827,7 +827,7 @@ int test_sm9_z256_exchange()
printf("%s() ok\n", __FUNCTION__);
return 1;
err:
printf("%s test %d failed\n", __FUNCTION__, j);
printf("%s test %zu failed\n", __FUNCTION__, j);
error_print();
return -1;
}