Lingua

Rfc3161TimestampRequest.CreateFromSignerInfo Metodo

Definizione

Crea una richiesta di timestamp eseguendo l'hashing della firma del firmatario fornito con un algoritmo specificato.

public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromSignerInfo(System.Security.Cryptography.Pkcs.SignerInfo signerInfo, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid? requestedPolicyId = default, ReadOnlyMemory<byte>? nonce = default, bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection? extensions = default);
public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromSignerInfo(System.Security.Cryptography.Pkcs.SignerInfo signerInfo, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid requestedPolicyId = default, ReadOnlyMemory<byte>? nonce = default, bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = default);
static member CreateFromSignerInfo : System.Security.Cryptography.Pkcs.SignerInfo * System.Security.Cryptography.HashAlgorithmName * System.Security.Cryptography.Oid * Nullable<ReadOnlyMemory<byte>> * bool * System.Security.Cryptography.X509Certificates.X509ExtensionCollection -> System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest
Public Shared Function CreateFromSignerInfo (signerInfo As SignerInfo, hashAlgorithm As HashAlgorithmName, Optional requestedPolicyId As Oid = Nothing, Optional nonce As Nullable(Of ReadOnlyMemory(Of Byte)) = Nothing, Optional requestSignerCertificates As Boolean = false, Optional extensions As X509ExtensionCollection = Nothing) As Rfc3161TimestampRequest

Parametri

signerInfo
SignerInfo

Informazioni sul firmatario CMS per la compilazione di una richiesta di timestamp.

hashAlgorithm
HashAlgorithmName

Algoritmo hash da usare con questa richiesta di timestamp.

requestedPolicyId
Oid

Identificatore oggetto (OID) per i criteri di timestamp che l'autorità di timestamp (TSA) deve usare o null per non esprimere alcuna preferenza.

nonce
Nullable<ReadOnlyMemory<Byte>>

Un nonce facoltativo (numero usato una volta) per identificare in modo univoco questa richiesta per associarla alla risposta. Il valore viene interpretato come un intero big-endian senza segno e può essere normalizzato nel formato di codifica.

requestSignerCertificates
Boolean

true per indicare che l'autorità di timestamp (TSA) deve includere il certificato di firma nel token timestamp emesso; in caso contrario, false.

extensions
X509ExtensionCollection

Raccolta facoltativa di estensioni da includere nella richiesta.

Valori restituiti

Oggetto Rfc3161TimestampRequest che rappresenta i valori scelti.

Eccezioni

signerInfo è null.

hashAlgorithm.Name è null o Empty.

hashAlgorithm non è un algoritmo hash noto.

Commenti

Questo costruttore crea un timestamp per il valore della firma di un SignerInfo valore, in base alla raccomandazione di IETF RFC 3161 Appendice A (attributo timestamp della firma tramite CMS).

Il valore nonce in questo metodo viene considerato come un intero big-endian senza segno. Questo metodo normalizza l'input in una codifica BER INTEGER prima di assegnare il valore nonce. Il valore normalizzato viene restituito dal GetNonce() metodo .

Si applica a

Vedi anche