X509 class

An X.509 Certificate

Inheritance

Constructors

X509(ASN1Sequence asn1)
Creates a certificate from an ASN1Sequence.
factory
X509.fromDer(Uint8List der)
Creates a X.509 Certificate from DER encoded bytes.
factory
X509.fromPem(String pem)
Creates a certificate from a PEM encoded string.
factory

Properties

asn1 ASN1Sequence
The X509 certificate asn1 object
read-onlyoverride
asn1Issuer ASN1Sequence
The issuer of the certificate represented as asn1.
read-onlyinherited
body Uint8List
The sngned body of the certificate
read-onlyinherited
der Uint8List
DER representation of the X509 certificate
read-only
digestAlgorithm HashAlgorithm
The digest Algorithm
read-onlyinherited
digestAlgorithmID ASN1ObjectIdentifier
The digest Algorithm ID of the certificate.
read-onlyinherited
fingerprint Uint8List
The certificate fingerprint
read-onlyinherited
hashCode int
The hash code for this object.
read-onlyoverride
issuer Iterable<MapEntry<ASN1ObjectIdentifier, dynamic>>
The issuer of the certificate.
read-onlyinherited
notAfter DateTime
The end time which this certificate is valid.
read-onlyinherited
notBefore DateTime
The start time which this certificate is valid.
read-onlyinherited
pem String
PEM representation of the X509 certificate
read-only
publicKey RSAPublicKey
The Public Key Algorithm of the certificate.
read-onlyinherited
publicKeyAlgorithmOI ASN1ObjectIdentifier
The Public Key Algorithm of the certificate.
read-onlyinherited
publicKeyBytes Uint8List
The Public Key Algorithm of the certificate.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
serialNumber BigInt
The serial number of the certificate.
read-onlyinherited
signatureAlgorithmIDParameters ASN1Object
The parameters for the signature algorithm ID of the certificate.
read-onlyinherited
signatureAlgorithmOI ASN1ObjectIdentifier
The certificate signature algorithm
read-only
signatureParameters ASN1Object
The parameters for the certificate signature
read-only
signatureValue Uint8List
The certificate signature
read-only
subject Iterable<MapEntry<ASN1ObjectIdentifier, dynamic>>
The subject of the certificate.
read-onlyinherited
version int
The version number of the certificate.
read-onlyinherited

Methods

asn1ToDart(ASN1Object obj) → dynamic
inherited
asn1ToString(dynamic obj) String
inherited
commonDigestAlgorithm(ASN1ObjectIdentifier signatureAlgorithmID) HashAlgorithm
inherited
derEncode(Uint8List hash, HashAlgorithm digest) Uint8List
Encode a hash to a DER message
inherited
digestIdentifierHex(HashAlgorithm algorithm) String
inherited
generateSignature(RSAPrivateKey privateKey, Uint8List message, HashAlgorithm digestAlgorithm) Uint8List
Generate a signature for the message
generateSignatureOfHash(RSAPrivateKey privateKey, Uint8List hash, HashAlgorithm digestAlgorithm) Uint8List
Generate a signature for the message
getDigest(HashAlgorithm digestAlgorithm) Digest
inherited
listEquality(Uint8List f, Uint8List o) bool
Test if two lists are equal
inherited
namesFromAsn1(ASN1Sequence sequence) Iterable<MapEntry<ASN1ObjectIdentifier, dynamic>>
Parse a list of names
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
padText(String s, int amount) String
inherited
toHex(Iterable<int>? list) String
inherited
toString() String
A string representation of this object.
override
verify(X509 issuer) → void
Verify the certificate
verifyChain(List<X509> chain, List<X509> trusted) List<X509>
Verify the full certification chain and returns it
verifySignature(Uint8List signature, Uint8List message, HashAlgorithm digestAlgorithm) bool
Verify the validity of a signature
verifySignatureOfHash(Uint8List signature, Uint8List hash, HashAlgorithm digestAlgorithm) bool
Verify the validity of a signature

Operators

operator ==(Object other) bool
The equality operator.
override