Crypto: Make parameter error code consistent
This patch makes the parameter validation error code
inline with the other checks being done on parameters.
The previous PSA_ERROR_CONNECTION_REFUSED is now replaced
with PSA_ERROR_PROGRAMMER_ERROR.
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Change-Id: I26e0c52e42404ef497265fd64dadce06adbd71bd
diff --git a/secure_fw/partitions/crypto/crypto_aead.c b/secure_fw/partitions/crypto/crypto_aead.c
index ebb522f..53b0848 100644
--- a/secure_fw/partitions/crypto/crypto_aead.c
+++ b/secure_fw/partitions/crypto/crypto_aead.c
@@ -8,11 +8,6 @@
#include <stddef.h>
#include <stdint.h>
-/* FixMe: Use PSA_ERROR_CONNECTION_REFUSED when performing parameter
- * integrity checks but this will have to be revised
- * when the full set of error codes mandated by PSA FF
- * is available.
- */
#include "tfm_mbedcrypto_include.h"
#include "tfm_crypto_api.h"
@@ -38,7 +33,7 @@
CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 3, out_len, 0, 1);
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
@@ -83,7 +78,7 @@
CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 3, out_len, 0, 1);
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
diff --git a/secure_fw/partitions/crypto/crypto_asymmetric.c b/secure_fw/partitions/crypto/crypto_asymmetric.c
index b001746..9f43eb4 100644
--- a/secure_fw/partitions/crypto/crypto_asymmetric.c
+++ b/secure_fw/partitions/crypto/crypto_asymmetric.c
@@ -8,11 +8,6 @@
#include <stddef.h>
#include <stdint.h>
-/* FixMe: Use PSA_ERROR_CONNECTION_REFUSED when performing parameter
- * integrity checks but this will have to be revised
- * when the full set of error codes mandated by PSA FF
- * is available.
- */
#include "tfm_mbedcrypto_include.h"
#include "tfm_crypto_api.h"
@@ -36,7 +31,7 @@
CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 2, out_len, 0, 1);
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
@@ -68,7 +63,7 @@
CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 3, out_len, 0, 0);
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
@@ -103,7 +98,7 @@
CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 3, out_len, 0, 1);
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
@@ -157,7 +152,7 @@
CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 3, out_len, 0, 1);
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
diff --git a/secure_fw/partitions/crypto/crypto_cipher.c b/secure_fw/partitions/crypto/crypto_cipher.c
index abaa259..6e47f61 100644
--- a/secure_fw/partitions/crypto/crypto_cipher.c
+++ b/secure_fw/partitions/crypto/crypto_cipher.c
@@ -8,11 +8,6 @@
#include <stddef.h>
#include <stdint.h>
-/* FixMe: Use PSA_ERROR_CONNECTION_REFUSED when performing parameter
- * integrity checks but this will have to be revised
- * when the full set of error codes mandated by PSA FF
- * is available.
- */
#include "tfm_mbedcrypto_include.h"
#include "tfm_crypto_api.h"
@@ -40,7 +35,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(out_vec[0].len != sizeof(uint32_t))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
@@ -88,7 +83,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(out_vec[0].len != sizeof(uint32_t))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
uint32_t handle = iov->op_handle;
@@ -133,7 +128,7 @@
if ((out_vec[0].len != sizeof(uint32_t)) ||
(in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
uint32_t handle = iov->op_handle;
@@ -182,7 +177,7 @@
if ((out_vec[0].len != sizeof(uint32_t)) ||
(in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
uint32_t handle = iov->op_handle;
@@ -231,7 +226,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(out_vec[0].len != sizeof(uint32_t))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
@@ -283,7 +278,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(out_vec[0].len != sizeof(uint32_t))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
uint32_t handle = iov->op_handle;
@@ -333,7 +328,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(out_vec[0].len != sizeof(uint32_t))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
uint32_t handle = iov->op_handle;
diff --git a/secure_fw/partitions/crypto/crypto_hash.c b/secure_fw/partitions/crypto/crypto_hash.c
index 6a706e8..4d34801 100644
--- a/secure_fw/partitions/crypto/crypto_hash.c
+++ b/secure_fw/partitions/crypto/crypto_hash.c
@@ -8,11 +8,6 @@
#include <stddef.h>
#include <stdint.h>
-/* FixMe: Use PSA_ERROR_CONNECTION_REFUSED when performing parameter
- * integrity checks but this will have to be revised
- * when the full set of error codes mandated by PSA FF
- * is available.
- */
#include "tfm_mbedcrypto_include.h"
#include "tfm_crypto_api.h"
@@ -40,7 +35,7 @@
if ((out_vec[0].len != sizeof(uint32_t)) ||
(in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
uint32_t handle = iov->op_handle;
@@ -86,7 +81,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(out_vec[0].len != sizeof(uint32_t))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
uint32_t handle = iov->op_handle;
@@ -131,7 +126,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(out_vec[0].len != sizeof(uint32_t))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
uint32_t handle = iov->op_handle;
@@ -181,7 +176,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(out_vec[0].len != sizeof(uint32_t))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
uint32_t handle = iov->op_handle;
@@ -228,7 +223,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(out_vec[0].len != sizeof(uint32_t))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
uint32_t handle = iov->op_handle;
@@ -275,7 +270,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(out_vec[0].len != sizeof(uint32_t))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
uint32_t source_handle = iov->op_handle;
@@ -320,7 +315,7 @@
CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 2, out_len, 0, 1);
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
@@ -349,7 +344,7 @@
CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 3, out_len, 0, 0);
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
diff --git a/secure_fw/partitions/crypto/crypto_key.c b/secure_fw/partitions/crypto/crypto_key.c
index caf5387..a2ca7d8 100644
--- a/secure_fw/partitions/crypto/crypto_key.c
+++ b/secure_fw/partitions/crypto/crypto_key.c
@@ -8,11 +8,6 @@
#include <stddef.h>
#include <stdint.h>
-/* FixMe: Use PSA_ERROR_CONNECTION_REFUSED when performing parameter
- * integrity checks but this will have to be revised
- * when the full set of error codes mandated by PSA FF
- * is available.
- */
#include "tfm_mbedcrypto_include.h"
#include "tfm_crypto_api.h"
@@ -200,7 +195,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(in_vec[1].len != sizeof(struct psa_client_key_attributes_s)) ||
(out_vec[0].len != sizeof(psa_key_handle_t))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct psa_client_key_attributes_s *client_key_attr = in_vec[1].base;
const uint8_t *data = in_vec[2].base;
@@ -261,7 +256,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(in_vec[1].len != sizeof(psa_app_key_id_t)) ||
(out_vec[0].len != sizeof(psa_key_handle_t))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
psa_app_key_id_t client_key_id = *((psa_app_key_id_t *)in_vec[1].base);
@@ -314,7 +309,7 @@
CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 1, out_len, 0, 0);
if (in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
@@ -351,7 +346,7 @@
CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 1, out_len, 0, 0);
if (in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
@@ -388,7 +383,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(out_vec[0].len != sizeof(struct psa_client_key_attributes_s))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
@@ -426,7 +421,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(out_vec[0].len != sizeof(struct psa_client_key_attributes_s))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
struct psa_client_key_attributes_s *client_key_attr = out_vec[0].base;
@@ -465,7 +460,7 @@
CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 1, out_len, 0, 1);
if (in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
@@ -489,7 +484,7 @@
CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 1, out_len, 0, 1);
if (in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
@@ -515,7 +510,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(out_vec[0].len != sizeof(psa_key_handle_t)) ||
(in_vec[1].len != sizeof(struct psa_client_key_attributes_s))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
@@ -577,7 +572,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(in_vec[1].len != sizeof(struct psa_client_key_attributes_s)) ||
(out_vec[0].len != sizeof(psa_key_handle_t))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
psa_key_handle_t *key_handle = out_vec[0].base;
const struct psa_client_key_attributes_s *client_key_attr = in_vec[1].base;
diff --git a/secure_fw/partitions/crypto/crypto_key_derivation.c b/secure_fw/partitions/crypto/crypto_key_derivation.c
index baeab11..b2e09be 100644
--- a/secure_fw/partitions/crypto/crypto_key_derivation.c
+++ b/secure_fw/partitions/crypto/crypto_key_derivation.c
@@ -8,11 +8,6 @@
#include <stddef.h>
#include <stdint.h>
-/* FixMe: Use PSA_ERROR_CONNECTION_REFUSED when performing parameter
- * integrity checks but this will have to be revised
- * when the full set of error codes mandated by PSA FF
- * is available.
- */
#include "tfm_mbedcrypto_include.h"
/* Required for mbedtls_calloc in tfm_crypto_huk_derivation_input_bytes */
@@ -147,7 +142,7 @@
if ((out_vec[0].len != sizeof(uint32_t)) ||
(in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
uint32_t handle = iov->op_handle;
@@ -193,7 +188,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(out_vec[0].len != sizeof(size_t))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
@@ -227,7 +222,7 @@
CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 1, out_len, 0, 0);
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
@@ -260,7 +255,7 @@
CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 2, out_len, 0, 0);
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
@@ -301,7 +296,7 @@
CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 1, out_len, 0, 1);
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
@@ -335,7 +330,7 @@
CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 1, out_len, 0, 0);
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
@@ -376,7 +371,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(in_vec[1].len != sizeof(struct psa_client_key_attributes_s)) ||
(out_vec[0].len != sizeof(psa_key_handle_t))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
@@ -442,7 +437,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(out_vec[0].len != sizeof(uint32_t))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
@@ -494,7 +489,7 @@
CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 2, out_len, 0, 0);
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
@@ -537,7 +532,7 @@
CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 1, out_len, 0, 1);
if (in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
uint8_t *output = out_vec[0].base;
size_t output_size = out_vec[0].len;
@@ -558,7 +553,7 @@
CRYPTO_IN_OUT_LEN_VALIDATE(in_len, 1, 2, out_len, 0, 1);
if (in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
uint8_t *output = out_vec[0].base;
diff --git a/secure_fw/partitions/crypto/crypto_mac.c b/secure_fw/partitions/crypto/crypto_mac.c
index 5ab9d46..c983b6a 100644
--- a/secure_fw/partitions/crypto/crypto_mac.c
+++ b/secure_fw/partitions/crypto/crypto_mac.c
@@ -8,11 +8,6 @@
#include <stddef.h>
#include <stdint.h>
-/* FixMe: Use PSA_ERROR_CONNECTION_REFUSED when performing parameter
- * integrity checks but this will have to be revised
- * when the full set of error codes mandated by PSA FF
- * is available.
- */
#include "tfm_mbedcrypto_include.h"
#include "tfm_crypto_api.h"
@@ -40,7 +35,7 @@
if ((out_vec[0].len != sizeof(uint32_t)) ||
(in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
uint32_t handle = iov->op_handle;
@@ -92,7 +87,7 @@
if ((out_vec[0].len != sizeof(uint32_t)) ||
(in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
uint32_t handle = iov->op_handle;
@@ -144,7 +139,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(out_vec[0].len != sizeof(uint32_t))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
uint32_t handle = iov->op_handle;
@@ -189,7 +184,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(out_vec[0].len != sizeof(uint32_t))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
uint32_t handle = iov->op_handle;
@@ -239,7 +234,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(out_vec[0].len != sizeof(uint32_t))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
uint32_t handle = iov->op_handle;
@@ -286,7 +281,7 @@
if ((in_vec[0].len != sizeof(struct tfm_crypto_pack_iovec)) ||
(out_vec[0].len != sizeof(uint32_t))) {
- return PSA_ERROR_CONNECTION_REFUSED;
+ return PSA_ERROR_PROGRAMMER_ERROR;
}
const struct tfm_crypto_pack_iovec *iov = in_vec[0].base;
uint32_t handle = iov->op_handle;