From 09284a0b925a979adb703c2e0819259fa1eb9c60 Mon Sep 17 00:00:00 2001 From: wuriyanto Date: Sun, 3 Sep 2023 17:34:14 +0700 Subject: [PATCH] fix tests --- .gitignore | 3 ++- tests/test.c | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 8fd2769..07afead 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ app app* *.txt -test \ No newline at end of file +test +.vscode/ \ No newline at end of file diff --git a/tests/test.c b/tests/test.c index 775f488..55b94f7 100644 --- a/tests/test.c +++ b/tests/test.c @@ -486,10 +486,10 @@ void test_rsa_encryption() { unsigned char* expected = "Hello World 😋"; // load public key - unsigned char* rsa_public_key_char = load_file("public_key.txt"); + unsigned char* rsa_public_key_char = load_file("./testdata/public_key.key"); // load private key - unsigned char* rsa_private_key_char = load_file("private_key.txt"); + unsigned char* rsa_private_key_char = load_file("./testdata/private_key.key"); // ------------------- RSA OAEP MD5 encryption test ------------------- printf("test RSA OAEP MD5 encryption\n"); @@ -700,10 +700,10 @@ void test_rsa_digital_signature() { unsigned char* plain_data = "Hello World 😋"; // load public key - unsigned char* rsa_public_key_char = load_file("public_key.txt"); + unsigned char* rsa_public_key_char = load_file("./testdata/public_key.key"); // load private key - unsigned char* rsa_private_key_char = load_file("private_key.txt"); + unsigned char* rsa_private_key_char = load_file("./testdata/private_key.key"); // ------------------- RSA PSS MD5 signature test ------------------- printf("test RSA digital signature PSS MD5\n");