summaryrefslogtreecommitdiffstats
path: root/tests/rsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rsa.c')
-rw-r--r--tests/rsa.c4
1 files changed, 3 insertions, 1 deletions
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));