Pular para o conteúdo principal

TimestampRequester

Namespace: Lacuna.Pki
Assembly: Lacuna.Pki
Class

public class TimestampRequester : ITimestampRequester

Hierarquia: objectTimestampRequester

Construtores

TimestampRequester(Uri, ICredentials)

Instantiates a TimestampeRequester that requests timestamps using the HTTPS protocol with basic authentication. For production is recommended only HTTPS protocol, otherwise your authentication parameters will traffic as plaintext over the network.

public TimestampRequester(Uri uri, ICredentials credentials)

Parâmetros

NomeTipoDescrição
uriUriTimestamper URI.
credentialsICredentialsCredentials for authentication, typically an instance of System.Net.NetworkCredential.

TimestampRequester(Uri, PKCertificateWithKey)

Instantiates a TimestampRequester using the HTTPS protocol with mutual SSL authentication

public TimestampRequester(Uri uri, PKCertificateWithKey clientCertificate)

Parâmetros

NomeTipoDescrição
uriUriTimestamper URI
clientCertificatePKCertificateWithKeyCertificate for mutual authentication recovered from a WindowsCertificateStore.

TimestampRequester(Uri, string, string)

Instantiates a TimestampeRequester that requests timestamps with Basic Authentication header. For production is recommended only HTTPS protocol, otherwise your authentication parameters will traffic as plaintext over the network.

public TimestampRequester(Uri uri, string username, string password)

Parâmetros

NomeTipoDescrição
uriUriTimestamper URI.
usernamestring
passwordstring

TimestampRequester(Uri, string)

Instantiates a TimestampeRequester that requests timestamps using the HTTPS protocol with OAuth bearer token. For production is recommended only HTTPS protocol, otherwise your bearer token will traffic as plaintext over the network.

public TimestampRequester(Uri uri, string oAuthBearerToken)

Parâmetros

NomeTipoDescrição
uriUriTimestamper URI.
oAuthBearerTokenstringOAtuh Bearer token

TimestampRequester(Uri)

Instantiates a TimestampRequester that requests timestamps using the HTTP or HTTPS protocol without authentication

public TimestampRequester(Uri uri)

Parâmetros

NomeTipoDescrição
uriUriTimestamper URI

Propriedades

CustomHeaders

Custom headers key:value to be added to the timestamp post request

public Dictionary<string, string> CustomHeaders { get; set; }

Retorno

Dictionary<string, string>


Timeout

The timestamp request timeout. If not set, default is the PkiConfig.TimestampRequestTimeout

public TimeSpan Timeout { get; set; }

Retorno

TimeSpan


TsaPolicyId

The OID of the policy to be passed to the TSA when requesting timestamps (optional). Some TSAs use this parameter to distinguish between types of timestamps.

public string TsaPolicyId { get; set; }

Retorno

string


Uri

public Uri Uri { get; }

Retorno

Uri


Métodos

DecodeRfc3161Response(byte[])

Decodes a RFC 3161 timestamp response (TimeStampResp)

public static CadesTimestamp DecodeRfc3161Response(byte[] response)

Parâmetros

NomeTipoDescrição
responsebyte[]The response content

Retorno

CadesTimestamp — The cades timestamp signture


EncodeRfc3161Request(DigestAlgorithmAndValue, byte[])

Creates a RFC 3161 standar timestamp request content BER encoded.

public static byte[] EncodeRfc3161Request(DigestAlgorithmAndValue digest, byte[] nonce = null)

Parâmetros

NomeTipoDescrição
digestDigestAlgorithmAndValue
noncebyte[]

Retorno

byte[]


GetTimestamp(DigestAlgorithmAndValue, TimeSpan)

[Obsolete("Set the object property Timeout instead of using timeout argument")]
public CadesTimestamp GetTimestamp(DigestAlgorithmAndValue digest, TimeSpan timeout)

Parâmetros

NomeTipoDescrição
digestDigestAlgorithmAndValue
timeoutTimeSpan

Retorno

CadesTimestamp


GetTimestamp(DigestAlgorithmAndValue)

Requestes the timestamp-token

public CadesTimestamp GetTimestamp(DigestAlgorithmAndValue digest)

Parâmetros

NomeTipoDescrição
digestDigestAlgorithmAndValueDigest algorithm and value for message-imprint

Retorno

CadesTimestamp — CadesTimestamp signature


Membros herdados

ToString(), Equals(object), Equals(object, object), ReferenceEquals(object, object), GetHashCode(), GetType(), MemberwiseClone()