Table of Contents

Class RestPkiOptions

Namespace
NuvTools.Security.Certificate.Lacuna
Assembly
NuvTools.Security.Certificate.Lacuna.dll

Configuration for certificate authentication through Lacuna REST PKI.

public sealed class RestPkiOptions
Inheritance
RestPkiOptions
Inherited Members

Remarks

The signature and the trust chain are validated on the REST PKI service, so no key or licence is kept locally.

Fields

BasicPadesSignaturePolicy

Name of the basic PAdES signature policy.

public const string BasicPadesSignaturePolicy = "Basic"

Field Value

string

LacunaTestSecurityContext

Name of the security context that trusts Lacuna's test roots.

public const string LacunaTestSecurityContext = "LacunaTest"

Field Value

string

PkiBrazilSecurityContext

Name of the security context that trusts the ICP-Brasil roots.

public const string PkiBrazilSecurityContext = "PkiBrazil"

Field Value

string

SectionName

Configuration section name this options class binds to.

public const string SectionName = "RestPki"

Field Value

string

Properties

AccessToken

Access token generated in the REST PKI console. Server-side only — it is never exposed to the client.

public string AccessToken { get; set; }

Property Value

string

Endpoint

Endpoint of the REST PKI service. Defaults to Lacuna's cloud.

public string Endpoint { get; set; }

Property Value

string

PadesSignaturePolicy

Which policy a PDF is signed under: BasicPadesSignaturePolicy (the default) or the id of another PAdES signature policy REST PKI knows. Only document signing reads it.

public string PadesSignaturePolicy { get; set; }

Property Value

string

SecurityContext

Which roots a certificate must chain to: PkiBrazilSecurityContext (the default), LacunaTestSecurityContext, or the id of a security context created in the REST PKI console.

public string SecurityContext { get; set; }

Property Value

string

Remarks

LacunaTestSecurityContext accepts certificates anyone can issue. Use it in development only.

Methods

GetPadesSignaturePolicyId()

Resolves PadesSignaturePolicy to the id REST PKI expects.

public Guid GetPadesSignaturePolicyId()

Returns

Guid

The signature policy id.

Exceptions

InvalidOperationException

PadesSignaturePolicy is neither a known name nor an id.

GetSecurityContextId()

Resolves SecurityContext to the id REST PKI expects.

public Guid GetSecurityContextId()

Returns

Guid

The security context id.

Exceptions

InvalidOperationException

SecurityContext is neither a known name nor an id. An unknown value is refused instead of falling back, so a typo never changes which roots are trusted.