TimestampRequester
Namespace: Lacuna.Pki
Assembly: Lacuna.Pki
Class
public class TimestampRequester : ITimestampRequester
Hierarquia: object → TimestampRequester
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
| Nome | Tipo | Descrição |
|---|---|---|
uri | Uri | Timestamper URI. |
credentials | ICredentials | Credentials 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
| Nome | Tipo | Descrição |
|---|---|---|
uri | Uri | Timestamper URI |
clientCertificate | PKCertificateWithKey | Certificate 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
| Nome | Tipo | Descrição |
|---|---|---|
uri | Uri | Timestamper URI. |
username | string | |
password | string |
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
| Nome | Tipo | Descrição |
|---|---|---|
uri | Uri | Timestamper URI. |
oAuthBearerToken | string | OAtuh Bearer token |
TimestampRequester(Uri)
Instantiates a TimestampRequester that requests timestamps using the HTTP or HTTPS protocol without authentication
public TimestampRequester(Uri uri)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
uri | Uri | Timestamper URI |
Propriedades
CustomHeaders
Custom headers key:value to be added to the timestamp post request
public Dictionary<string, string> CustomHeaders { get; set; }
Retorno
Timeout
The timestamp request timeout. If not set, default is the PkiConfig.TimestampRequestTimeout
public TimeSpan Timeout { get; set; }
Retorno
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
Uri
public Uri Uri { get; }
Retorno
Métodos
DecodeRfc3161Response(byte[])
Decodes a RFC 3161 timestamp response (TimeStampResp)
public static CadesTimestamp DecodeRfc3161Response(byte[] response)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
response | byte[] | 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
| Nome | Tipo | Descrição |
|---|---|---|
digest | DigestAlgorithmAndValue | |
nonce | byte[] |
Retorno
GetTimestamp(DigestAlgorithmAndValue, TimeSpan)
[Obsolete("Set the object property Timeout instead of using timeout argument")]
public CadesTimestamp GetTimestamp(DigestAlgorithmAndValue digest, TimeSpan timeout)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
digest | DigestAlgorithmAndValue | |
timeout | TimeSpan |
Retorno
GetTimestamp(DigestAlgorithmAndValue)
Requestes the timestamp-token
public CadesTimestamp GetTimestamp(DigestAlgorithmAndValue digest)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
digest | DigestAlgorithmAndValue | Digest algorithm and value for message-imprint |
Retorno
CadesTimestamp — CadesTimestamp signature
Membros herdados
ToString(), Equals(object), Equals(object, object), ReferenceEquals(object, object), GetHashCode(), GetType(), MemberwiseClone()