I'm trying to make a chrome extension that plays a specific sound whenever a page with invalid SSL certificate is loaded.
I know that chrome gives certain warnings likes: net::ERR_CERT_AUTHORITY_INVALID err_cert_date_invalid err_cert_common_name_invalid NET::ERR_CERT_REVOKED and so on...
Is there a way to detect it via coding using chrome extensions?
This solution linked here doesn't work for me I tested it using a self-signed certificate on a dummy html page using Apache tomcat. My background page:
chrome.webRequest.onErrorOccurred.addListener(function(details) {
if (details.error == "net::ERR_CERT_AUTHORITY_INVALID")
{
console.log("Error details:",details);
}
}, {
urls: ['*://*/*'],
types: ['xmlhttprequest']
});
An example of such page is: https://www.iad.gov/nietp/CAERequirements.cfm