IOpcDigitalSignatureManager interface

Provides access to Packaging Digital Signature Interfaces for a package that is represented by Packaging API objects. These interface methods are called to generate a signature, or to access and validate existing signatures in the package.

When to implement

Never. Custom implementations of this interface are not supported.

Members

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

Methods

The IOpcDigitalSignatureManager interface has these methods.

MethodDescription
CreateSigningOptions

Creates an IOpcSigningOptions interface pointer.

GetSignatureEnumerator

Gets an enumerator of IOpcDigitalSignature interface pointers, which represent package signatures.

GetSignatureOriginPartName

Gets an IOpcPartUri interface pointer that represents the part name of the Digital Signature Origin part.

RemoveSignature

Removes from the package a specified signature part that stores signature markup.

ReplaceSignatureXml

Replaces the existing signature markup that is stored in a specified signature part.

SetSignatureOriginPartName

Sets the part name of the Digital Signature Origin part to the name represented by a specified IOpcPartUri interface pointer.

Sign

Signs the package by generating a signature by using the specified certificate and IOpcSigningOptions interface pointer.

Validate

Validates a specified package signature using a specified certificate.

 

Remarks

Before the Sign method is called to generate a signature, the IOpcSigningOptions::SetDefaultDigestMethod and IOpcSigningOptions::SetSignatureMethod methods must be called.

To create an IOpcDigitalSignatureManager interface pointer, call the IOpcFactory::CreateDigitalSignatureManager method.

Important  If the package is modified while the Sign method is being executed, the method may fail or generate an inconsistent signature. To avoid corruption of the package, use the APIs to save the package prior to calling Sign. For information about how to save a package, see Saving a Package.
 

The Validate method checks that the specified signature (signed entities and the signature markup) has not been altered since the signature was generated, but does not validate the identity of the signer.

Important  The caller must validate the identity of the signer.
 

Thread Safety

Packaging objects are not thread-safe.

IOpcSigningOptions

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

Requirements

Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2 [desktop apps | Windows Store apps]

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
IOpcDigitalSignatureEnumerator
IOpcFactory
Core Packaging Interfaces
Packaging Interfaces
Packaging API Reference
Packaging API Samples

 

 

Community Additions

ADD
Show: