Add psa_export_public_key_iop_s struct and docs
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
diff --git a/tf-psa-crypto/include/psa/crypto_struct.h b/tf-psa-crypto/include/psa/crypto_struct.h
index ded3af0..84fffbd 100644
--- a/tf-psa-crypto/include/psa/crypto_struct.h
+++ b/tf-psa-crypto/include/psa/crypto_struct.h
@@ -568,6 +568,37 @@
return v;
}
+/**
+ * \brief The context for PSA interruptible export public-key.
+ */
+struct psa_export_public_key_iop_s {
+#if defined(MBEDTLS_PSA_CRYPTO_CLIENT) && !defined(MBEDTLS_PSA_CRYPTO_C)
+ mbedtls_psa_client_handle_t handle;
+#else
+ /**
+ * Unique ID indicating which driver got assigned to do the
+ * operation. Since driver contexts are driver-specific, swapping
+ * drivers halfway through the operation is not supported.
+ * ID values are auto-generated in psa_crypto_driver_wrappers.h
+ * ID value zero means the context is not valid or not assigned to
+ * any driver (i.e. none of the driver contexts are active).
+ */
+ unsigned int MBEDTLS_PRIVATE(id);
+#endif
+};
+#if defined(MBEDTLS_PSA_CRYPTO_CLIENT) && !defined(MBEDTLS_PSA_CRYPTO_C)
+#define PSA_EXPORT_PUBLIC_KEY_IOP_INIT { 0 }
+#else
+#define PSA_EXPORT_PUBLIC_KEY_IOP_INIT { 0 }
+#endif
+
+static inline struct psa_export_public_key_iop_s psa_export_public_key_iop_init(void)
+{
+ const struct psa_export_public_key_iop_s v = PSA_EXPORT_PUBLIC_KEY_IOP_INIT;
+
+ return v;
+}
+
#ifdef __cplusplus
}
#endif