Lines Matching refs:rval
280 int rval; in create_rsa_signature() local
292 rval = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in create_rsa_signature()
294 if (rval != 0) { in create_rsa_signature()
295 fprintf(stderr, " Failed in ctr_drbg_init call (%d)!\n", rval); in create_rsa_signature()
309 rval = mbedtls_rsa_rsassa_pss_sign(mbedtls_pk_rsa(*pk_ctx), in create_rsa_signature()
314 if (rval != 0) { in create_rsa_signature()
317 pers, rval); in create_rsa_signature()
326 return rval; in create_rsa_signature()
356 int rval; in verify_rsa_signature() local
369 rval = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in verify_rsa_signature()
371 if (rval != 0) { in verify_rsa_signature()
372 fprintf(stderr, " Failed in ctr_drbg_init call (%d)!\n", rval); in verify_rsa_signature()
377 rval = mbedtls_pk_parse_subpubkey(&pkey, pub_key + klen, &pk_ctx); in verify_rsa_signature()
378 if (rval != 0) { in verify_rsa_signature()
380 rval); in verify_rsa_signature()
392 rval = mbedtls_rsa_rsassa_pss_verify(mbedtls_pk_rsa(pk_ctx), in verify_rsa_signature()
398 if (rval != 0) in verify_rsa_signature()
399 fprintf(stderr, "Failed to verify signature (%d)!\n", rval); in verify_rsa_signature()
406 return rval; in verify_rsa_signature()
431 int rval = -1; in image_encrypt() local
437 return rval; in image_encrypt()
486 rval = mbedtls_aes_crypt_cbc(&aes_ctx, MBEDTLS_AES_ENCRYPT, in image_encrypt()
489 if (rval != 0) { in image_encrypt()
491 rval); in image_encrypt()
505 rval = -1; in image_encrypt()
512 rval = mbedtls_aes_crypt_cbc(&aes_ctx, MBEDTLS_AES_DECRYPT, in image_encrypt()
515 if (rval != 0) { in image_encrypt()
517 rval); in image_encrypt()
525 rval = -1; in image_encrypt()
536 return rval; in image_encrypt()
554 int rval = -1; in verify_secure_header_signatures() local
602 rval = 0; in verify_secure_header_signatures()
606 return rval; in verify_secure_header_signatures()
654 int array_sz, element, rval = -1; in parse_sec_config_file() local
797 rval = 0; in parse_sec_config_file()
801 if (sec_opt && (rval != 0)) in parse_sec_config_file()
803 return rval; in parse_sec_config_file()