diff options
author | Miloslav Trmač <mitr@redhat.com> | 2010-11-15 21:33:22 +0100 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2010-11-15 21:33:22 +0100 |
commit | 867c1257c40d8b6c2a887576f8c367bcf3df3c79 (patch) | |
tree | 0b5275cd98a7a7c34223c2883e47cc79751103b8 /tests/rsa.c | |
parent | 9d339f288eda10e5334bbf4ccdfd068eaee95c0e (diff) | |
download | ncrypto-867c1257c40d8b6c2a887576f8c367bcf3df3c79.tar.gz ncrypto-867c1257c40d8b6c2a887576f8c367bcf3df3c79.tar.xz ncrypto-867c1257c40d8b6c2a887576f8c367bcf3df3c79.zip |
Add comments to tests.
Diffstat (limited to 'tests/rsa.c')
-rw-r--r-- | tests/rsa.c | 4 |
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)); |