Lines Matching refs:test

1742 static bool ckm_is_hmac_general(struct mac_test const *test)  in ckm_is_hmac_general()  argument
1744 switch (test->mechanism->mechanism) { in ckm_is_hmac_general()
1758 static size_t get_mac_test_len(struct mac_test const *test) in get_mac_test_len() argument
1760 if (ckm_is_hmac_general(test)) in get_mac_test_len()
1763 return test->out_len; in get_mac_test_len()
1775 struct mac_test const *test = NULL; in xtest_pkcs11_test_1008() local
1788 test = &cktest_mac_cases[n]; in xtest_pkcs11_test_1008()
1790 ckm2str(test->mechanism->mechanism)); in xtest_pkcs11_test_1008()
1792 rv = C_CreateObject(session, test->attr_key, test->attr_count, in xtest_pkcs11_test_1008()
1798 if (test->in != NULL) { in xtest_pkcs11_test_1008()
1799 rv = C_SignInit(session, test->mechanism, key_handle); in xtest_pkcs11_test_1008()
1805 (void *)test->in, 0); in xtest_pkcs11_test_1008()
1810 (void *)test->in, test->in_len); in xtest_pkcs11_test_1008()
1844 (void)ADBG_EXPECT_BUFFER(c, test->out, in xtest_pkcs11_test_1008()
1845 get_mac_test_len(test), in xtest_pkcs11_test_1008()
1850 rv = C_SignInit(session, test->mechanism, key_handle); in xtest_pkcs11_test_1008()
1854 if (test->in != NULL) { in xtest_pkcs11_test_1008()
1856 (void *)test->in, test->in_incr); in xtest_pkcs11_test_1008()
1861 (void *)(test->in + test->in_incr), in xtest_pkcs11_test_1008()
1862 test->in_len - test->in_incr); in xtest_pkcs11_test_1008()
1874 (void)ADBG_EXPECT_BUFFER(c, test->out, in xtest_pkcs11_test_1008()
1875 get_mac_test_len(test), out, in xtest_pkcs11_test_1008()
1879 if (test->in != NULL) { in xtest_pkcs11_test_1008()
1880 rv = C_SignInit(session, test->mechanism, key_handle); in xtest_pkcs11_test_1008()
1886 rv = C_Sign(session,(void *)test->in, test->in_len, in xtest_pkcs11_test_1008()
1896 rv = C_Sign(session, (void *)test->in, test->in_len, in xtest_pkcs11_test_1008()
1906 rv = C_Sign(session, (void *)test->in, test->in_len, in xtest_pkcs11_test_1008()
1913 rv = C_Sign(session,(void *)test->in, test->in_len, in xtest_pkcs11_test_1008()
1918 (void)ADBG_EXPECT_BUFFER(c, test->out, in xtest_pkcs11_test_1008()
1919 get_mac_test_len(test), in xtest_pkcs11_test_1008()
1950 struct mac_test const *test = NULL; in xtest_pkcs11_test_1009() local
1963 test = &cktest_mac_cases[n]; in xtest_pkcs11_test_1009()
1965 ckm2str(test->mechanism->mechanism)); in xtest_pkcs11_test_1009()
1967 rv = C_CreateObject(session, test->attr_key, test->attr_count, in xtest_pkcs11_test_1009()
1973 if (test->in != NULL) { in xtest_pkcs11_test_1009()
1974 rv = C_VerifyInit(session, test->mechanism, key_handle); in xtest_pkcs11_test_1009()
1979 rv = C_VerifyUpdate(session, (void *)test->in, 0); in xtest_pkcs11_test_1009()
1983 rv = C_VerifyUpdate(session, (void *)test->in, in xtest_pkcs11_test_1009()
1984 test->in_len); in xtest_pkcs11_test_1009()
1989 (void *)test->out, in xtest_pkcs11_test_1009()
1990 get_mac_test_len(test)); in xtest_pkcs11_test_1009()
1997 rv = C_VerifyInit(session, test->mechanism, key_handle); in xtest_pkcs11_test_1009()
2001 if (test->in != NULL) { in xtest_pkcs11_test_1009()
2003 (void *)test->in, test->in_incr); in xtest_pkcs11_test_1009()
2008 (void *)(test->in + test->in_incr), in xtest_pkcs11_test_1009()
2009 test->in_len - test->in_incr); in xtest_pkcs11_test_1009()
2014 rv = C_VerifyFinal(session, (void *)test->out, in xtest_pkcs11_test_1009()
2015 get_mac_test_len(test)); in xtest_pkcs11_test_1009()
2021 (void *)test->in, test->in_len, in xtest_pkcs11_test_1009()
2022 (void *)test->out, get_mac_test_len(test)); in xtest_pkcs11_test_1009()
2028 if (test->in != NULL) { in xtest_pkcs11_test_1009()
2029 rv = C_VerifyInit(session, test->mechanism, key_handle); in xtest_pkcs11_test_1009()
2034 (void *)test->in, test->in_len, in xtest_pkcs11_test_1009()
2035 (void *)test->out, in xtest_pkcs11_test_1009()
2036 get_mac_test_len(test)); in xtest_pkcs11_test_1009()
2042 (void *)test->in, test->in_len, in xtest_pkcs11_test_1009()
2043 (void *)test->out, in xtest_pkcs11_test_1009()
2044 get_mac_test_len(test)); in xtest_pkcs11_test_1009()
2055 if (test->in != NULL) { in xtest_pkcs11_test_1009()
2056 rv = C_VerifyInit(session, test->mechanism, key_handle); in xtest_pkcs11_test_1009()
2060 rv = C_VerifyUpdate(session, (void *)test->in, in xtest_pkcs11_test_1009()
2061 test->in_len); in xtest_pkcs11_test_1009()
2065 rv = C_VerifyFinal(session, (void *)test->out, 3); in xtest_pkcs11_test_1009()
2067 ckm_is_hmac_general(test) ? in xtest_pkcs11_test_1009()
2078 if (test->in != NULL) { in xtest_pkcs11_test_1009()
2079 rv = C_VerifyInit(session, test->mechanism, key_handle); in xtest_pkcs11_test_1009()
2084 (void *)test->in, test->in_len, in xtest_pkcs11_test_1009()
2085 (void *)test->out, 0); in xtest_pkcs11_test_1009()
2090 rv = C_VerifyInit(session, test->mechanism, key_handle); in xtest_pkcs11_test_1009()
2095 (void *)test->in, test->in_len, in xtest_pkcs11_test_1009()
2096 (void *)test->out, in xtest_pkcs11_test_1009()
2104 if (test->in != NULL) { in xtest_pkcs11_test_1009()
2105 rv = C_VerifyInit(session, test->mechanism, key_handle); in xtest_pkcs11_test_1009()
2110 (void *)test->in, test->in_len, in xtest_pkcs11_test_1009()
2111 (void *)test->out, in xtest_pkcs11_test_1009()
2112 get_mac_test_len(test)); in xtest_pkcs11_test_1009()
2117 rv = C_VerifyUpdate(session, (void *)test->in, in xtest_pkcs11_test_1009()
2118 test->in_len); in xtest_pkcs11_test_1009()