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

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