IOpcDigitalSignatureManager interface (msopc.h)

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.

Inheritance

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

Methods

The IOpcDigitalSignatureManager interface has these methods.

 
IOpcDigitalSignatureManager::CreateSigningOptions

Creates an IOpcSigningOptions interface pointer.
IOpcDigitalSignatureManager::GetSignatureEnumerator

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

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

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

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

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

Signs the package by generating a signature by using the specified certificate and IOpcSigningOptions interface pointer.
IOpcDigitalSignatureManager::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

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

IOpcDigitalSignatureEnumerator

IOpcFactory

Overviews

Packaging API Programming Guide

Packaging API Reference

Packaging API Samples

Packaging Digital Signature Interfaces

Packaging Interfaces

Reference