IOpcSignatureReference interface
Represents a reference to XML markup that has been or will be signed. This referenced XML markup is serialized in the signature markup when a signature is generated.
When to implement
Never. Custom implementations of this interface are not supported.
Members
The IOpcSignatureReference interface inherits from the IUnknown interface. IOpcSignatureReference also has these types of members:
Methods
The IOpcSignatureReference interface has these methods.
| Method | Description |
|---|---|
| GetDigestMethod |
Gets the digest method to use on the referenced XML element, when the element is signed. |
| GetDigestValue |
Gets the digest value that is calculated for the referenced XML element when the element is signed. |
| GetId |
Gets the identifier for the reference. |
| GetTransformMethod |
Gets the canonicalization method to use on the referenced XML element, when the element is signed. |
| GetType |
Gets a string that indicates the type of the referenced XML element. |
| GetUri |
Gets the URI of the referenced XML element. |
Remarks
To create an IOpcSignatureReference interface pointer, call the IOpcSignatureReferenceSet::Create method. IOpcSignatureReferenceSet::Create does not create the reference to the package-specific Object element; that reference is created automatically when the signature is generated.
To access an IOpcSignatureReference interface pointer, call the IOpcSignatureReferenceEnumerator::GetCurrent method. IOpcSignatureReferenceEnumerator::GetCurrent does not access the reference to the package-specific Object element; call the IOpcDigitalSignature::GetPackageObjectReference method to access that reference.
The interface provides methods to access information about the reference itself, and referenced XML element. The referenced element can be the package-specific Object element, an application-specific Object element, or a child element of an application-specific Object.
When a signature is generated, this reference information is serialized in the XML markup of the signature (signature markup). In signature markup, the information is represented by a Reference element that has its URI attribute value set to "#" followed by the Id attribute value of the referenced element. For example, if the Id attribute of the referenced element is "Application" the URI attribute of the Reference element is set to "#Application" as shown in the following markup.
The following signature markup shows a serialized reference to a signed, application-specific Object element.
<Signature Id="SignatureId" xmlns="http://www.w3.org/2000/09/xmldsig#"> <SignedInfo> [...] <Reference URI="#idPackageObject" ...> [...] </Reference> <!-- This reference indicates that the application-specific Object element was signed when the signature was generated.--> <Reference URI="#Application" ...> [...] </Reference> </SignedInfo> [...] <Object Id="idPackageObject" ...> [...] </Object> <!-- This application-specific <Object> element was signed when the signature was generated. --> <Object Id="Application"> [...] </Object> </Signature>
The following signature markup shows a serialized reference to a signed, child element of an application-specific Object element.
<Signature Id="SignatureId" xmlns="http://www.w3.org/2000/09/xmldsig#"> <SignedInfo> [...] <Reference URI="#idPackageObject" ...> [...] </Reference> <!-- This reference indicates that MyElement in the application -specific Object element was signed when the signature was generated. --> <Reference URI="#MyElementId" ...> [...] </Reference> </SignedInfo> [...] <Object Id="idPackageObject" ...> [...] </Object> <Object Id="Application"> [...] <!-- This element is signed. --> <MyElement Id="MyElementId"> [...] </MyElement> [...] </Object> </Signature>
Requirements
|
Minimum supported client | Windows 7 [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server | Windows Server 2008 R2 [desktop apps | Windows Store apps] |
|
Header |
|
|
IDL |
|
See also
- Packaging Digital Signature Interfaces
- Overviews
- Digital Signatures Overview
- Getting Started with the Packaging API
- Packaging API Programming Guide
- Reference
- IOpcDigitalSignature
- IOpcSignatureReferenceEnumerator
- IOpcSignatureReferenceSet
- OPC_CANONICALIZATION_METHOD
- Core Packaging Interfaces
- Packaging Interfaces
- Packaging API Reference
- Packaging API Samples