From 867c1257c40d8b6c2a887576f8c367bcf3df3c79 Mon Sep 17 00:00:00 2001 From: Miloslav Trmač Date: Mon, 15 Nov 2010 21:33:22 +0100 Subject: Add comments to tests. --- tests/rsa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/rsa.c') diff --git a/tests/rsa.c b/tests/rsa.c index 224f5c1..d14e05c 100644 --- a/tests/rsa.c +++ b/tests/rsa.c @@ -53,7 +53,7 @@ main (void) size_t src_size, dest_size; CK_RV res; - /* Test the generic version as well? */ + /* Test key loading. Should we test the generic version as well? */ res = ncr_public_key_create_rsa (&public, modulus, sizeof (modulus), public_exponent, sizeof (public_exponent)); assert (res == CKR_OK); @@ -68,6 +68,7 @@ main (void) assert (res == CKR_OK); + /* Test encryption */ dest_size = sizeof (dest); res = ncr_public_key_encrypt (CKM_RSA_PKCS, public, dest, &dest_size, input, sizeof (input)); @@ -81,6 +82,7 @@ main (void) assert (dest_size == sizeof (input)); assert (memcmp (dest, input, dest_size) == 0); + /* Test signatures */ dest_size = sizeof (dest); res = ncr_private_key_sign (CKM_RSA_PKCS, private, dest, &dest_size, input, sizeof (input)); -- cgit