IOpcSigningOptions interface (msopc.h)

Provides methods to set and access information required to generate a signature.

Inheritance

The IOpcSigningOptions interface inherits from the IUnknown interface. IOpcSigningOptions also has these types of members:

Methods

The IOpcSigningOptions interface has these methods.

 
IOpcSigningOptions::GetCertificateEmbeddingOption

Gets a value that specifies the storage location in the package of the certificate to be used for the signature.
IOpcSigningOptions::GetCertificateSet

Gets an IOpcCertificateSet interface pointer.
IOpcSigningOptions::GetCustomObjectSet

Gets an IOpcSignatureCustomObjectSet interface.
IOpcSigningOptions::GetCustomReferenceSet

Gets an IOpcSignatureReferenceSet interface pointer.
IOpcSigningOptions::GetDefaultDigestMethod

Gets the default digest method that will be used to compute digest values for objects to be signed.
IOpcSigningOptions::GetSignatureId

Gets the value of the Id attribute from the Signature element.
IOpcSigningOptions::GetSignatureMethod

Gets the signature method to use to calculate and encrypt the hash value of the SignedInfo element, which will be serialized as the SignatureValue element of the signature.
IOpcSigningOptions::GetSignaturePartName

Gets the part name of the signature part where the signature markup will be stored.
IOpcSigningOptions::GetSignaturePartReferenceSet

Gets an IOpcSignaturePartReferenceSet interface.
IOpcSigningOptions::GetSignatureRelationshipReferenceSet

Gets an IOpcSignatureRelationshipReferenceSet interface pointer.
IOpcSigningOptions::GetTimeFormat

Gets the format of the string retrieved by the IOpcDigitalSignature::GetSigningTime method.
IOpcSigningOptions::SetCertificateEmbeddingOption

Set the storage location of the certificate to be used for the signature.
IOpcSigningOptions::SetDefaultDigestMethod

Sets the default digest method that will be used to compute digest values for objects to be signed.
IOpcSigningOptions::SetSignatureId

Sets the value of the Id attribute of the Signature element. (IOpcSigningOptions.SetSignatureId)
IOpcSigningOptions::SetSignatureMethod

Sets the signature method to use to calculate and encrypt the hash value of the SignedInfo element, which will be contained in the SignatureValue element of the signature.
IOpcSigningOptions::SetSignaturePartName

Sets the part name of the signature part where the signature markup will be stored.
IOpcSigningOptions::SetTimeFormat

Sets the format of the string retrieved by the IOpcDigitalSignature::GetSigningTime method.

Remarks

To generate a signature, call the IOpcDigitalSignatureManager::Sign method with the signingOptions parameter value set to an IOpcSigningOptions interface pointer.

To create an IOpcSigningOptions interface pointer, call the IOpcDigitalSignatureManager::CreateSigningOptions method.

The caller must set a default for the digest method and signature method before generating a signature. To set a default digest method, call the SetDefaultDigestMethod method. To set a signature method, call the SetSignatureMethod method.

To get an IOpcSignatureCustomObjectSet interface pointer, call the GetCustomObjectSet method. The interface pointers in the set represent application-specific Object elements.

To get an IOpcSignatureReferenceSet interface pointer, call the GetCustomReferenceSet method. The interface pointers in the set represent references to application-specific Object elements or their children that will be signed when the signature is generated.

The default location of the certificate is OPC_CERTIFICATE_IN_CERTIFICATE_PART. To change this value, call the SetCertificateEmbeddingOption method.

The default format of the signing time string is OPC_SIGNATURE_TIME_FORMAT_MILLISECONDS. To change the format of the signing time string, call the SetTimeFormat method.

Thread Safety

Packaging objects are not thread-safe.

For more information, see the Getting Started with the Packaging API.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header msopc.h

See also

Core Packaging Interfaces

Digital Signatures Overview

Getting Started with the Packaging API

IOpcDigitalSignature

IOpcDigitalSignatureManager

Overviews

Packaging API Programming Guide

Packaging API Reference

Packaging API Samples

Packaging Digital Signature Interfaces

Packaging Interfaces

Reference