0

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

Community
  • 1
  • 1
pd1
  • 23
  • 5
  • If you get one of those errors then the page won't load... if you ignore the error and continue anyway Chrome doesn't throw an error. Is this what you're really trying to do, or are you trying to help with mixed-content errors? – nbering Nov 14 '16 at 01:41
  • @nbering Thank you for the prompt reply. I only need to play a sound as soon as the page loads irrespective whether user wishes to continue with that insecure page or not. – pd1 Nov 14 '16 at 01:43

0 Answers0