Table of Contents

Class TrustManager

Namespace
ZeroInstall.Services.Feeds
Assembly
ZeroInstall.Services.dll

Methods for verifying signatures and user trust.

public class TrustManager : ITrustManager
Inheritance
TrustManager
Implements
Inherited Members

Remarks

This class is immutable and thread-safe.

Constructors

TrustManager(TrustDB, Config, IOpenPgp, IFeedCache, ITaskHandler)

Methods for verifying signatures and user trust.

public TrustManager(TrustDB trustDB, Config config, IOpenPgp openPgp, IFeedCache feedCache, ITaskHandler handler)

Parameters

trustDB TrustDB
config Config
openPgp IOpenPgp
feedCache IFeedCache
handler ITaskHandler

Remarks

This class is immutable and thread-safe.

Methods

CheckTrust(byte[], FeedUri, OpenPgpKeyCallback?)

Checks whether a remote feed or catalog file has a a valid and trusted signature. Downloads missing GPG keys for verification and interactively asks the user to approve new keys.

public ValidSignature CheckTrust(byte[] data, FeedUri uri, OpenPgpKeyCallback? keyCallback = null)

Parameters

data byte[]

The data of the file.

uri FeedUri

The URI the data originally came from.

keyCallback OpenPgpKeyCallback

Callback for reading a specific OpenPGP public key file.

Returns

ValidSignature

The first valid and trusted signature found on the feed.

Exceptions

UriFormatException

uri is a local file.

OperationCanceledException

The user canceled the task.

WebException

A key file could not be downloaded from the internet.

SignatureException

No trusted signature was found.

IOException

A problem occurred while writing trust configuration.

UnauthorizedAccessException

Write access to the trust configuration is not permitted.