Class CadesSignature
Inheritance
CadesSignature
Assembly: Lacuna.Pki.dll
Syntax
public class CadesSignature : ICertificateStore
Properties
Certificates
Declaration
public IEnumerable<PKCertificate> Certificates { get; }
Property Value
Crls
Declaration
public IEnumerable<Crl> Crls { get; }
Property Value
EncapsulatedContentType
Declaration
public CmsContentType EncapsulatedContentType { get; }
Property Value
EncodedValue
Declaration
public byte[] EncodedValue { get; }
Property Value
HasEncapsulatedContent
Declaration
public bool HasEncapsulatedContent { get; }
Property Value
Signers
Declaration
public List<CadesSignerInfo> Signers { get; }
Property Value
Methods
GetEncapsulatedContent()
Declaration
public byte[] GetEncapsulatedContent()
Returns
Open(Byte[])
Declaration
public static CadesSignature Open(byte[] content)
Parameters
Type |
Name |
Description |
Byte[] |
content |
CAdES signature content bytes
|
Returns
Open(Stream)
Declaration
public static CadesSignature Open(Stream stream)
Parameters
Type |
Name |
Description |
Stream |
stream |
CAdES signature stream
|
Returns
Open(String)
Declaration
public static CadesSignature Open(string path)
Parameters
Type |
Name |
Description |
String |
path |
CAdES signature file path
|
Returns
SetExternalData(Byte[])
Declaration
public void SetExternalData(byte[] content)
Parameters
Type |
Name |
Description |
Byte[] |
content |
|
SetExternalData(Stream)
Declaration
public void SetExternalData(Stream stream)
Parameters
Type |
Name |
Description |
Stream |
stream |
|
SetExternalData(String)
Declaration
public void SetExternalData(string path)
Parameters
Type |
Name |
Description |
String |
path |
|
SetExternalDataDigest(DigestAlgorithm, Byte[])
Provides a digest of the data that was signed, so that the validation of the signatures can be performed without
reading the original data. Multiple calls to this method will be necessary if there are multiple signers with
different digest algorithms.
WARNING: if this method is used, it is the caller's responsibility to make sure that the digest provided actually
matches the original signed data.
Declaration
public void SetExternalDataDigest(DigestAlgorithm digestAlgorithm, byte[] digestValue)
Parameters
ValidateAllSignatures(CadesPolicySpec, ValidationContext)
Declaration
public Dictionary<CadesSignerInfo, ValidationResults> ValidateAllSignatures(CadesPolicySpec policy, ValidationContext validationContext)
Parameters
Returns
ValidateAllSignatures(CadesPolicySpec, Nullable<DateTimeOffset>, IReferencedCrlStore)
Declaration
public Dictionary<CadesSignerInfo, ValidationResults> ValidateAllSignatures(CadesPolicySpec policy, DateTimeOffset? dateReference = default(DateTimeOffset? ), IReferencedCrlStore crlStore = null)
Parameters
Returns
ValidateAllSignatures(ICadesPolicyMapper, ValidationContext)
Declaration
public Dictionary<CadesSignerInfo, ValidationResults> ValidateAllSignatures(ICadesPolicyMapper policyMapper, ValidationContext validationContext)
Parameters
Returns
ValidateAllSignatures(ICadesPolicyMapper, Nullable<DateTimeOffset>, IReferencedCrlStore)
Declaration
public Dictionary<CadesSignerInfo, ValidationResults> ValidateAllSignatures(ICadesPolicyMapper policyMapper, DateTimeOffset? dateReference = default(DateTimeOffset? ), IReferencedCrlStore crlStore = null)
Parameters
Returns
ValidateAllSignatures(ICadesPolicyMapperBySignerInfo, ValidationContext)
Declaration
public Dictionary<CadesSignerInfo, ValidationResults> ValidateAllSignatures(ICadesPolicyMapperBySignerInfo policyMapper, ValidationContext validationContext)
Parameters
Returns
ValidateAllSignatures(ICadesPolicyMapperBySignerInfo, Nullable<DateTimeOffset>, IReferencedCrlStore)
Declaration
public Dictionary<CadesSignerInfo, ValidationResults> ValidateAllSignatures(ICadesPolicyMapperBySignerInfo policyMapper, DateTimeOffset? dateReference = default(DateTimeOffset? ), IReferencedCrlStore crlStore = null)
Parameters
Returns
ValidateSignature(CadesSignerInfo, CadesPolicySpec, ValidationContext)
Declaration
public ValidationResults ValidateSignature(CadesSignerInfo signerInfo, CadesPolicySpec policy, ValidationContext validationContext)
Parameters
Returns
ValidateSignature(CadesSignerInfo, CadesPolicySpec, Nullable<DateTimeOffset>, IReferencedCrlStore)
Declaration
public ValidationResults ValidateSignature(CadesSignerInfo signerInfo, CadesPolicySpec policy, DateTimeOffset? dateReference = default(DateTimeOffset? ), IReferencedCrlStore crlStore = null)
Parameters
Returns
ValidateSignature(CadesSignerInfo, ICadesPolicyMapper, ValidationContext)
Declaration
public ValidationResults ValidateSignature(CadesSignerInfo signerInfo, ICadesPolicyMapper policyMapper, ValidationContext validationContext)
Parameters
Returns
ValidateSignature(CadesSignerInfo, ICadesPolicyMapper, Nullable<DateTimeOffset>, IReferencedCrlStore)
Declaration
public ValidationResults ValidateSignature(CadesSignerInfo signerInfo, ICadesPolicyMapper policyMapper, DateTimeOffset? dateReference = default(DateTimeOffset? ), IReferencedCrlStore crlStore = null)
Parameters
Returns
ValidateSignature(CadesSignerInfo, ICadesPolicyMapperBySignerInfo, ValidationContext)
Declaration
public ValidationResults ValidateSignature(CadesSignerInfo signerInfo, ICadesPolicyMapperBySignerInfo policyMapper, ValidationContext validationContext)
Parameters
Returns
ValidateSignature(CadesSignerInfo, ICadesPolicyMapperBySignerInfo, Nullable<DateTimeOffset>, IReferencedCrlStore)
Declaration
public ValidationResults ValidateSignature(CadesSignerInfo signerInfo, ICadesPolicyMapperBySignerInfo policyMapper, DateTimeOffset? dateReference = default(DateTimeOffset? ), IReferencedCrlStore crlStore = null)
Parameters
Returns
WriteEncapsulatedContent(Stream)
Declaration
public void WriteEncapsulatedContent(Stream stream)
Parameters
Type |
Name |
Description |
Stream |
stream |
|
Explicit Interface Implementations
ICertificateStore.GetCertificate(Name, BigInteger)
Declaration
PKCertificate ICertificateStore.GetCertificate(Name issuerName, BigInteger serialNumber)
Parameters
Returns
Implements
ICertificateStore.GetCertificate(Byte[])
Declaration
PKCertificate ICertificateStore.GetCertificate(byte[] keyIdentifier)
Parameters
Type |
Name |
Description |
Byte[] |
keyIdentifier |
|
Returns
Implements
ICertificateStore.GetCertificates(Name)
Declaration
List<PKCertificate> ICertificateStore.GetCertificates(Name subjectName)
Parameters
Type |
Name |
Description |
Name |
subjectName |
|
Returns
Implements