X509Certificate class

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>?
getter/setter pair
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).
no setter
authorityKeyIdentifier AuthorityKeyIdentifierExtension?
Gets the raw bits from the Authority Key Identifier extension, (OID = 2.5.29.35).
no setter
basicConstraints BasicConstraintExtension?
Gets the certificate constraints path length from the critical BasicConstraints extension, (OID = 2.5.29.19).
no setter
block1 ASN1Object?
getter/setter pair
certificatePolicies CertificatePoliciesExtension?
Gets the list of certificate policies from the CertificatePolicies extension, (OID = 2.5.29.32).
no setter
criticalExtensionOIDs List<String>
Get a list of critical extension OID codes
no setter
cRLDistributionPoints CRLDistributionPointsExtension?
Gets the list of CRL distribution points from the CRLDistributionPoints extension, (OID = 2.5.29.31).
no setter
description String
no setter
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.
getter/setter pair
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).
no setter
extensionBlocks List<ASN1Object>?
no setter
hashCode int
The hash code for this object.
no setterinherited
issuerAlternativeNames List<String>
Gets a collection of issuer alternative names from the IssuerAltName extension, (OID = 2.5.29.18).
no setter
issuerDistinguishedName String?
Returns the issuer (issuer distinguished name) value from the certificate as a String.
no setter
issuerOIDs List<String>
no setter
keyUsage List<bool>
Gets a boolean array representing bits of the KeyUsage extension, (OID = 2.5.29.15).
no setter
nonCriticalExtensionOIDs List<String>
Get a list of non critical extension OID codes
no setter
notAfter DateTime?
Gets the notAfter date from the validity period of the certificate.
no setter
notBefore DateTime?
Gets the notBefore date from the validity period of the certificate.
no setter
publicKey X509PublicKey?
Gets the informations of the public key from this certificate.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serialNumber List<int>?
Gets the serialNumber value from the certificate.
no setter
sigAlgName String?
Gets the signature algorithm name for the certificate signature algorithm.
no setter
sigAlgOID String?
Gets the signature algorithm OID string from the certificate.
no setter
sigAlgParams List<int>?
Gets the DER-encoded signature algorithm parameters from this certificate's signature algorithm.
no setter
signature List<int>?
Gets the signature value (the raw signature bits) from the certificate.
no setter
subjectAlternativeNames List<String>
Gets a collection of subject alternative names from the SubjectAltName extension, (OID = 2.5.29.17).
no setter
subjectDistinguishedName String?
Returns the subject (subject distinguished name) value from the certificate as a String.
no setter
subjectKeyIdentifier SubjectKeyIdentifierExtension?
Gets the raw bits from the Subject Key Identifier (SKID) extension, (OID = 2.5.29.14).
no setter
subjectOIDs List<String>
no setter
version int?
Gets the version (version number) value from the certificate.
no setter

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 nonexistent 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
endPemBlock → const String