This commit is contained in:
xiaojunnuo
2024-09-30 18:00:51 +08:00
parent 8d42273665
commit 17a9beb514
12 changed files with 149 additions and 22 deletions

View File

@@ -65,6 +65,13 @@ export class CertReader {
return { detail, expires };
}
getAllDomains() {
const { detail } = this.getCrtDetail();
const domains = [detail.domains.commonName];
domains.push(...detail.domains.altNames);
return domains;
}
saveToFile(type: "crt" | "key" | "pfx" | "der" | "ic", filepath?: string) {
if (!this.cert[type]) {
return;