summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDaiki Ueno <dueno@redhat.com>2016-12-06 11:38:04 +0100
committerDaiki Ueno <ueno@gnu.org>2016-12-13 10:14:02 +0100
commit5287a57b9e6d96504af4ad0f989328397f845d55 (patch)
tree6609f86240012d9d4e0391f5a9ee33f121f005cc /common
parent15a28b263f37de4796899dff04bcf3886f9d010e (diff)
pkcs11: Add CK_RSA_PKCS_OAEP_PARAMS definition
https://bugzilla.redhat.com/show_bug.cgi?id=1191209
Diffstat (limited to 'common')
-rw-r--r--common/pkcs11.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/common/pkcs11.h b/common/pkcs11.h
index e295286..059cee6 100644
--- a/common/pkcs11.h
+++ b/common/pkcs11.h
@@ -179,6 +179,12 @@ extern "C" {
#define unlock_mutex UnlockMutex
#define reserved pReserved
+#define ck_rsa_pkcs_mgf_type_t CK_RSA_PKCS_MGF_TYPE
+#define ck_rsa_pkcs_oaep_source_type_t CK_RSA_PKCS_OAEP_SOURCE_TYPE
+#define hash_alg hashAlg
+#define source_data pSourceData
+#define source_data_len ulSourceDataLen
+
#endif /* CRYPTOKI_COMPAT */
@@ -735,6 +741,17 @@ struct ck_mechanism_info
ck_flags_t flags;
};
+typedef unsigned long ck_rsa_pkcs_mgf_type_t;
+typedef unsigned long ck_rsa_pkcs_oaep_source_type_t;
+
+struct ck_rsa_pkcs_oaep_params {
+ ck_mechanism_type_t hash_alg;
+ ck_rsa_pkcs_mgf_type_t mgf;
+ ck_rsa_pkcs_oaep_source_type_t source;
+ void *source_data;
+ unsigned long source_data_len;
+};
+
#define CKF_HW (1UL << 0)
#define CKF_ENCRYPT (1UL << 8)
#define CKF_DECRYPT (1UL << 9)
@@ -1305,6 +1322,9 @@ typedef struct ck_function_list **CK_FUNCTION_LIST_PTR_PTR;
typedef struct ck_c_initialize_args CK_C_INITIALIZE_ARGS;
typedef struct ck_c_initialize_args *CK_C_INITIALIZE_ARGS_PTR;
+typedef struct ck_rsa_pkcs_oaep_params CK_RSA_PKCS_OAEP_PARAM;
+typedef struct ck_rsa_pkcs_oaep_params *CK_RSA_PKCS_OAEP_PARAMS_PTR;
+
#define NULL_PTR NULL
/* Delete the helper macros defined at the top of the file. */