CertificateInformation constructor
CertificateInformation(
- X509Certificate? certificate,
- bool valid
Implementation
CertificateInformation(X509Certificate? certificate, bool this.valid) {
rawCert = certificate;
var splittedSubject = _splitSubject(rawCert!.subject);
subjectCommonName = splittedSubject['CN'];
subjectOrganization = splittedSubject['O'];
subjectAlternativeNames = _getSubjectAlternativeNames();
var splittedIssuer = _splitSubject(rawCert!.issuer);
issuerCommonName = splittedIssuer['CN'];
issuerOrganization = splittedIssuer['O'];
issuerCountry = splittedIssuer['C'];
var extractedEvOids = _extractEvOids();
if (extractedEvOids.isNotEmpty) {
for (var element in extractedEvOids) {
if (_evOIDs.contains(element)) {
isEvCert = true;
}
}
}
}