* tests/nlattr_crypto_user_alg.c (main): Check decoding of
CRYPTOCFGA_REPORT_BLKCIPHER attribute.
---
 tests/nlattr_crypto_user_alg.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/tests/nlattr_crypto_user_alg.c b/tests/nlattr_crypto_user_alg.c
index 5c51aa8..03eaef2 100644
--- a/tests/nlattr_crypto_user_alg.c
+++ b/tests/nlattr_crypto_user_alg.c
@@ -107,6 +107,27 @@ main(void)
                              printf("}"));
 #endif
 
+#ifdef HAVE_STRUCT_CRYPTO_REPORT_BLKCIPHER
+       struct crypto_report_blkcipher rblkcipher = {
+               .type = "abcd",
+               .geniv = "efgh",
+               .blocksize = 0xabcdefac,
+               .min_keysize = 0xfeadbcda,
+               .max_keysize = 0xbdacdeac,
+               .ivsize = 0xefacbdac
+       };
+       TEST_NLATTR_OBJECT_EX(fd, nlh0, hdrlen,
+                             init_crypto_user_alg, print_crypto_user_alg,
+                             CRYPTOCFGA_REPORT_BLKCIPHER,
+                             pattern, rblkcipher, print_quoted_memory,
+                             printf("{type=\"abcd\", geniv=\"efgh\"");
+                             PRINT_FIELD_U(", ", rblkcipher, blocksize);
+                             PRINT_FIELD_U(", ", rblkcipher, min_keysize);
+                             PRINT_FIELD_U(", ", rblkcipher, max_keysize);
+                             PRINT_FIELD_U(", ", rblkcipher, ivsize);
+                             printf("}"));
+#endif
+
        puts("+++ exited with 0 +++");
        return 0;
 }
-- 
2.7.4


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to