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;