getCertificateByDomain method
Implementation
@override
Future<bool> getCertificateByDomain(String domain, String filepath) async {
final p = await Process.run('bash', [
'-c',
"openssl s_client -showcerts -connect $domain:443 -servername $domain 2>/dev/null </dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > $filepath",
]);
if (p.exitCode == 0) {
return true;
}
return false;
}