Lines Matching full:status

77     psa_status_t status;
85 status = psa_crypto_init();
86 if (status != PSA_SUCCESS) {
98 status = psa_import_key(&attributes, key, key_len, &key_id);
99 if (status != PSA_SUCCESS) {
130 psa_status_t status;
144 status = psa_crypto_init();
145 if (status != PSA_SUCCESS) {
157 status = psa_import_key(&attributes, key, key_len, &key_id);
158 if (status != PSA_SUCCESS) {
164 status = psa_sign_hash(key_id, PSA_ALG_RSA_PKCS1V15_SIGN_RAW,
168 if (status != PSA_SUCCESS) {
208 psa_status_t status;
223 status = psa_crypto_init();
224 if (status != PSA_SUCCESS)
235 status = psa_import_key(&attributes, key, key_len, &key_id);
236 if (status != PSA_SUCCESS) {
243 status = psa_cipher_encrypt_setup(&operation, key_id, alg);
244 if (status != PSA_SUCCESS) {
248 status = psa_cipher_generate_iv(&operation, iv, sizeof(iv), &iv_len);
249 if (status != PSA_SUCCESS) {
253 status = psa_cipher_update(&operation, plaintext, sizeof(plaintext),
255 if (status != PSA_SUCCESS) {
259 status = psa_cipher_finish(&operation, output + output_len,
261 if (status != PSA_SUCCESS) {
293 psa_status_t status;
307 status = psa_crypto_init();
308 if (status != PSA_SUCCESS)
319 status = psa_import_key(&attributes, key, key_len, &key_id);
320 if (status != PSA_SUCCESS) {
327 status = psa_cipher_decrypt_setup(&operation, key_id, alg);
328 if (status != PSA_SUCCESS) {
332 status = psa_cipher_set_iv(&operation, iv, sizeof(iv));
333 if (status != PSA_SUCCESS) {
337 status = psa_cipher_update(&operation, ciphertext, sizeof(ciphertext),
339 if (status != PSA_SUCCESS) {
343 status = psa_cipher_finish(&operation, output + output_len,
345 if (status != PSA_SUCCESS) {
368 …()`, `psa_cipher_set_iv()` or `psa_cipher_update()` fails (returning any status other than `PSA_SU…
394 psa_status_t status;
405 status = psa_crypto_init();
406 if (status != PSA_SUCCESS) {
412 status = psa_hash_setup(&operation, alg);
413 if (status != PSA_SUCCESS) {
417 status = psa_hash_update(&operation, input, sizeof(input));
418 if (status != PSA_SUCCESS) {
422 status = psa_hash_finish(&operation, actual_hash, sizeof(actual_hash),
424 if (status != PSA_SUCCESS) {
439 psa_status_t status;
454 status = psa_crypto_init();
455 if (status != PSA_SUCCESS) {
461 status = psa_hash_setup(&operation, alg);
462 if (status != PSA_SUCCESS) {
466 status = psa_hash_update(&operation, input, sizeof(input));
467 if (status != PSA_SUCCESS) {
471 status = psa_hash_verify(&operation, expected_hash, expected_hash_len);
472 if (status != PSA_SUCCESS) {
492 1. A call to `psa_hash_update()` fails (returning any status other than `PSA_SUCCESS`).
513 psa_status_t status;
520 status = psa_crypto_init();
521 if (status != PSA_SUCCESS) {
526 status = psa_generate_random(random, sizeof(random));
527 if (status != PSA_SUCCESS) {
577 psa_status_t status;
602 status = psa_crypto_init();
603 if (status != PSA_SUCCESS) {
613 status = psa_import_key(&attributes, key, sizeof(key), &base_key);
614 if (status != PSA_SUCCESS) {
621 status = psa_key_derivation_setup(&operation, alg);
622 if (status != PSA_SUCCESS) {
626 status = psa_key_derivation_set_capacity(&operation, capacity);
627 if (status != PSA_SUCCESS) {
631 status = psa_key_derivation_input_bytes(&operation,
634 if (status != PSA_SUCCESS) {
638 status = psa_key_derivation_input_key(&operation,
641 if (status != PSA_SUCCESS) {
645 status = psa_key_derivation_input_bytes(&operation,
648 if (status != PSA_SUCCESS) {
656 status = psa_key_derivation_output_key(&attributes, &operation,
658 if (status != PSA_SUCCESS) {
686 psa_status_t status;
711 status = psa_crypto_init();
712 if (status != PSA_SUCCESS) {
729 status = psa_import_key(&attributes, key, sizeof(key), &key_id);
733 status = psa_aead_encrypt(key_id, PSA_ALG_CCM,
739 if (status != PSA_SUCCESS) {
758 psa_status_t status;
782 status = psa_crypto_init();
783 if (status != PSA_SUCCESS) {
800 status = psa_import_key(&attributes, key_data, sizeof(key_data), &key_id);
801 if (status != PSA_SUCCESS) {
808 status = psa_aead_decrypt(key_id, PSA_ALG_CCM,
814 if (status != PSA_SUCCESS) {
815 printf("Failed to authenticate and decrypt %ld\n", status);
847 psa_status_t status;
857 status = psa_crypto_init();
858 if (status != PSA_SUCCESS) {
870 status = psa_generate_key(&attributes, &key_id);
871 if (status != PSA_SUCCESS) {
877 status = psa_export_public_key(key_id, exported, sizeof(exported),
879 if (status != PSA_SUCCESS) {
880 printf("Failed to export public key %ld\n", status);