X509Certificate class Null safety

Class that represents a X.509 certificate. This provides a standard way to access all the attributes of an X.509 certificate.

Constructors

X509Certificate({ASN1Object? asn1})

Properties

asn1 List<ASN1Object>?
read / write
authorityInfoAccess AuthorityInfoAccessExtension?
Gets the map of the format (as a key) and location (as a value) of additional information about the CA who issued the certificate in which this extension appears from the AuthorityInfoAccess extension, (OID = 1.3.6.1.5.5.5.7.1.1).
read-only
authorityKeyIdentifier AuthorityKeyIdentifierExtension?
Gets the raw bits from the Authority Key Identifier extension, (OID = 2.5.29.35).
read-only
basicConstraints BasicConstraintExtension?
Gets the certificate constraints path length from the critical BasicConstraints extension, (OID = 2.5.29.19).
read-only
block1 ASN1Object?
read / write
certificatePolicies CertificatePoliciesExtension?
Gets the list of certificate policies from the CertificatePolicies extension, (OID = 2.5.29.32).
read-only
criticalExtensionOIDs List<String>
Get a list of critical extension OID codes
read-only
cRLDistributionPoints CRLDistributionPointsExtension?
Gets the list of CRL distribution points from the CRLDistributionPoints extension, (OID = 2.5.29.31).
read-only
description String
read-only
encoded Uint8List?
Returns the encoded form of this certificate. It is assumed that each certificate type would have only a single form of encoding; for example, X.509 certificates would be encoded as ASN.1 DER.
read / write
extendedKeyUsage List<String>
Gets a list of Strings representing the OBJECT IDENTIFIERs of the ExtKeyUsageSyntax field of the extended key usage extension, (OID = 2.5.29.37).
read-only
extensionBlocks List<ASN1Object>?
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
issuerAlternativeNames List<String>
Gets a collection of issuer alternative names from the IssuerAltName extension, (OID = 2.5.29.18).
read-only
issuerDistinguishedName String?
Returns the issuer (issuer distinguished name) value from the certificate as a String.
read-only
issuerOIDs List<String>
read-only
keyUsage List<bool>
Gets a boolean array representing bits of the KeyUsage extension, (OID = 2.5.29.15). [...]
read-only
nonCriticalExtensionOIDs List<String>
Get a list of non critical extension OID codes
read-only
notAfter DateTime?
Gets the notAfter date from the validity period of the certificate.
read-only
notBefore DateTime?
Gets the notBefore date from the validity period of the certificate.
read-only
publicKey X509PublicKey?
Gets the informations of the public key from this certificate.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
serialNumber List<int>?
Gets the serialNumber value from the certificate.
read-only
sigAlgName String?
Gets the signature algorithm name for the certificate signature algorithm.
read-only
sigAlgOID String?
Gets the signature algorithm OID string from the certificate.
read-only
sigAlgParams List<int>?
Gets the DER-encoded signature algorithm parameters from this certificate's signature algorithm.
read-only
signature List<int>?
Gets the signature value (the raw signature bits) from the certificate.
read-only
subjectAlternativeNames List<String>
Gets a collection of subject alternative names from the SubjectAltName extension, (OID = 2.5.29.17).
read-only
subjectDistinguishedName String?
Returns the subject (subject distinguished name) value from the certificate as a String.
read-only
subjectKeyIdentifier SubjectKeyIdentifierExtension?
Gets the raw bits from the Subject Key Identifier (SKID) extension, (OID = 2.5.29.14).
read-only
subjectOIDs List<String>
read-only
version int?
Gets the version (version number) value from the certificate.
read-only

Methods

checkValidity({DateTime? date}) bool
Checks that the given date is within the certificate's validity period.
extensionObject({String? oidValue, OID? oid}) X509Extension?
Gets the extension information of the given OID code or enum string value.
issuer({String? oid, ASN1DistinguishedNames? dn}) String?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
subject({String? oid, ASN1DistinguishedNames? dn}) String?
toJson() Map<String, dynamic>
toMap() Map<String, dynamic>
toString() String
A string representation of this object. [...]
override

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Methods

decodeToDER({required dynamic pemData}) Uint8List?
Read possible PEM encoding
fromData({required Uint8List data}) X509Certificate
fromDerData({required Uint8List der}) X509Certificate
fromPemData({required Uint8List pem}) X509Certificate

Constants

beginPemBlock → const String
"-----BEGIN CERTIFICATE-----"
endPemBlock → const String
"-----END CERTIFICATE-----"