Click or drag to resize
MimeKit

OpenPgpContextRetrievePublicKeyRingAsync Method

Asynchronously retrieve the public keyring using the configured key server.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
C#
protected Task<PgpPublicKeyRing> RetrievePublicKeyRingAsync(
	long keyId,
	CancellationToken cancellationToken
)

Parameters

keyId  Int64
The identifier of the public key to be retrieved.
cancellationToken  CancellationToken
The cancellation token.

Return Value

TaskPgpPublicKeyRing
The public key ring.
Remarks

Retrieves the public keyring specified by the keyId from the key server set on the KeyServer property. If the keyring is successfully retrieved, it will be imported via Import(PgpPublicKeyRingBundle, CancellationToken).

This method should be called by GetPublicKeyRingAsync(Int64, CancellationToken) when the keyring is not available locally.

See Also