Adds SSL cert checking results

This commit is contained in:
Alicia Sykes
2023-06-20 23:02:31 +01:00
parent 7b2c27c0b1
commit b17c2f0b2d
3 changed files with 128 additions and 4 deletions

View File

@@ -75,8 +75,11 @@ export interface HostNames {
hostnames: string[],
};
export const getHostNames = (response: any): HostNames => {
export const getHostNames = (response: any): HostNames | null => {
const { hostnames, domains } = response;
if ((!domains || domains.length < 1) && (!hostnames || hostnames.length < 1)) {
return null;
}
const results: HostNames = {
domains: domains || [],
hostnames: hostnames || [],