IOpcSigningOptions interface

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

When to implement

Never. Custom implementations of this interface are not supported.

Members

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

Methods

The IOpcSigningOptions interface has these methods.

MethodDescription
GetCertificateEmbeddingOption

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

GetCertificateSet

Gets an IOpcCertificateSet interface pointer.

GetCustomObjectSet

Gets an IOpcSignatureCustomObjectSet interface.

GetCustomReferenceSet

Gets an IOpcSignatureReferenceSet interface pointer.

GetDefaultDigestMethod

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

GetSignatureId

Gets the value of the Id attribute from the Signature element.

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.

GetSignaturePartName

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

GetSignaturePartReferenceSet

Gets an IOpcSignaturePartReferenceSet interface.

GetSignatureRelationshipReferenceSet

Gets an IOpcSignatureRelationshipReferenceSet interface pointer.

GetTimeFormat

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

SetCertificateEmbeddingOption

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

SetDefaultDigestMethod

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

SetSignatureId

Sets the value of the Id attribute of the Signature element.

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.

SetSignaturePartName

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

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

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Msopc.h

IDL

Msopc.idl

See also

Packaging Digital Signature Interfaces
Overviews
Digital Signatures Overview
Getting Started with the Packaging API
Packaging API Programming Guide
Reference
IOpcDigitalSignature
IOpcDigitalSignatureManager
Core Packaging Interfaces
Packaging Interfaces
Packaging API Reference
Packaging API Samples

 

 

Community Additions

ADD
Show:
© 2014 Microsoft