]> granicus.if.org Git - p11-kit/commitdiff
pkcs11: Add CK_RSA_PKCS_OAEP_PARAMS definition
authorDaiki Ueno <dueno@redhat.com>
Tue, 6 Dec 2016 10:38:04 +0000 (11:38 +0100)
committerDaiki Ueno <ueno@gnu.org>
Tue, 13 Dec 2016 09:14:02 +0000 (10:14 +0100)
https://bugzilla.redhat.com/show_bug.cgi?id=1191209

common/pkcs11.h

index e2952867f696f2524c42293b9ceb7869eed50176..059cee6fbe5f3813f5871dbe73086c34beed7ca5 100644 (file)
@@ -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.  */