• Home
  • Raw
  • Download

Lines Matching refs:rc

33     TSS2_RC rc;  in check_hash_functions()  local
39 rc = iesys_crypto_hash_start(NULL, TPM2_ALG_SHA384); in check_hash_functions()
40 assert_int_equal (rc, TSS2_ESYS_RC_BAD_REFERENCE); in check_hash_functions()
43 rc = iesys_crypto_hash_start(&context, TPM2_ALG_SHA512); in check_hash_functions()
44 assert_int_equal (rc, TSS2_ESYS_RC_NOT_IMPLEMENTED); in check_hash_functions()
47 rc = iesys_crypto_hash_start(&context, 0); in check_hash_functions()
48 assert_int_equal (rc, TSS2_ESYS_RC_NOT_IMPLEMENTED); in check_hash_functions()
50 rc = iesys_crypto_hash_start(&context, TPM2_ALG_SHA384); in check_hash_functions()
51 assert_int_equal (rc, TSS2_RC_SUCCESS); in check_hash_functions()
53 rc = iesys_crypto_hash_finish(NULL, &buffer[0], &size); in check_hash_functions()
54 assert_int_equal (rc, TSS2_ESYS_RC_BAD_REFERENCE); in check_hash_functions()
56 rc = iesys_crypto_hash_finish(&context, &buffer[0], &size); in check_hash_functions()
57 assert_int_equal (rc, TSS2_ESYS_RC_BAD_SIZE); in check_hash_functions()
62 rc = iesys_crypto_hash_update(NULL, &buffer[0], 10); in check_hash_functions()
63 assert_int_equal (rc, TSS2_ESYS_RC_BAD_REFERENCE); in check_hash_functions()
65 rc = iesys_crypto_hash_update2b(NULL, &tpm2b); in check_hash_functions()
66 assert_int_equal (rc, TSS2_ESYS_RC_BAD_REFERENCE); in check_hash_functions()
69 rc = iesys_crypto_hmac_start(&context, TPM2_ALG_SHA1, &buffer[0], 10); in check_hash_functions()
70 assert_int_equal (rc, TSS2_RC_SUCCESS); in check_hash_functions()
74 rc = iesys_crypto_hash_update(context, &buffer[0], 10); in check_hash_functions()
75 assert_int_equal (rc, TSS2_ESYS_RC_BAD_REFERENCE); in check_hash_functions()
77 rc = iesys_crypto_hash_finish(&context, &buffer[0], &size); in check_hash_functions()
78 assert_int_equal (rc, TSS2_ESYS_RC_BAD_REFERENCE); in check_hash_functions()
87 TSS2_RC rc; in check_hmac_functions() local
93 rc = iesys_crypto_hmac_start(NULL, TPM2_ALG_SHA384, &buffer[0], 10); in check_hmac_functions()
94 assert_int_equal (rc, TSS2_ESYS_RC_BAD_REFERENCE); in check_hmac_functions()
97 rc = iesys_crypto_hmac_start(&context, TPM2_ALG_SHA512, &buffer[0], 10); in check_hmac_functions()
98 assert_int_equal (rc, TSS2_ESYS_RC_NOT_IMPLEMENTED); in check_hmac_functions()
101 rc = iesys_crypto_hmac_start(&context, 0, &buffer[0], 10); in check_hmac_functions()
102 assert_int_equal (rc, TSS2_ESYS_RC_NOT_IMPLEMENTED); in check_hmac_functions()
104 rc = iesys_crypto_hmac_start(&context, TPM2_ALG_SHA1, &buffer[0], 10); in check_hmac_functions()
105 assert_int_equal (rc, TSS2_RC_SUCCESS); in check_hmac_functions()
107 rc = iesys_crypto_hmac_finish(NULL, &buffer[0], &size); in check_hmac_functions()
108 assert_int_equal (rc, TSS2_ESYS_RC_BAD_REFERENCE); in check_hmac_functions()
110 rc = iesys_crypto_hmac_finish2b(NULL, &tpm2b); in check_hmac_functions()
111 assert_int_equal (rc, TSS2_ESYS_RC_BAD_REFERENCE); in check_hmac_functions()
113 rc = iesys_crypto_hmac_finish(&context, &buffer[0], &size); in check_hmac_functions()
114 assert_int_equal (rc, TSS2_ESYS_RC_BAD_SIZE); in check_hmac_functions()
119 rc = iesys_crypto_hmac_update(NULL, &buffer[0], 10); in check_hmac_functions()
120 assert_int_equal (rc, TSS2_ESYS_RC_BAD_REFERENCE); in check_hmac_functions()
122 rc = iesys_crypto_hmac_update2b(NULL, &tpm2b); in check_hmac_functions()
123 assert_int_equal (rc, TSS2_ESYS_RC_BAD_REFERENCE); in check_hmac_functions()
126 rc = iesys_crypto_hash_start(&context, TPM2_ALG_SHA1); in check_hmac_functions()
127 assert_int_equal (rc, TSS2_RC_SUCCESS); in check_hmac_functions()
131 rc = iesys_crypto_hmac_update(context, &buffer[0], 10); in check_hmac_functions()
132 assert_int_equal (rc, TSS2_ESYS_RC_BAD_REFERENCE); in check_hmac_functions()
134 rc = iesys_crypto_hmac_finish(&context, &buffer[0], &size); in check_hmac_functions()
135 assert_int_equal (rc, TSS2_ESYS_RC_BAD_REFERENCE); in check_hmac_functions()
144 TSS2_RC rc; in check_random() local
147 rc = iesys_crypto_random2b(&nonce, num_bytes); in check_random()
148 assert_int_equal (rc, TSS2_RC_SUCCESS); in check_random()
154 TSS2_RC rc; in check_pk_encrypt() local
194rc = iesys_crypto_pk_encrypt(&inPublicRSA, size, &in_buffer[0], size, &out_buffer[0], &size, "LABE… in check_pk_encrypt()
195 assert_int_equal (rc, TSS2_ESYS_RC_NOT_IMPLEMENTED); in check_pk_encrypt()
199rc = iesys_crypto_pk_encrypt(&inPublicRSA, size, &in_buffer[0], size, &out_buffer[0], &size, "LABE… in check_pk_encrypt()
200 assert_int_equal (rc, TSS2_ESYS_RC_BAD_VALUE); in check_pk_encrypt()
206 TSS2_RC rc; in check_aes_encrypt() local
212 rc = iesys_crypto_sym_aes_encrypt(NULL, TPM2_ALG_AES, 192, TPM2_ALG_CFB, 16, in check_aes_encrypt()
214 assert_int_equal (rc, TSS2_ESYS_RC_BAD_REFERENCE); in check_aes_encrypt()
216 rc = iesys_crypto_sym_aes_encrypt(&key[0], TPM2_ALG_AES, 192, TPM2_ALG_CFB, 16, in check_aes_encrypt()
218 assert_int_equal (rc, TSS2_RC_SUCCESS); in check_aes_encrypt()
219 rc = iesys_crypto_sym_aes_encrypt(&key[0], TPM2_ALG_AES, 256, TPM2_ALG_CFB, 16, in check_aes_encrypt()
221 assert_int_equal (rc, TSS2_RC_SUCCESS); in check_aes_encrypt()
223 rc = iesys_crypto_sym_aes_encrypt(&key[0], 0, 256, TPM2_ALG_CFB, 16, in check_aes_encrypt()
225 assert_int_equal (rc, TSS2_ESYS_RC_BAD_VALUE); in check_aes_encrypt()
227 rc = iesys_crypto_sym_aes_encrypt(&key[0], TPM2_ALG_AES, 256, 0, 16, in check_aes_encrypt()
229 assert_int_equal (rc, TSS2_ESYS_RC_BAD_VALUE); in check_aes_encrypt()
231 rc = iesys_crypto_sym_aes_encrypt(&key[0], TPM2_ALG_AES, 999, TPM2_ALG_CFB, 16, in check_aes_encrypt()
233 assert_int_equal (rc, TSS2_ESYS_RC_BAD_VALUE); in check_aes_encrypt()
235 rc = iesys_crypto_sym_aes_decrypt(NULL, TPM2_ALG_AES, 192, TPM2_ALG_CFB, 16, in check_aes_encrypt()
237 assert_int_equal (rc, TSS2_ESYS_RC_BAD_REFERENCE); in check_aes_encrypt()
239 rc = iesys_crypto_sym_aes_decrypt(&key[0], 0, 192, TPM2_ALG_CFB, 16, in check_aes_encrypt()
241 assert_int_equal (rc, TSS2_ESYS_RC_BAD_VALUE); in check_aes_encrypt()
259 TSS2_RC rc; in check_get_sys_context() local
261 rc = Esys_GetSysContext(NULL, NULL); in check_get_sys_context()
262 assert_int_equal(rc, TSS2_ESYS_RC_BAD_REFERENCE); in check_get_sys_context()
268 rc = Esys_Initialize(&ctx, (TSS2_TCTI_CONTEXT *) &tcti, NULL); in check_get_sys_context()
269 assert_int_equal(rc, TSS2_RC_SUCCESS); in check_get_sys_context()
271 rc = Esys_GetSysContext(ctx, &sys_ctx); in check_get_sys_context()
273 assert_int_equal(rc, TSS2_RC_SUCCESS); in check_get_sys_context()