2using System.Diagnostics.CodeAnalysis;
43 if (Content is not Vector CertificateVector)
46 return TryParse(CertificateVector, out Parsed);
59 if (CertificateVector.Length != 3)
62 if (CertificateVector.FirstElement is not Vector TbsCert)
67 if (CertificateVector[1] is not Vector AlgorithmIdentifier)
71 if (IssuerSignatureAlgorithm2 is
null)
77 if (CertificateVector[2] is not
byte[]
Signature)
111 public byte[]
Binary => this.Asn1Vector.SubSection;
Static class for parsing and decoding security objects encoded using Abstract Syntax Notation 1 (ASN....
static bool TryDecodeDer(byte[] Data, out object? Value)
Decodes a DER-encoded object.
Certificate, as defined in RFC 5280, §4.1.
static bool TryParse(byte[] RawCertificate, [NotNullWhen(true)] out Certificate? Parsed)
Tries to parse an ASN.1-encoded Certificate, as defined in RFC 5280, §4.1.
byte?[] AuthorityKeyIdentifier
Authority Key Identifier
DateTimeOffset NotAfter
Signatures cannot be created after this timestamp.
ToBeSignedCertificate ToBeSignedCertificate
Certificate that is signed.
static bool TryParse(Vector CertificateVector, [NotNullWhen(true)] out Certificate? Parsed)
Tries to parse an ASN.1-encoded Certificate, as defined in RFC 5280, §4.1.
DateTimeOffset NotBefore
Signatures cannot be created before this timestamp.
byte[] Signature
Digital signature.
ISignatureAlgorithm IssuerSignatureAlgorithm
Signature algorithm used by issuer to sign the certificate.
System.Numerics.BigInteger SerialNumber
Serial Number
Vector Asn1Vector
ASN.1 decoded vector
Vector? Extensions
Extensions
int? Version
Version of document.
byte[] Binary
ASN.1 DER encoded certificate.
byte?[] SubjectKeyIdentifier
Subject Key Identifier
Certificate, without signature, as defined in RFC 5280, §4.1
IPublicKey PublicKey
Certificate public key, used to verify signatures issued by the certificate.
System.Numerics.BigInteger SerialNumber
Serial Number
DateTimeOffset NotAfter
Signatures cannot be created after this timestamp.
byte?[] AuthorityKeyIdentifier
Authority Key Identifier
DateTimeOffset NotBefore
Signatures cannot be created before this timestamp.
Vector? Extensions
Extensions
static bool TryParse(Vector TbsCert, [NotNullWhen(true)] out ToBeSignedCertificate? Parsed)
Tries to parse an ASN.1-encoded Certificate, as defined in RFC 5280, §4.1
int Version
Version of document.
byte?[] SubjectKeyIdentifier
Subject Key Identifier
Abstract base class for public keys.
Abstract base class for signature algorithms, as defined in RFC 5280.
static ? ISignatureAlgorithm TryDecode(Vector AlgorithmIdentifier)
Tries to decode an ASN.1-decoded algorithm identifier into an instance of the corresponding signature...
Interface for public keys.
Interface for signature algorithms, as defined in RFC 5280.
class Names(Vector NamesVector)
Contains a collection of distinguished names.