diff mbox

[PATCHv2,1/2] api: crypto: add error code for invalid IV

Message ID 1424775782-15453-2-git-send-email-taras.kondratiuk@linaro.org
State Accepted
Commit 275825877c978e320f95b22dd95c31e2dc693c1f
Headers show

Commit Message

Taras Kondratiuk Feb. 24, 2015, 11:03 a.m. UTC
Add an error code for a case when a session is created without
specifying an IV value, and then crypto operation is invoked without
a valid override_iv_ptr.

Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
---
 include/odp/api/crypto.h                               | 3 +++
 platform/linux-generic/include/odp/plat/crypto_types.h | 1 +
 2 files changed, 4 insertions(+)
diff mbox

Patch

diff --git a/include/odp/api/crypto.h b/include/odp/api/crypto.h
index a71753c..506f765 100644
--- a/include/odp/api/crypto.h
+++ b/include/odp/api/crypto.h
@@ -223,6 +223,9 @@  typedef struct odp_crypto_op_params {
  *
  * @enum crypto_alg_err:ODP_CRYPTO_ALG_ERR_ICV_CHECK
  * Computed ICV value mismatch
+ *
+ * @enum crypto_alg_err:ODP_CRYPTO_ALG_ERR_IV_INVALID
+ * IV value not specified
  */
 
 /**
diff --git a/platform/linux-generic/include/odp/plat/crypto_types.h b/platform/linux-generic/include/odp/plat/crypto_types.h
index 3c26aa1..1b10a5d 100644
--- a/platform/linux-generic/include/odp/plat/crypto_types.h
+++ b/platform/linux-generic/include/odp/plat/crypto_types.h
@@ -60,6 +60,7 @@  enum crypto_alg_err {
 	ODP_CRYPTO_ALG_ERR_DATA_SIZE,
 	ODP_CRYPTO_ALG_ERR_KEY_SIZE,
 	ODP_CRYPTO_ALG_ERR_ICV_CHECK,
+	ODP_CRYPTO_ALG_ERR_IV_INVALID,
 };
 
 enum crypto_hw_err {