Headers diff for cryptxml.dll between 6.1.7600.16385-Windows_7.0 and 6.3.9600.17415-Windows_8.1 versions



 cryptxml.h (6.1.7600.16385-Windows_7.0)   cryptxml.h (6.3.9600.17415-Windows_8.1) 
skipping to change at line 13 skipping to change at line 13
// Copyright (C) Microsoft, 2007 // Copyright (C) Microsoft, 2007
// //
// //
// File: CryptXml.h // File: CryptXml.h
// //
// Contents: // Contents:
// XML DigSig // XML DigSig
// //
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
#pragma once #pragma once
#include <winapifamily.h>
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#include <specstrings.h> /* for SAL annotations */ #include <specstrings.h> /* for SAL annotations */
#include <wincrypt.h> #include <wincrypt.h>
#include <bcrypt.h> #include <bcrypt.h>
#include <ncrypt.h> #include <ncrypt.h>
#ifndef WINAPI #ifndef WINAPI
#define WINAPI __stdcall #define WINAPI __stdcall
#endif #endif
skipping to change at line 232 skipping to change at line 236
// CRYPT_XML_FLAG_ENFORCE_ID_NAME_FORMAT flag is applicable to: // CRYPT_XML_FLAG_ENFORCE_ID_NAME_FORMAT flag is applicable to:
// CryptXmlOpenToEncode // CryptXmlOpenToEncode
// CryptXmlOpenToDecode // CryptXmlOpenToDecode
// When this flag is set, then Id attibutes must conform to // When this flag is set, then Id attibutes must conform to
// Name syntax (http://www.w3.org/TR/2000/WD-xml-2e-2000814#idref). // Name syntax (http://www.w3.org/TR/2000/WD-xml-2e-2000814#idref).
// By default, CryptXml accepts any valid string for Id attribute. // By default, CryptXml accepts any valid string for Id attribute.
#define CRYPT_XML_FLAG_ENFORCE_ID_NAME_FORMAT 0x08000000 #define CRYPT_XML_FLAG_ENFORCE_ID_NAME_FORMAT 0x08000000
//CRYPT_XML_FLAG_ECDSA_DISIG11 flag is applicable to:
//CryptXmlOpenToEncode
//When this flag is set, ECKeyValue schema defined in XML Signature Syntax and P
rocessing Version 1.1
//is used to encode the ECC signing key. Otherwise, ECC key value uses the sch
ema defined
//in RFC4050.
#define CRYPT_XML_FLAG_ECDSA_DSIG11 0x04000000
/**************************************************************************** /****************************************************************************
CRYPT_XML_CHARSET CRYPT_XML_CHARSET
****************************************************************************/ ****************************************************************************/
typedef enum typedef enum
{ {
// //
// CRYPT_XML_CHARSET_AUTO is supported only in CryptXmlOpenToDecode mode. // CRYPT_XML_CHARSET_AUTO is supported only in CryptXmlOpenToDecode mode.
// The encoded XML character set will be determined by the parser from // The encoded XML character set will be determined by the parser from
// the XML declaration or the best guess on the characters. // the XML declaration or the best guess on the characters.
skipping to change at line 257 skipping to change at line 269
CRYPT_XML_CHARSET_UTF16BE = 3, CRYPT_XML_CHARSET_UTF16BE = 3,
}CRYPT_XML_CHARSET; }CRYPT_XML_CHARSET;
/**************************************************************************** /****************************************************************************
CRYPT_XML_BLOB CRYPT_XML_BLOB
****************************************************************************/ ****************************************************************************/
typedef struct _CRYPT_XML_BLOB{ typedef struct _CRYPT_XML_BLOB{
CRYPT_XML_CHARSET dwCharset; CRYPT_XML_CHARSET dwCharset;
__range( 0, CRYPT_XML_BLOB_MAX ) _Field_range_( 0, CRYPT_XML_BLOB_MAX )
ULONG cbData; ULONG cbData;
__field_ecount(cbData) _Field_size_(cbData)
BYTE *pbData; BYTE *pbData;
}CRYPT_XML_BLOB, *PCRYPT_XML_BLOB; }CRYPT_XML_BLOB, *PCRYPT_XML_BLOB;
/**************************************************************************** /****************************************************************************
CRYPT_XML_DATA_BLOB CRYPT_XML_DATA_BLOB
****************************************************************************/ ****************************************************************************/
typedef struct _CRYPT_XML_DATA_BLOB{ typedef struct _CRYPT_XML_DATA_BLOB{
__range( 0, CRYPT_XML_BLOB_MAX ) _Field_range_( 0, CRYPT_XML_BLOB_MAX )
ULONG cbData; ULONG cbData;
__field_ecount(cbData) _Field_size_(cbData)
BYTE *pbData; BYTE *pbData;
}CRYPT_XML_DATA_BLOB, *PCRYPT_XML_DATA_BLOB; }CRYPT_XML_DATA_BLOB, *PCRYPT_XML_DATA_BLOB;
/**************************************************************************** /****************************************************************************
CRYPT_XML_PROPERTY CRYPT_XML_PROPERTY
CRYPT_XML_PROPERTY_MAX_HEAP_SIZE CRYPT_XML_PROPERTY_MAX_HEAP_SIZE
Specifies the maximum heap size to be used by XML layer. Specifies the maximum heap size to be used by XML layer.
This property is also applied for intermediate buffers used to parse This property is also applied for intermediate buffers used to parse
or construct XML parts. or construct XML parts.
skipping to change at line 319 skipping to change at line 331
{ {
CRYPT_XML_PROPERTY_MAX_HEAP_SIZE = 1, // ULONG, sizeof(ULONG) CRYPT_XML_PROPERTY_MAX_HEAP_SIZE = 1, // ULONG, sizeof(ULONG)
CRYPT_XML_PROPERTY_SIGNATURE_LOCATION = 2, // LPCWSTR*, sizeof(LPCWSTR) CRYPT_XML_PROPERTY_SIGNATURE_LOCATION = 2, // LPCWSTR*, sizeof(LPCWSTR)
CRYPT_XML_PROPERTY_MAX_SIGNATURES = 3, // ULONG, sizeof(ULONG) CRYPT_XML_PROPERTY_MAX_SIGNATURES = 3, // ULONG, sizeof(ULONG)
CRYPT_XML_PROPERTY_DOC_DECLARATION = 4, // BOOL, sizeof(BOOL) CRYPT_XML_PROPERTY_DOC_DECLARATION = 4, // BOOL, sizeof(BOOL)
CRYPT_XML_PROPERTY_XML_OUTPUT_CHARSET = 5, // CRYPT_XML_CHARSET, sizeof (CRYPT_XML_CHARSET) CRYPT_XML_PROPERTY_XML_OUTPUT_CHARSET = 5, // CRYPT_XML_CHARSET, sizeof (CRYPT_XML_CHARSET)
}CRYPT_XML_PROPERTY_ID; }CRYPT_XML_PROPERTY_ID;
typedef struct _CRYPT_XML_PROPERTY{ typedef struct _CRYPT_XML_PROPERTY{
CRYPT_XML_PROPERTY_ID dwPropId; CRYPT_XML_PROPERTY_ID dwPropId;
__field_bcount( cbValue ) _Field_size_bytes_( cbValue )
const void* pvValue; const void* pvValue;
ULONG cbValue; ULONG cbValue;
}CRYPT_XML_PROPERTY, *PCRYPT_XML_PROPERTY; }CRYPT_XML_PROPERTY, *PCRYPT_XML_PROPERTY;
/**************************************************************************** /****************************************************************************
PFN_CRYPT_XML_WRITE_CALLBACK PFN_CRYPT_XML_WRITE_CALLBACK
Callback function used to write data. Callback function used to write data.
pvCallbackState pvCallbackState
[in] An application defined argument for the callback. [in] An application defined argument for the callback.
pbData pbData
[in] Pointer to a block of data to be written. [in] Pointer to a block of data to be written.
cbData cbData
Size, in bytes, of the block of data at pbData. Size, in bytes, of the block of data at pbData.
****************************************************************************/ ****************************************************************************/
typedef typedef
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
(CALLBACK* PFN_CRYPT_XML_WRITE_CALLBACK)( (CALLBACK* PFN_CRYPT_XML_WRITE_CALLBACK)(
__inout void *pvCallbackState, _Inout_ void *pvCallbackState,
__in_bcount( cbData ) _In_reads_bytes_( cbData )
const BYTE *pbData, const BYTE *pbData,
ULONG cbData ULONG cbData
); );
/**************************************************************************** /****************************************************************************
PFN_CRYPT_XML_DATA_PROVIDER_READ PFN_CRYPT_XML_DATA_PROVIDER_READ
Callback function used to provide data. Callback function used to provide data.
pvCallbackState pvCallbackState
skipping to change at line 385 skipping to change at line 397
If the function fails, the error code is determined by HRESULT. If the function fails, the error code is determined by HRESULT.
If the *pcbRead value is 0, then there is no more data available. If the *pcbRead value is 0, then there is no more data available.
Remarks: Remarks:
The callback shall not return unless number of bytes specified in cbData The callback shall not return unless number of bytes specified in cbData
is available, or it's the last block of data. is available, or it's the last block of data.
****************************************************************************/ ****************************************************************************/
typedef typedef
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
(CALLBACK *PFN_CRYPT_XML_DATA_PROVIDER_READ)( (CALLBACK *PFN_CRYPT_XML_DATA_PROVIDER_READ)(
__inout void *pvCallbackState, _Inout_ void *pvCallbackState,
__out_bcount_part( cbData, *pcbRead ) _Out_writes_bytes_to_( cbData, *pcbRead )
BYTE *pbData, BYTE *pbData,
__in ULONG cbData, _In_ ULONG cbData,
__out_range( 0, cbData ) _Out_range_( 0, cbData )
ULONG *pcbRead ULONG *pcbRead
); );
/**************************************************************************** /****************************************************************************
PFN_CRYPT_XML_DATA_PROVIDER_CLOSE PFN_CRYPT_XML_DATA_PROVIDER_CLOSE
Callback function used to release the data provider. Callback function used to release the data provider.
pvCallbackState pvCallbackState
[in] An application defined argument for the callback. [in] An application defined argument for the callback.
****************************************************************************/ ****************************************************************************/
typedef typedef
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
(CALLBACK *PFN_CRYPT_XML_DATA_PROVIDER_CLOSE)( (CALLBACK *PFN_CRYPT_XML_DATA_PROVIDER_CLOSE)(
__inout void *pvCallbackState _Inout_ void *pvCallbackState
); );
/**************************************************************************** /****************************************************************************
CRYPT_XML_DATA_PROVIDER CRYPT_XML_DATA_PROVIDER
pvCallbackState pvCallbackState
[in] An application defined argument to be passed to [in] An application defined argument to be passed to
the pfnRead and pfnClose callbacks. the pfnRead and pfnClose callbacks.
cbBufferSize cbBufferSize
skipping to change at line 462 skipping to change at line 474
[out] Address of the variable that receives a pointer to [out] Address of the variable that receives a pointer to
the transform's data provider. the transform's data provider.
NOTE: In the transform chain, the output of the trasnform is the input of the n ext one. NOTE: In the transform chain, the output of the trasnform is the input of the n ext one.
The pProviderOut implementation is responsible to call pProviderIn->pfnClose The pProviderOut implementation is responsible to call pProviderIn->pfnClose
to relase the input provider. Usually it's implemented in its own pfnClose. to relase the input provider. Usually it's implemented in its own pfnClose.
****************************************************************************/ ****************************************************************************/
typedef typedef
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
(CALLBACK *PFN_CRYPT_XML_CREATE_TRANSFORM)( (CALLBACK *PFN_CRYPT_XML_CREATE_TRANSFORM)(
__in const CRYPT_XML_ALGORITHM *pTransform, _In_ const CRYPT_XML_ALGORITHM *pTransform,
__in CRYPT_XML_DATA_PROVIDER *pProviderIn, _In_ CRYPT_XML_DATA_PROVIDER *pProviderIn,
__out CRYPT_XML_DATA_PROVIDER *pProviderOut _Out_ CRYPT_XML_DATA_PROVIDER *pProviderOut
); );
/**************************************************************************** /****************************************************************************
CRYPT_XML_STATUS CRYPT_XML_STATUS
Structure contains information about signature validation status, Structure contains information about signature validation status,
summary status information about a SignedInfo, or summary information summary status information about a SignedInfo, or summary information
status about an array of Reference. status about an array of Reference.
cbSize cbSize
skipping to change at line 662 skipping to change at line 674
cTransformInfo cTransformInfo
Count of elements in rgTransformInfo. Count of elements in rgTransformInfo.
rgTransformInfo rgTransformInfo
Array of PCRYPT_XML_TRANSFORM_INFO Array of PCRYPT_XML_TRANSFORM_INFO
****************************************************************************/ ****************************************************************************/
typedef struct _CRYPT_XML_TRANSFORM_CHAIN_CONFIG{ typedef struct _CRYPT_XML_TRANSFORM_CHAIN_CONFIG{
ULONG cbSize; ULONG cbSize;
ULONG cTransformInfo; ULONG cTransformInfo;
__field_ecount(cTransformInfo) _Field_size_(cTransformInfo)
PCRYPT_XML_TRANSFORM_INFO *rgpTransformInfo; PCRYPT_XML_TRANSFORM_INFO *rgpTransformInfo;
} CRYPT_XML_TRANSFORM_CHAIN_CONFIG, *PCRYPT_XML_TRANSFORM_CHAIN_CONFIG; } CRYPT_XML_TRANSFORM_CHAIN_CONFIG, *PCRYPT_XML_TRANSFORM_CHAIN_CONFIG;
/**************************************************************************** /****************************************************************************
CRYPT_XML_KEY_DSA_KEY_VALUE CRYPT_XML_KEY_DSA_KEY_VALUE
Encapsulates DSA key value. Encapsulates DSA key value.
P P
BLOB containing DSA key P parameter. BLOB containing DSA key P parameter.
skipping to change at line 904 skipping to change at line 916
<element name="X509Certificate" type="base64Binary"/> <element name="X509Certificate" type="base64Binary"/>
<element name="X509CRL" type="base64Binary"/> <element name="X509CRL" type="base64Binary"/>
<any namespace="##other" processContents="lax"/> <any namespace="##other" processContents="lax"/>
</choice> </choice>
</sequence> </sequence>
</complexType> </complexType>
****************************************************************************/ ****************************************************************************/
typedef struct _CRYPT_XML_X509DATA{ typedef struct _CRYPT_XML_X509DATA{
UINT cX509Data; UINT cX509Data;
__field_ecount(cX509Data) _Field_size_(cX509Data)
CRYPT_XML_X509DATA_ITEM *rgX509Data; CRYPT_XML_X509DATA_ITEM *rgX509Data;
} CRYPT_XML_X509DATA; } CRYPT_XML_X509DATA;
/**************************************************************************** /****************************************************************************
CRYPT_XML_KEY_INFO_ITEM CRYPT_XML_KEY_INFO_ITEM
Represents the KeyInfoType choice in the <KeyInfo> element. Represents the KeyInfoType choice in the <KeyInfo> element.
dwType dwType
Indicates the union variant used for the key info. Indicates the union variant used for the key info.
skipping to change at line 1003 skipping to change at line 1015
<!-- (1,1) elements from (0,unbounded) namespaces --> <!-- (1,1) elements from (0,unbounded) namespaces -->
</choice> </choice>
<attribute name="Id" type="ID" use="optional"/> <attribute name="Id" type="ID" use="optional"/>
</complexType> </complexType>
****************************************************************************/ ****************************************************************************/
typedef struct _CRYPT_XML_KEY_INFO{ typedef struct _CRYPT_XML_KEY_INFO{
ULONG cbSize; ULONG cbSize;
LPCWSTR wszId; LPCWSTR wszId;
UINT cKeyInfo; UINT cKeyInfo;
__field_ecount(cKeyInfo) _Field_size_(cKeyInfo)
CRYPT_XML_KEY_INFO_ITEM *rgKeyInfo; CRYPT_XML_KEY_INFO_ITEM *rgKeyInfo;
BCRYPT_KEY_HANDLE hVerifyKey; // <= A handle, reso lved from the first KeyValue, if any BCRYPT_KEY_HANDLE hVerifyKey; // <= A handle, reso lved from the first KeyValue, if any
}CRYPT_XML_KEY_INFO, *PCRYPT_XML_KEY_INFO; }CRYPT_XML_KEY_INFO, *PCRYPT_XML_KEY_INFO;
/**************************************************************************** /****************************************************************************
CRYPT_XML_REFERENCE CRYPT_XML_REFERENCE
cbSize cbSize
Size of this structure. Size of this structure.
skipping to change at line 1049 skipping to change at line 1061
****************************************************************************/ ****************************************************************************/
typedef struct _CRYPT_XML_REFERENCE{ typedef struct _CRYPT_XML_REFERENCE{
ULONG cbSize; ULONG cbSize;
HCRYPTXML hReference; HCRYPTXML hReference;
LPCWSTR wszId; LPCWSTR wszId;
LPCWSTR wszUri; LPCWSTR wszUri;
LPCWSTR wszType; LPCWSTR wszType;
CRYPT_XML_ALGORITHM DigestMethod; CRYPT_XML_ALGORITHM DigestMethod;
CRYPT_DATA_BLOB DigestValue; CRYPT_DATA_BLOB DigestValue;
ULONG cTransform; ULONG cTransform;
__field_ecount(cTransform) _Field_size_(cTransform)
CRYPT_XML_ALGORITHM *rgTransform; CRYPT_XML_ALGORITHM *rgTransform;
}CRYPT_XML_REFERENCE, *PCRYPT_XML_REFERENCE; }CRYPT_XML_REFERENCE, *PCRYPT_XML_REFERENCE;
/**************************************************************************** /****************************************************************************
CRYPT_XML_REFERENCES CRYPT_XML_REFERENCES
****************************************************************************/ ****************************************************************************/
typedef struct _CRYPT_XML_REFERENCES{ typedef struct _CRYPT_XML_REFERENCES{
ULONG cReference; ULONG cReference;
__field_ecount(cReference) _Field_size_(cReference)
PCRYPT_XML_REFERENCE *rgpReference; PCRYPT_XML_REFERENCE *rgpReference;
}CRYPT_XML_REFERENCES, *PCRYPT_XML_REFERENCES; }CRYPT_XML_REFERENCES, *PCRYPT_XML_REFERENCES;
/**************************************************************************** /****************************************************************************
CRYPT_XML_SIGNED_INFO CRYPT_XML_SIGNED_INFO
cbSize cbSize
Size of this structure. Size of this structure.
wszId wszId
skipping to change at line 1094 skipping to change at line 1106
Encoded Encoded
Contains canonicalized <SignedInfo> element. Contains canonicalized <SignedInfo> element.
****************************************************************************/ ****************************************************************************/
typedef struct _CRYPT_XML_SIGNED_INFO{ typedef struct _CRYPT_XML_SIGNED_INFO{
ULONG cbSize; ULONG cbSize;
LPCWSTR wszId; LPCWSTR wszId;
CRYPT_XML_ALGORITHM Canonicalization; CRYPT_XML_ALGORITHM Canonicalization;
CRYPT_XML_ALGORITHM SignatureMethod; CRYPT_XML_ALGORITHM SignatureMethod;
ULONG cReference; ULONG cReference;
__field_ecount(cReference) _Field_size_(cReference)
PCRYPT_XML_REFERENCE *rgpReference; PCRYPT_XML_REFERENCE *rgpReference;
CRYPT_XML_BLOB Encoded; CRYPT_XML_BLOB Encoded;
}CRYPT_XML_SIGNED_INFO, *PCRYPT_XML_SIGNED_INFO; }CRYPT_XML_SIGNED_INFO, *PCRYPT_XML_SIGNED_INFO;
/**************************************************************************** /****************************************************************************
CRYPT_XML_OBJECT CRYPT_XML_OBJECT
cbSize cbSize
Size of this structure. Size of this structure.
skipping to change at line 1201 skipping to change at line 1213
****************************************************************************/ ****************************************************************************/
typedef struct _CRYPT_XML_SIGNATURE{ typedef struct _CRYPT_XML_SIGNATURE{
ULONG cbSize; ULONG cbSize;
HCRYPTXML hSignature; HCRYPTXML hSignature;
LPCWSTR wszId; LPCWSTR wszId;
CRYPT_XML_SIGNED_INFO SignedInfo; CRYPT_XML_SIGNED_INFO SignedInfo;
CRYPT_DATA_BLOB SignatureValue; CRYPT_DATA_BLOB SignatureValue;
CRYPT_XML_KEY_INFO *pKeyInfo; // OPTIONAL CRYPT_XML_KEY_INFO *pKeyInfo; // OPTIONAL
ULONG cObject; ULONG cObject;
__field_ecount(cObject) _Field_size_(cObject)
PCRYPT_XML_OBJECT *rgpObject; // OPTIONAL PCRYPT_XML_OBJECT *rgpObject; // OPTIONAL
}CRYPT_XML_SIGNATURE, *PCRYPT_XML_SIGNATURE; }CRYPT_XML_SIGNATURE, *PCRYPT_XML_SIGNATURE;
/**************************************************************************** /****************************************************************************
CRYPT_XML_DOC_CTXT CRYPT_XML_DOC_CTXT
cbSize cbSize
Size of this structure. Size of this structure.
hDocCtxt hDocCtxt
skipping to change at line 1229 skipping to change at line 1241
pEncoded pEncoded
Contains XML document. Contains XML document.
****************************************************************************/ ****************************************************************************/
typedef struct _CRYPT_XML_DOC_CTXT{ typedef struct _CRYPT_XML_DOC_CTXT{
ULONG cbSize; ULONG cbSize;
HCRYPTXML hDocCtxt; HCRYPTXML hDocCtxt;
CRYPT_XML_TRANSFORM_CHAIN_CONFIG *pTransformsConfig; CRYPT_XML_TRANSFORM_CHAIN_CONFIG *pTransformsConfig;
ULONG cSignature; ULONG cSignature;
__field_ecount(cSignature) _Field_size_(cSignature)
PCRYPT_XML_SIGNATURE *rgpSignature; PCRYPT_XML_SIGNATURE *rgpSignature;
}CRYPT_XML_DOC_CTXT, *PCRYPT_XML_DOC_CTXT; }CRYPT_XML_DOC_CTXT, *PCRYPT_XML_DOC_CTXT;
/**************************************************************************** /****************************************************************************
CryptXmlClose CryptXmlClose
The CryptXmlClose function closes a cryptographic XML object handle. The CryptXmlClose function closes a cryptographic XML object handle.
At each call to this function, the reference count on the handle At each call to this function, the reference count on the handle
is reduced by one. When the reference count reaches zero, an object is reduced by one. When the reference count reaches zero, an object
encapsulated by the handle is fully released. encapsulated by the handle is fully released.
****************************************************************************/ ****************************************************************************/
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
WINAPI WINAPI
CryptXmlClose( CryptXmlClose(
__in HCRYPTXML hCryptXml _In_ HCRYPTXML hCryptXml
); );
/**************************************************************************** /****************************************************************************
CryptXmlGetTransforms CryptXmlGetTransforms
The CryptXmlGetTransforms function returns information on The CryptXmlGetTransforms function returns information on
default Transform Chain Engine. default Transform Chain Engine.
****************************************************************************/ ****************************************************************************/
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
WINAPI WINAPI
CryptXmlGetTransforms( CryptXmlGetTransforms(
__deref_out const CRYPT_XML_TRANSFORM_CHAIN_CONFIG **ppConfig _Outptr_ const CRYPT_XML_TRANSFORM_CHAIN_CONFIG **ppConfig
); );
/**************************************************************************** /****************************************************************************
CryptXmlOpenToEncode CryptXmlOpenToEncode
The CryptXmlOpenToEndoce function opens an XML digital signature to encode The CryptXmlOpenToEndoce function opens an XML digital signature to encode
and returns a handle of the opened signature object. and returns a handle of the opened signature object.
The handle encapsulates a Document Context with single Signature object and The handle encapsulates a Document Context with single Signature object and
remains open until CryptXmlClose is called. remains open until CryptXmlClose is called.
skipping to change at line 1296 skipping to change at line 1308
rgProperty rgProperty
[in, optional] Specifies additional properties. [in, optional] Specifies additional properties.
This pointer must be valid until CryptXmlClose is This pointer must be valid until CryptXmlClose is
called on the document context. called on the document context.
phSignature phSignature
[out] Handle to the Signature object. [out] Handle to the Signature object.
****************************************************************************/ ****************************************************************************/
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
WINAPI WINAPI
CryptXmlOpenToEncode( CryptXmlOpenToEncode(
__in_opt const CRYPT_XML_TRANSFORM_CHAIN_CONFIG *pConfig, _In_opt_ const CRYPT_XML_TRANSFORM_CHAIN_CONFIG *pConfig,
DWORD dwFlags, DWORD dwFlags,
__in_opt LPCWSTR wszId, _In_opt_ LPCWSTR wszId,
__in_ecount_opt(cProperty) _In_reads_opt_(cProperty)
const CRYPT_XML_PROPERTY* rgProperty, const CRYPT_XML_PROPERTY* rgProperty,
__in ULONG cProperty, _In_ ULONG cProperty,
__in_opt const CRYPT_XML_BLOB *pEncoded, _In_opt_ const CRYPT_XML_BLOB *pEncoded,
__deref_out HCRYPTXML *phSignature _Outptr_ HCRYPTXML *phSignature
); );
/**************************************************************************** /****************************************************************************
CryptXmlOpenToDecode CryptXmlOpenToDecode
The CryptXmlOpenToDecode function opens an XML digital signature to decode The CryptXmlOpenToDecode function opens an XML digital signature to decode
and returns a handle of the Document Context that encapsulates Signatures and returns a handle of the Document Context that encapsulates Signatures
object. The handle remains open until CryptXmlClose is called. object. The handle remains open until CryptXmlClose is called.
The Document Context may include one or more Signature objects. The Document Context may include one or more Signature objects.
skipping to change at line 1338 skipping to change at line 1350
CRYPT_XML_FLAG_ALWAYS_RETURN_ENCODED_OBJECT CRYPT_XML_FLAG_ALWAYS_RETURN_ENCODED_OBJECT
CRYPT_XML_FLAG_ENFORCE_ID_NCNAME_FORMAT | CRYPT_XML_FLAG_ENFORCE_ID_NAME _FORMAT CRYPT_XML_FLAG_ENFORCE_ID_NCNAME_FORMAT | CRYPT_XML_FLAG_ENFORCE_ID_NAME _FORMAT
rgProperty rgProperty
[in, optional] Specifies additional properties. [in, optional] Specifies additional properties.
phCryptXml phCryptXml
[out] Handle to the Document Context object. [out] Handle to the Document Context object.
****************************************************************************/ ****************************************************************************/
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
WINAPI WINAPI
CryptXmlOpenToDecode( CryptXmlOpenToDecode(
__in_opt const CRYPT_XML_TRANSFORM_CHAIN_CONFIG *pConfig, _In_opt_ const CRYPT_XML_TRANSFORM_CHAIN_CONFIG *pConfig,
DWORD dwFlags, DWORD dwFlags,
__in_ecount_opt(cProperty) _In_reads_opt_(cProperty)
const CRYPT_XML_PROPERTY* rgProperty, const CRYPT_XML_PROPERTY* rgProperty,
__in ULONG cProperty, _In_ ULONG cProperty,
__in const CRYPT_XML_BLOB *pEncoded, _In_ const CRYPT_XML_BLOB *pEncoded,
__deref_out HCRYPTXML *phCryptXml _Outptr_ HCRYPTXML *phCryptXml
); );
/**************************************************************************** /****************************************************************************
CryptXmlAddObject CryptXmlAddObject
The CryptXmlAddObject function adds the <Object> element to Signature in The CryptXmlAddObject function adds the <Object> element to Signature in
the Document Context opened to encode. the Document Context opened to encode.
See Remarks. See Remarks.
hSignatureOrObject hSignatureOrObject
skipping to change at line 1388 skipping to change at line 1400
This parameter must be NULL when hSignatureOrObject is a handle to the Objec t. This parameter must be NULL when hSignatureOrObject is a handle to the Objec t.
REMARKS: REMARKS:
When the hSignatureOrObject specifies a handle to a Reference returned When the hSignatureOrObject specifies a handle to a Reference returned
by CryptXmlCreateReference, then pEncoded specifies XML content to be includ ed by CryptXmlCreateReference, then pEncoded specifies XML content to be includ ed
inside the <Object> node after the optional <Manifest> element. inside the <Object> node after the optional <Manifest> element.
The pEncoded pointer must be valid till the signature is complete. The pEncoded pointer must be valid till the signature is complete.
Otherwise, use CRYPT_XML_FLAG_ADD_OBJECT_CREATE_COPY flag to create in-memor y copy. Otherwise, use CRYPT_XML_FLAG_ADD_OBJECT_CREATE_COPY flag to create in-memor y copy.
****************************************************************************/ ****************************************************************************/
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
WINAPI WINAPI
CryptXmlAddObject( CryptXmlAddObject(
__in HCRYPTXML hSignatureOrObject, _In_ HCRYPTXML hSignatureOrObject,
DWORD dwFlags, DWORD dwFlags,
__in_ecount_opt(cProperty) _In_reads_opt_(cProperty)
const CRYPT_XML_PROPERTY* rgProperty, const CRYPT_XML_PROPERTY* rgProperty,
__in ULONG cProperty, _In_ ULONG cProperty,
__in const CRYPT_XML_BLOB *pEncoded, _In_ const CRYPT_XML_BLOB *pEncoded,
__deref_out_opt const CRYPT_XML_OBJECT **ppObject _Outptr_result_maybenull_ const CRYPT_XML_OBJECT **ppObject
); );
// Used to create in-memory copy of XML part to be included in the <Object> // Used to create in-memory copy of XML part to be included in the <Object>
#define CRYPT_XML_FLAG_ADD_OBJECT_CREATE_COPY 0x00000001 #define CRYPT_XML_FLAG_ADD_OBJECT_CREATE_COPY 0x00000001
/**************************************************************************** /****************************************************************************
CryptXmlCreateReference CryptXmlCreateReference
hCryptXml hCryptXml
[in] Handle of the XML signature. [in] Handle of the XML signature.
skipping to change at line 1443 skipping to change at line 1455
[in] Number of elements in rgTransform array. [in] Number of elements in rgTransform array.
rgTransform rgTransform
[in, optional] Ordered array of transform algorithms to be applied to [in, optional] Ordered array of transform algorithms to be applied to
the reference data before digest calculation. the reference data before digest calculation.
phReference phReference
[out] Pointer to a Reference Handle. [out] Pointer to a Reference Handle.
****************************************************************************/ ****************************************************************************/
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
WINAPI WINAPI
CryptXmlCreateReference( CryptXmlCreateReference(
__in HCRYPTXML hCryptXml, _In_ HCRYPTXML hCryptXml,
DWORD dwFlags, DWORD dwFlags,
__in_opt LPCWSTR wszId, _In_opt_ LPCWSTR wszId,
__in_opt LPCWSTR wszURI, _In_opt_ LPCWSTR wszURI,
__in_opt LPCWSTR wszType, _In_opt_ LPCWSTR wszType,
__in const CRYPT_XML_ALGORITHM *pDigestMethod, _In_ const CRYPT_XML_ALGORITHM *pDigestMethod,
ULONG cTransform, ULONG cTransform,
__in_ecount_opt(cTransform) _In_reads_opt_(cTransform)
const CRYPT_XML_ALGORITHM *rgTransform, const CRYPT_XML_ALGORITHM *rgTransform,
__deref_out HCRYPTXML *phReference _Outptr_ HCRYPTXML *phReference
); );
// When this flag is set an Object will be created and added to the Signature, // When this flag is set an Object will be created and added to the Signature,
// and a Reference to the Object will be created in SignedInfo. // and a Reference to the Object will be created in SignedInfo.
// The returned handle is encapsulated Object and can be used // The returned handle is encapsulated Object and can be used
// in subsequent calls to CryptXmlCreateReference to create references in // in subsequent calls to CryptXmlCreateReference to create references in
// Manifest. // Manifest.
#define CRYPT_XML_FLAG_CREATE_REFERENCE_AS_OBJECT 0x00000001 #define CRYPT_XML_FLAG_CREATE_REFERENCE_AS_OBJECT 0x00000001
skipping to change at line 1492 skipping to change at line 1504
Remarks: Remarks:
When CRYPT CRYPT_XML_DIGEST_REFERENCE_DATA_TRANSFORMED flag is set, When CRYPT CRYPT_XML_DIGEST_REFERENCE_DATA_TRANSFORMED flag is set,
the processing engine directly digests received data without the processing engine directly digests received data without
applying the transform chain engine. applying the transform chain engine.
The CryptXmlDigestReference function always calls pDataProviderIn->fpnClose. The CryptXmlDigestReference function always calls pDataProviderIn->fpnClose.
****************************************************************************/ ****************************************************************************/
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
WINAPI WINAPI
CryptXmlDigestReference( CryptXmlDigestReference(
__in HCRYPTXML hReference, _In_ HCRYPTXML hReference,
DWORD dwFlags, DWORD dwFlags,
__in CRYPT_XML_DATA_PROVIDER *pDataProviderIn _In_ CRYPT_XML_DATA_PROVIDER *pDataProviderIn
); );
// Specifies that the processing engine creates the digest // Specifies that the processing engine creates the digest
// without applying the transform chain engine. // without applying the transform chain engine.
#define CRYPT_XML_DIGEST_REFERENCE_DATA_TRANSFORMED 0x00000001 #define CRYPT_XML_DIGEST_REFERENCE_DATA_TRANSFORMED 0x00000001
/**************************************************************************** /****************************************************************************
CryptXmlSetHMACSecret CryptXmlSetHMACSecret
The CryptXmlSetHMACSecret function set HMAC secret on the handle before The CryptXmlSetHMACSecret function set HMAC secret on the handle before
skipping to change at line 1525 skipping to change at line 1537
[in] Pointer to a block of bytes. [in] Pointer to a block of bytes.
The pointer must be valid during calls to CryptXmlSign or CryptXmlVerify. The pointer must be valid during calls to CryptXmlSign or CryptXmlVerify.
cbSecret cbSecret
Size, in bytes, of the block of data at pbSecret. Size, in bytes, of the block of data at pbSecret.
NOTE: When using HMAC, the key handles passed to CryptXmlSign or CryptXmlVerify NOTE: When using HMAC, the key handles passed to CryptXmlSign or CryptXmlVerify
must be NULL. must be NULL.
****************************************************************************/ ****************************************************************************/
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
WINAPI WINAPI
CryptXmlSetHMACSecret( CryptXmlSetHMACSecret(
__in HCRYPTXML hSignature, _In_ HCRYPTXML hSignature,
__in_bcount( cbSecret ) _In_reads_bytes_( cbSecret )
const BYTE *pbSecret, const BYTE *pbSecret,
ULONG cbSecret ULONG cbSecret
); );
/**************************************************************************** /****************************************************************************
CRYPT_XML_KEYINFO_PARAMS CRYPT_XML_KEYINFO_PARAMS
This structure is passed to CryptXmlSign specifying This structure is passed to CryptXmlSign specifying
the members of <KeyInfo> element to be encoded. the members of <KeyInfo> element to be encoded.
skipping to change at line 1573 skipping to change at line 1585
Specifies array of CERT_BLOB to populate <X509CRL> elements Specifies array of CERT_BLOB to populate <X509CRL> elements
****************************************************************************/ ****************************************************************************/
typedef struct _CRYPT_XML_KEYINFO_PARAM typedef struct _CRYPT_XML_KEYINFO_PARAM
{ {
LPCWSTR wszId; LPCWSTR wszId;
LPCWSTR wszKeyName; LPCWSTR wszKeyName;
CERT_BLOB SKI; CERT_BLOB SKI;
LPCWSTR wszSubjectName; LPCWSTR wszSubjectName;
ULONG cCertificate; ULONG cCertificate;
__field_ecount(cCertificate) _Field_size_(cCertificate)
CERT_BLOB *rgCertificate; CERT_BLOB *rgCertificate;
ULONG cCRL; ULONG cCRL;
__field_ecount(cCRL) _Field_size_(cCRL)
CERT_BLOB *rgCRL; CERT_BLOB *rgCRL;
}CRYPT_XML_KEYINFO_PARAM; }CRYPT_XML_KEYINFO_PARAM;
/**************************************************************************** /****************************************************************************
CRYPT_XML_KEYINFO_SPEC CRYPT_XML_KEYINFO_SPEC
****************************************************************************/ ****************************************************************************/
typedef enum typedef enum
{ {
CRYPT_XML_KEYINFO_SPEC_NONE = 0, // No KeyInfo CRYPT_XML_KEYINFO_SPEC_NONE = 0, // No KeyInfo
skipping to change at line 1636 skipping to change at line 1648
CRYPT_XML_KEYINFO_SPEC_ENCODED CRYPT_XML_BLOB* CRYPT_XML_KEYINFO_SPEC_ENCODED CRYPT_XML_BLOB*
CRYPT_XML_KEYINFO_SPEC_PARAM CRYPT_XML_KEYINFO_PARAM* CRYPT_XML_KEYINFO_SPEC_PARAM CRYPT_XML_KEYINFO_PARAM*
pSignatureMethod pSignatureMethod
[in] Specifies the signature method. [in] Specifies the signature method.
pCanonicalization pCanonicalization
[in] Specifies the canonicalization method. [in] Specifies the canonicalization method.
****************************************************************************/ ****************************************************************************/
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
WINAPI WINAPI
CryptXmlSign( CryptXmlSign(
__in HCRYPTXML hSignature, _In_ HCRYPTXML hSignature,
__in_opt HCRYPTPROV_OR_NCRYPT_KEY_HANDLE hKey, _In_opt_ HCRYPTPROV_OR_NCRYPT_KEY_HANDLE hKey,
DWORD dwKeySpec, DWORD dwKeySpec,
DWORD dwFlags, DWORD dwFlags,
CRYPT_XML_KEYINFO_SPEC dwKeyInfoSpec, CRYPT_XML_KEYINFO_SPEC dwKeyInfoSpec,
__in_opt const void *pvKeyInfoSpec, _In_opt_ const void *pvKeyInfoSpec,
__in const CRYPT_XML_ALGORITHM *pSignatureMethod, _In_ const CRYPT_XML_ALGORITHM *pSignatureMethod,
__in const CRYPT_XML_ALGORITHM *pCanonicalization _In_ const CRYPT_XML_ALGORITHM *pCanonicalization
); );
// Specify this flag to populate <KeyValue> element from // Specify this flag to populate <KeyValue> element from
// the hKey handle. // the hKey handle.
// NOTE: This flag can not be used when dwKeyInfoSpec is // NOTE: This flag can not be used when dwKeyInfoSpec is
// set to CRYPT_XML_KEYINFO_SPEC_ENCODED // set to CRYPT_XML_KEYINFO_SPEC_ENCODED
#define CRYPT_XML_SIGN_ADD_KEYVALUE 0x00000001 #define CRYPT_XML_SIGN_ADD_KEYVALUE 0x00000001
/**************************************************************************** /****************************************************************************
CryptXmlImportPublicKey CryptXmlImportPublicKey
skipping to change at line 1670 skipping to change at line 1682
The following flags are supported: The following flags are supported:
CRYPT_XML_FLAG_DISABLE_EXTENSIONS CRYPT_XML_FLAG_DISABLE_EXTENSIONS
pKeyValue pKeyValue
CRYPT_XML_KEY_VALUE to be imported. CRYPT_XML_KEY_VALUE to be imported.
phKey phKey
[out] Pointer to BCRYPT_KEY_HANDLE that receives imported key handle. [out] Pointer to BCRYPT_KEY_HANDLE that receives imported key handle.
****************************************************************************/ ****************************************************************************/
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
WINAPI WINAPI
CryptXmlImportPublicKey( CryptXmlImportPublicKey(
DWORD dwFlags, DWORD dwFlags,
__in const CRYPT_XML_KEY_VALUE *pKeyValue, _In_ const CRYPT_XML_KEY_VALUE *pKeyValue,
__out BCRYPT_KEY_HANDLE *phKey _Out_ BCRYPT_KEY_HANDLE *phKey
); );
/**************************************************************************** /****************************************************************************
CryptXmlVerifySignature CryptXmlVerifySignature
The CryptXmlVerifySignature function performs a cryptographic signature The CryptXmlVerifySignature function performs a cryptographic signature
validation over SignedInfo element in a document context opened for decode. validation over SignedInfo element in a document context opened for decode.
hSignature hSignature
[in] Handle to Signature. [in] Handle to Signature.
hKey hKey
[in] Handle to a Public Key to verify the signature value on [in] Handle to a Public Key to verify the signature value on
the SignedInfo element. the SignedInfo element.
This parameter must be NULL for HMAC-based signature algorithms. This parameter must be NULL for HMAC-based signature algorithms.
dwFlags dwFlags
[in] The following flags are supported: [in] The following flags are supported:
CRYPT_XML_FLAG_DISABLE_EXTENSIONS CRYPT_XML_FLAG_DISABLE_EXTENSIONS
****************************************************************************/ ****************************************************************************/
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
WINAPI WINAPI
CryptXmlVerifySignature( CryptXmlVerifySignature(
__in HCRYPTXML hSignature, _In_ HCRYPTXML hSignature,
__in_opt BCRYPT_KEY_HANDLE hKey, _In_opt_ BCRYPT_KEY_HANDLE hKey,
DWORD dwFlags DWORD dwFlags
); );
/**************************************************************************** /****************************************************************************
CryptXmlGetDocContext CryptXmlGetDocContext
The CryptXmlGetDocContext function returns data structure encapsulated by The CryptXmlGetDocContext function returns data structure encapsulated by
a handle to Document Context. a handle to Document Context.
****************************************************************************/ ****************************************************************************/
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
WINAPI WINAPI
CryptXmlGetDocContext( CryptXmlGetDocContext(
__in HCRYPTXML hCryptXml, _In_ HCRYPTXML hCryptXml,
__deref_out const CRYPT_XML_DOC_CTXT **ppStruct _Outptr_ const CRYPT_XML_DOC_CTXT **ppStruct
); );
/**************************************************************************** /****************************************************************************
CryptXmlGetSignature CryptXmlGetSignature
The CryptXmlGetSignature function returns data structure encapsulated The CryptXmlGetSignature function returns data structure encapsulated
by a handle to Signature. by a handle to Signature.
****************************************************************************/ ****************************************************************************/
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
WINAPI WINAPI
CryptXmlGetSignature( CryptXmlGetSignature(
__in HCRYPTXML hCryptXml, _In_ HCRYPTXML hCryptXml,
__deref_out const CRYPT_XML_SIGNATURE **ppStruct _Outptr_ const CRYPT_XML_SIGNATURE **ppStruct
); );
/**************************************************************************** /****************************************************************************
CryptXmlGetReference CryptXmlGetReference
The CryptXmlGetReference function returns data structure encapsulated The CryptXmlGetReference function returns data structure encapsulated
by a handle to Reference. by a handle to Reference.
****************************************************************************/ ****************************************************************************/
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
WINAPI WINAPI
CryptXmlGetReference( CryptXmlGetReference(
__in HCRYPTXML hCryptXml, _In_ HCRYPTXML hCryptXml,
__deref_out const CRYPT_XML_REFERENCE **ppStruct _Outptr_ const CRYPT_XML_REFERENCE **ppStruct
); );
/**************************************************************************** /****************************************************************************
CryptXmlGetStatus CryptXmlGetStatus
The CryptXmlGetStatus function returns a CRYPT_XML_STATUS for array The CryptXmlGetStatus function returns a CRYPT_XML_STATUS for array
of Signature, single Signature, Reference or Manifest. of Signature, single Signature, Reference or Manifest.
****************************************************************************/ ****************************************************************************/
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
WINAPI WINAPI
CryptXmlGetStatus( CryptXmlGetStatus(
__in HCRYPTXML hCryptXml, _In_ HCRYPTXML hCryptXml,
__out CRYPT_XML_STATUS *pStatus _Out_ CRYPT_XML_STATUS *pStatus
); );
/**************************************************************************** /****************************************************************************
CryptXmlEncode CryptXmlEncode
The CryptXmlEncode function constructs XML document using the XML writer The CryptXmlEncode function constructs XML document using the XML writer
callback that allows applications to stream XML being constructed. callback that allows applications to stream XML being constructed.
hCryptXml hCryptXml
[in] Specifies the handle of an object to be serialized. [in] Specifies the handle of an object to be serialized.
skipping to change at line 1788 skipping to change at line 1800
cProperty cProperty
[in] Specifies number of elements in the rgProperty array. [in] Specifies number of elements in the rgProperty array.
pvCallbackState pvCallbackState
[in] An application-defined argument to be passed to the callback. [in] An application-defined argument to be passed to the callback.
pfnWrite pfnWrite
[in, callback] An application-defined callback to receive constructed XML. [in, callback] An application-defined callback to receive constructed XML.
****************************************************************************/ ****************************************************************************/
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
WINAPI WINAPI
CryptXmlEncode( CryptXmlEncode(
__in HCRYPTXML hCryptXml, _In_ HCRYPTXML hCryptXml,
CRYPT_XML_CHARSET dwCharset, CRYPT_XML_CHARSET dwCharset,
__in_ecount_opt(cProperty) _In_reads_opt_(cProperty)
const CRYPT_XML_PROPERTY* rgProperty, const CRYPT_XML_PROPERTY* rgProperty,
__in ULONG cProperty, _In_ ULONG cProperty,
__inout void *pvCallbackState, _Inout_ void *pvCallbackState,
__in PFN_CRYPT_XML_WRITE_CALLBACK pfnWrite _In_ PFN_CRYPT_XML_WRITE_CALLBACK pfnWrite
); );
/**************************************************************************** /****************************************************************************
CRYPT_XML_ALGORITHM_INFO CRYPT_XML_ALGORITHM_INFO
cbSize cbSize
The size, in bytes, of this structure. The size, in bytes, of this structure.
wszAlgorithmURI wszAlgorithmURI
The URI associated with attribute of the SignatureMethod or DigestMethod elements The URI associated with attribute of the SignatureMethod or DigestMethod elements
skipping to change at line 1874 skipping to change at line 1886
CryptXmlGetAlgorithmInfo CryptXmlGetAlgorithmInfo
Decodes the XML Algorithm and returns information about the algorithm. Decodes the XML Algorithm and returns information about the algorithm.
The following flags are supported: The following flags are supported:
CRYPT_XML_FLAG_DISABLE_EXTENSIONS CRYPT_XML_FLAG_DISABLE_EXTENSIONS
The caller must free ppAlgInfo by calling LocalFree() The caller must free ppAlgInfo by calling LocalFree()
****************************************************************************/ ****************************************************************************/
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
WINAPI WINAPI
CryptXmlGetAlgorithmInfo( CryptXmlGetAlgorithmInfo(
__in const CRYPT_XML_ALGORITHM *pXmlAlgorithm, _In_ const CRYPT_XML_ALGORITHM *pXmlAlgorithm,
DWORD dwFlags, DWORD dwFlags,
__deref_out CRYPT_XML_ALGORITHM_INFO **ppAlgInfo _Outptr_ CRYPT_XML_ALGORITHM_INFO **ppAlgInfo
); );
/**************************************************************************** /****************************************************************************
CryptXmlFindAlgorithmInfo CryptXmlFindAlgorithmInfo
dwFindByType dwFindByType
[in] Specifies the pvFindBy parameter type. [in] Specifies the pvFindBy parameter type.
The following values are supported: The following values are supported:
CRYPT_XML_ALGORITHM_INFO_FIND_BY_URI - wszAlgorithmUR I CRYPT_XML_ALGORITHM_INFO_FIND_BY_URI - wszAlgorithmUR I
CRYPT_XML_ALGORITHM_INFO_FIND_BY_NAME - wszName CRYPT_XML_ALGORITHM_INFO_FIND_BY_NAME - wszName
skipping to change at line 1913 skipping to change at line 1925
[in] The following flags are supported: [in] The following flags are supported:
CRYPT_XML_FLAG_DISABLE_EXTENSIONS CRYPT_XML_FLAG_DISABLE_EXTENSIONS
ppAlgInfo ppAlgInfo
[out] Pointer to CRYPT_XML_ALGORITHM_INFO pointer. [out] Pointer to CRYPT_XML_ALGORITHM_INFO pointer.
****************************************************************************/ ****************************************************************************/
const CRYPT_XML_ALGORITHM_INFO* const CRYPT_XML_ALGORITHM_INFO*
WINAPI WINAPI
CryptXmlFindAlgorithmInfo( CryptXmlFindAlgorithmInfo(
__in DWORD dwFindByType, _In_ DWORD dwFindByType,
__in const void *pvFindBy, _In_ const void *pvFindBy,
__in DWORD dwGroupId, _In_ DWORD dwGroupId,
DWORD dwFlags DWORD dwFlags
); );
#define CRYPT_XML_ALGORITHM_INFO_FIND_BY_URI 1 #define CRYPT_XML_ALGORITHM_INFO_FIND_BY_URI 1
#define CRYPT_XML_ALGORITHM_INFO_FIND_BY_NAME 2 #define CRYPT_XML_ALGORITHM_INFO_FIND_BY_NAME 2
#define CRYPT_XML_ALGORITHM_INFO_FIND_BY_CNG_ALGID 3 #define CRYPT_XML_ALGORITHM_INFO_FIND_BY_CNG_ALGID 3
#define CRYPT_XML_ALGORITHM_INFO_FIND_BY_CNG_SIGN_ALGID 4 #define CRYPT_XML_ALGORITHM_INFO_FIND_BY_CNG_SIGN_ALGID 4
/**************************************************************************** /****************************************************************************
CryptXmlEnumAlgorithmInfo CryptXmlEnumAlgorithmInfo
skipping to change at line 1957 skipping to change at line 1969
[callback] Address of the callback function that will be called [callback] Address of the callback function that will be called
for each Algorithm found. for each Algorithm found.
****************************************************************************/ ****************************************************************************/
// //
// If the callback returns FALSE, then stop the enumeration. // If the callback returns FALSE, then stop the enumeration.
// //
typedef BOOL (WINAPI * PFN_CRYPT_XML_ENUM_ALG_INFO)( typedef BOOL (WINAPI * PFN_CRYPT_XML_ENUM_ALG_INFO)(
__in const CRYPT_XML_ALGORITHM_INFO *pInfo, _In_ const CRYPT_XML_ALGORITHM_INFO *pInfo,
__inout_opt void *pvArg _Inout_opt_ void *pvArg
); );
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
WINAPI WINAPI
CryptXmlEnumAlgorithmInfo( CryptXmlEnumAlgorithmInfo(
__in DWORD dwGroupId, _In_ DWORD dwGroupId,
__in DWORD dwFlags, _In_ DWORD dwFlags,
__inout_opt void *pvArg, _Inout_opt_ void *pvArg,
__callback PFN_CRYPT_XML_ENUM_ALG_INFO pfnEnumAlgInfo __callback PFN_CRYPT_XML_ENUM_ALG_INFO pfnEnumAlgInfo
); );
/**************************************************************************** /****************************************************************************
* CRYPTO EXTENSIBILITY * CRYPTO EXTENSIBILITY
* *
***************************************************************************/ ***************************************************************************/
/**************************************************************************** /****************************************************************************
CryptXmlGetInterface CryptXmlGetInterface
skipping to change at line 1994 skipping to change at line 2006
pMethod pMethod
[in] A pointer to a CRYPT_XML_ALGORITHM_INFO structure [in] A pointer to a CRYPT_XML_ALGORITHM_INFO structure
to retrieve the interface of. to retrieve the interface of.
pInterface pInterface
[out] A pointer to a CRYPT_XML_ALGORITHM_INFO structure [out] A pointer to a CRYPT_XML_ALGORITHM_INFO structure
to receive the interface information. to receive the interface information.
****************************************************************************/ ****************************************************************************/
typedef typedef
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
(WINAPI *CryptXmlDllGetInterface)( (WINAPI *CryptXmlDllGetInterface)(
DWORD dwFlags, DWORD dwFlags,
__in const CRYPT_XML_ALGORITHM_INFO *pMethod, _In_ const CRYPT_XML_ALGORITHM_INFO *pMethod,
__out CRYPT_XML_CRYPTOGRAPHIC_INTERFACE *pInterface _Out_ CRYPT_XML_CRYPTOGRAPHIC_INTERFACE *pInterface
); );
/**************************************************************************** /****************************************************************************
CryptXmlDllEncodeAlgorithm CryptXmlDllEncodeAlgorithm
The CryptXmlDllEncodeAlgorithm function is used to encode <SignatureMethod> The CryptXmlDllEncodeAlgorithm function is used to encode <SignatureMethod>
or <DigestMethod> elements for agile algorithms with default parameters. or <DigestMethod> elements for agile algorithms with default parameters.
The CryptXmlDllEncodeAlgorithm function is exposed though The CryptXmlDllEncodeAlgorithm function is exposed though
the exported CryptXmlDllGetInterface fucntion. the exported CryptXmlDllGetInterface fucntion.
skipping to change at line 2025 skipping to change at line 2037
pvCallbackState pvCallbackState
[in, out] A poniter to an argument that is passed to the callback [in, out] A poniter to an argument that is passed to the callback
function pointed to by the pfnWrite parameter. function pointed to by the pfnWrite parameter.
pfnWrite pfnWrite
[in] A PFN_CRYPT_XML_WRITE_CALLBACK callback to receive the encoded XML. [in] A PFN_CRYPT_XML_WRITE_CALLBACK callback to receive the encoded XML.
****************************************************************************/ ****************************************************************************/
typedef typedef
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
(WINAPI *CryptXmlDllEncodeAlgorithm)( (WINAPI *CryptXmlDllEncodeAlgorithm)(
__in const CRYPT_XML_ALGORITHM_INFO *pAlgInfo, _In_ const CRYPT_XML_ALGORITHM_INFO *pAlgInfo,
CRYPT_XML_CHARSET dwCharset, CRYPT_XML_CHARSET dwCharset,
__inout void *pvCallbackState, _Inout_ void *pvCallbackState,
__in PFN_CRYPT_XML_WRITE_CALLBACK pfnWrite _In_ PFN_CRYPT_XML_WRITE_CALLBACK pfnWrite
); );
/**************************************************************************** /****************************************************************************
CryptXmlDllCreateDigest CryptXmlDllCreateDigest
pDigestMethod pDigestMethod
[in] A pointer to a CRYPT_XML_ALGORITHM structure that specifies [in] A pointer to a CRYPT_XML_ALGORITHM structure that specifies
the algorithm to use to create the digest. the algorithm to use to create the digest.
pcbSize pcbSize
skipping to change at line 2055 skipping to change at line 2067
phDigest phDigest
[out] A pointer to a CRYPT_XML_DIGEST variable to receive a pointer [out] A pointer to a CRYPT_XML_DIGEST variable to receive a pointer
to the digest. to the digest.
CryptXml uses CryptXmlDllCloseDigest to free resources allocated CryptXml uses CryptXmlDllCloseDigest to free resources allocated
in phDigest. in phDigest.
****************************************************************************/ ****************************************************************************/
typedef void* CRYPT_XML_DIGEST; typedef void* CRYPT_XML_DIGEST;
typedef typedef
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
(WINAPI *CryptXmlDllCreateDigest)( (WINAPI *CryptXmlDllCreateDigest)(
__in const CRYPT_XML_ALGORITHM *pDigestMethod, _In_ const CRYPT_XML_ALGORITHM *pDigestMethod,
__out_range( 0, CRYPT_XML_DIGEST_VALUE_MAX ) _Out_range_( 0, CRYPT_XML_DIGEST_VALUE_MAX )
ULONG *pcbSize, ULONG *pcbSize,
__out CRYPT_XML_DIGEST *phDigest _Out_ CRYPT_XML_DIGEST *phDigest
); );
/**************************************************************************** /****************************************************************************
CryptXmlDllDigestData CryptXmlDllDigestData
The CryptXmlDllDigestData function is used to digest data. The CryptXmlDllDigestData function is used to digest data.
The CryptXmlDllDigestData function is exposed though The CryptXmlDllDigestData function is exposed though
the exported CryptXmlDllGetInterface fucntion. the exported CryptXmlDllGetInterface fucntion.
hDigest hDigest
skipping to change at line 2084 skipping to change at line 2096
pbData pbData
[in] A pointer to a block of data to be processed. [in] A pointer to a block of data to be processed.
cbDigest cbDigest
[in] The size, in bytes, of the block of data pointed [in] The size, in bytes, of the block of data pointed
to bye the pbData parameter. to bye the pbData parameter.
****************************************************************************/ ****************************************************************************/
typedef typedef
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
(WINAPI *CryptXmlDllDigestData)( (WINAPI *CryptXmlDllDigestData)(
__in CRYPT_XML_DIGEST hDigest, _In_ CRYPT_XML_DIGEST hDigest,
__in_bcount(cbData) _In_reads_bytes_(cbData)
const BYTE *pbData, const BYTE *pbData,
ULONG cbData ULONG cbData
); );
/**************************************************************************** /****************************************************************************
CryptXmlDllFinalizeDigest CryptXmlDllFinalizeDigest
The CryptXmlDllFinalizeDigest function isused to retrieve the digest value. The CryptXmlDllFinalizeDigest function isused to retrieve the digest value.
The CryptXmlDllFinalizeDigest function is exposed though The CryptXmlDllFinalizeDigest function is exposed though
the exported CryptXmlDllGetInterface fucntion. the exported CryptXmlDllGetInterface fucntion.
skipping to change at line 2112 skipping to change at line 2124
This handle is obtained by calling the CryptXmlDllCreateDigest function. This handle is obtained by calling the CryptXmlDllCreateDigest function.
pbDigest pbDigest
[out] A pointer to a buffer that receives the digest value. [out] A pointer to a buffer that receives the digest value.
cbDigest cbDigest
[in] The size, in bytes, of the buffer pointed to by the pbDigest. [in] The size, in bytes, of the buffer pointed to by the pbDigest.
****************************************************************************/ ****************************************************************************/
typedef typedef
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
(WINAPI *CryptXmlDllFinalizeDigest)( (WINAPI *CryptXmlDllFinalizeDigest)(
__in CRYPT_XML_DIGEST hDigest, _In_ CRYPT_XML_DIGEST hDigest,
__out_bcount(cbDigest) _Out_writes_bytes_(cbDigest)
BYTE *pbDigest, BYTE *pbDigest,
ULONG cbDigest ULONG cbDigest
); );
/**************************************************************************** /****************************************************************************
CryptXmlDllCloseDigest CryptXmlDllCloseDigest
hDigest hDigest
[in] The handle of the digest object. [in] The handle of the digest object.
This handle is obtained by calling the CryptXmlCreateDigest function. This handle is obtained by calling the CryptXmlCreateDigest function.
After the function has been called, the digest handle passed After the function has been called, the digest handle passed
to this function is released and cannot be used again. to this function is released and cannot be used again.
****************************************************************************/ ****************************************************************************/
typedef typedef
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
(WINAPI *CryptXmlDllCloseDigest)( (WINAPI *CryptXmlDllCloseDigest)(
__in CRYPT_XML_DIGEST hDigest _In_ CRYPT_XML_DIGEST hDigest
); );
/**************************************************************************** /****************************************************************************
CryptXmlDllSignData CryptXmlDllSignData
The CryptXmlDllSignData function is used to sign data. The CryptXmlDllSignData function is used to sign data.
The CryptXmlDllSignData function is exposed though The CryptXmlDllSignData function is exposed though
the exported CryptXmlDllGetInterface fucntion. the exported CryptXmlDllGetInterface fucntion.
pSignatureMethod pSignatureMethod
skipping to change at line 2186 skipping to change at line 2198
[in] The size, in bytes, of the buffer pointed to by the pbOutput pramat er. [in] The size, in bytes, of the buffer pointed to by the pbOutput pramat er.
pcbResult pcbResult
[out] A pointer to a DWORD variable that receives the number of bytes co pied [out] A pointer to a DWORD variable that receives the number of bytes co pied
to the pbOutput buffer. to the pbOutput buffer.
If pbOutput is NULL, this receives the size, in bytes, required If pbOutput is NULL, this receives the size, in bytes, required
for the signature. for the signature.
****************************************************************************/ ****************************************************************************/
typedef typedef
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
(WINAPI *CryptXmlDllSignData)( (WINAPI *CryptXmlDllSignData)(
__in const CRYPT_XML_ALGORITHM *pSignatureMethod, _In_ const CRYPT_XML_ALGORITHM *pSignatureMethod,
__in HCRYPTPROV_OR_NCRYPT_KEY_HANDLE hCryptProvOrNCryptKey, _In_ HCRYPTPROV_OR_NCRYPT_KEY_HANDLE hCryptProvOrNCryptKey,
__in DWORD dwKeySpec, _In_ DWORD dwKeySpec,
__in_bcount(cbInput) _In_reads_bytes_(cbInput)
const BYTE *pbInput, const BYTE *pbInput,
__in ULONG cbInput, _In_ ULONG cbInput,
__out_bcount_part_opt(cbOutput, *pcbResult) _Out_writes_bytes_to_opt_(cbOutput, *pcbResult)
BYTE *pbOutput, BYTE *pbOutput,
__in ULONG cbOutput, _In_ ULONG cbOutput,
__out_range( 0, cbOutput ) _Out_range_( 0, cbOutput )
ULONG *pcbResult ULONG *pcbResult
); );
/**************************************************************************** /****************************************************************************
CryptXmlDllVerifySignature CryptXmlDllVerifySignature
The CryptXmlDllVerifySignature function is used to verify signature. The CryptXmlDllVerifySignature function is used to verify signature.
The CryptXmlDllVerifySignature function is exposed though The CryptXmlDllVerifySignature function is exposed though
the exported CryptXmlDllGetInterface fucntion. the exported CryptXmlDllGetInterface fucntion.
skipping to change at line 2236 skipping to change at line 2248
pbSignature pbSignature
[in] A pointer to a buffer that contains the signature value to be verif ied. [in] A pointer to a buffer that contains the signature value to be verif ied.
The cbSignature parameter contains the size of this buffer. The cbSignature parameter contains the size of this buffer.
cbSignature cbSignature
[in] The size, in bytes, of the pbSignature buffer. [in] The size, in bytes, of the pbSignature buffer.
****************************************************************************/ ****************************************************************************/
typedef typedef
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
(WINAPI *CryptXmlDllVerifySignature)( (WINAPI *CryptXmlDllVerifySignature)(
__in const CRYPT_XML_ALGORITHM *pSignatureMethod, _In_ const CRYPT_XML_ALGORITHM *pSignatureMethod,
__in BCRYPT_KEY_HANDLE hKey, _In_ BCRYPT_KEY_HANDLE hKey,
__in_bcount(cbInput) _In_reads_bytes_(cbInput)
const BYTE *pbInput, const BYTE *pbInput,
__in ULONG cbInput, _In_ ULONG cbInput,
__in_bcount(cbSignature) _In_reads_bytes_(cbSignature)
const BYTE *pbSignature, const BYTE *pbSignature,
__in ULONG cbSignature _In_ ULONG cbSignature
); );
/**************************************************************************** /****************************************************************************
CryptXmlDllGetAlgorithmInfo CryptXmlDllGetAlgorithmInfo
The CryptXmlDllGetAlgorithmInfo fucntion decodes the XML Algorithm and The CryptXmlDllGetAlgorithmInfo fucntion decodes the XML Algorithm and
returns information about the algorithm. returns information about the algorithm.
The CryptXmlDllGetAlgorithmInfo function is exposed though the exported The CryptXmlDllGetAlgorithmInfo function is exposed though the exported
CryptXmlDllGetInterface fucntion. CryptXmlDllGetInterface fucntion.
pXmlAlgorithm pXmlAlgorithm
[in] A Pointer to a CRYPT_XML_ALGORITHM structure that specifies [in] A Pointer to a CRYPT_XML_ALGORITHM structure that specifies
the algorithm for which to return information. the algorithm for which to return information.
ppAlgInfo ppAlgInfo
[out] A pointer to a pointer to a CRYPT_XML_ALGORITHM_INFO structure. [out] A pointer to a pointer to a CRYPT_XML_ALGORITHM_INFO structure.
The caller must free ppAlgInfo by calling LocalFree() The caller must free ppAlgInfo by calling LocalFree()
****************************************************************************/ ****************************************************************************/
typedef typedef
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
(WINAPI *CryptXmlDllGetAlgorithmInfo)( (WINAPI *CryptXmlDllGetAlgorithmInfo)(
__in const CRYPT_XML_ALGORITHM *pXmlAlgorithm, _In_ const CRYPT_XML_ALGORITHM *pXmlAlgorithm,
__deref_out CRYPT_XML_ALGORITHM_INFO **ppAlgInfo _Outptr_ CRYPT_XML_ALGORITHM_INFO **ppAlgInfo
); );
/**************************************************************************** /****************************************************************************
CRYPT_XML_CRYPTOGRAPHIC_INTERFACE CRYPT_XML_CRYPTOGRAPHIC_INTERFACE
fpCryptXmlEncodeAlgorithm fpCryptXmlEncodeAlgorithm
A pointer to the implementation of the CryptXmlDllEncodeAlgorithm. A pointer to the implementation of the CryptXmlDllEncodeAlgorithm.
fpCryptXmlCreateDigest fpCryptXmlCreateDigest
A pointer to the implementation of the CryptXmlDllCreateDigest. A pointer to the implementation of the CryptXmlDllCreateDigest.
skipping to change at line 2338 skipping to change at line 2350
[in] Specifies a charset of the XML to be written to pfnWrite. [in] Specifies a charset of the XML to be written to pfnWrite.
pvCallbackState pvCallbackState
[in] An argument to be passed to the callback. [in] An argument to be passed to the callback.
pfnWrite pfnWrite
[in, callback] A CryptXml defined callback to receive constructed XML. [in, callback] A CryptXml defined callback to receive constructed XML.
****************************************************************************/ ****************************************************************************/
typedef typedef
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
(WINAPI * CryptXmlDllEncodeKeyValue)( (WINAPI * CryptXmlDllEncodeKeyValue)(
__in NCRYPT_KEY_HANDLE hKey, _In_ NCRYPT_KEY_HANDLE hKey,
CRYPT_XML_CHARSET dwCharset, CRYPT_XML_CHARSET dwCharset,
__inout void *pvCallbackState, _Inout_ void *pvCallbackState,
__in PFN_CRYPT_XML_WRITE_CALLBACK pfnWrite _In_ PFN_CRYPT_XML_WRITE_CALLBACK pfnWrite
); );
/**************************************************************************** /****************************************************************************
CryptXmlDllCreateKey CryptXmlDllCreateKey
Address of installable function used to parse <*KeyValue> element and Address of installable function used to parse <*KeyValue> element and
create a CNG NCrypt key handle to verify signature. create a CNG NCrypt key handle to verify signature.
pEncoded pEncoded
[in] Specifies XML encoded <*KeyValue>. [in] Specifies XML encoded <*KeyValue>.
phKey phKey
[out] A key handle used to verify signature. [out] A key handle used to verify signature.
CryptXml calls BCryptDestroyKey when it's done using it. CryptXml calls BCryptDestroyKey when it's done using it.
****************************************************************************/ ****************************************************************************/
typedef typedef
__success( return == 0 ) _Success_( return == 0 )
HRESULT HRESULT
(WINAPI * CryptXmlDllCreateKey)( (WINAPI * CryptXmlDllCreateKey)(
__in const CRYPT_XML_BLOB *pEncoded, _In_ const CRYPT_XML_BLOB *pEncoded,
__out BCRYPT_KEY_HANDLE *phKey _Out_ BCRYPT_KEY_HANDLE *phKey
); );
#ifdef __cplusplus #ifdef __cplusplus
} //extern "C" } //extern "C"
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion
 End of changes. 108 change blocks. 
153 lines changed or deleted 167 lines changed or added

This html diff was produced by rfcdiff 1.41.