[1/4] wincrypt.h: Define some enveloped message callback functions.
Alexander Morozov
amorozov at etersoft.ru
Thu Dec 2 06:18:51 CST 2010
-------------- next part --------------
From 08da176fa477aec19e1fc26a28542f45fcd924b6 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov at etersoft.ru>
Date: Wed, 1 Dec 2010 13:55:56 +0300
Subject: [PATCH 1/4] wincrypt.h: Define some enveloped message callback functions.
---
include/wincrypt.h | 37 +++++++++++++++++++++++++++++++++++++
1 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/include/wincrypt.h b/include/wincrypt.h
index c813738..7d5a87c 100644
--- a/include/wincrypt.h
+++ b/include/wincrypt.h
@@ -2279,6 +2279,8 @@ static const WCHAR CERT_TRUST_PUB_AUTHENTICODE_FLAGS_VALUE_NAME[] =
"CertDllVerifyCertificateChainPolicy"
#define URL_OID_GET_OBJECT_URL_FUNC "UrlDllGetObjectUrl"
#define TIME_VALID_OID_GET_OBJECT_FUNC "TimeValidDllGetObject"
+#define CMSG_OID_GEN_CONTENT_ENCRYPT_KEY_FUNC "CryptMsgDllGenContentEncryptKey"
+#define CMSG_OID_EXPORT_KEY_TRANS_FUNC "CryptMsgDllExportKeyTrans"
#define CRYPT_OID_REGPATH "Software\\Microsoft\\Cryptography\\OID"
#define CRYPT_OID_REG_ENCODING_TYPE_PREFIX "EncodingType "
@@ -3778,6 +3780,41 @@ typedef struct _CMSG_CMS_RECIPIENT_INFO {
#define CMSG_KEY_AGREE_VERSION CMSG_ENVELOPED_RECIPIENT_V3
#define CMSG_MAIL_LIST_VERSION CMSG_ENVELOPED_RECIPIENT_V4
+typedef void * (WINAPI *PFN_CMSG_ALLOC)(size_t cb);
+typedef void (WINAPI *PFN_CMSG_FREE)(void *pv);
+
+typedef struct _CMSG_CONTENT_ENCRYPT_INFO {
+ DWORD cbSize;
+ HCRYPTPROV hCryptProv;
+ CRYPT_ALGORITHM_IDENTIFIER ContentEncryptionAlgorithm;
+ void *pvEncryptionAuxInfo;
+ DWORD cRecipients;
+ PCMSG_RECIPIENT_ENCODE_INFO rgCmsRecipients;
+ PFN_CMSG_ALLOC pfnAlloc;
+ PFN_CMSG_FREE pfnFree;
+ DWORD dwEncryptFlags;
+ HCRYPTKEY hContentEncryptKey;
+ DWORD dwFlags;
+} CMSG_CONTENT_ENCRYPT_INFO, *PCMSG_CONTENT_ENCRYPT_INFO;
+
+typedef struct _CMSG_KEY_TRANS_ENCRYPT_INFO {
+ DWORD cbSize;
+ DWORD dwRecipientIndex;
+ CRYPT_ALGORITHM_IDENTIFIER KeyEncryptionAlgorithm;
+ CRYPT_DATA_BLOB EncryptedKey;
+ DWORD dwFlags;
+} CMSG_KEY_TRANS_ENCRYPT_INFO, *PCMSG_KEY_TRANS_ENCRYPT_INFO;
+
+typedef BOOL (WINAPI *PFN_CMSG_GEN_CONTENT_ENCRYPT_KEY)(
+ PCMSG_CONTENT_ENCRYPT_INFO pContentEncryptInfo, DWORD dwFlags,
+ void *pvReserved);
+
+typedef BOOL (WINAPI *PFN_CMSG_EXPORT_KEY_TRANS)(
+ PCMSG_CONTENT_ENCRYPT_INFO pContentEncryptInfo,
+ PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO pKeyTransEncodeInfo,
+ PCMSG_KEY_TRANS_ENCRYPT_INFO pKeyTransEncryptInfo,
+ DWORD dwFlags, void *pvReserved);
+
/* CryptMsgGetAndVerifySigner flags */
#define CMSG_TRUSTED_SIGNER_FLAG 0x1
#define CMSG_SIGNER_ONLY_FLAG 0x2
--
1.7.3.2
More information about the wine-patches
mailing list