chrome.platformKeys.selectClientCertificates for Chrome App

33 views
Skip to first unread message

Harry Lee

unread,
May 29, 2016, 6:07:16 PM5/29/16
to chromi...@chromium.org
Hi, 

My app needs to check if a CA certificate is installed on Chrome. I've read chrome.platformKeys.selectClientCertificates documentation, and it looks like something that I need.

Tried something like this, it never returns or pops up a cert dialog, don't know what is wrong.

var details = {

   interactive: true,

   request: {

            certificateTypes:["rsaSign", "ecdsaSign"],

            certificateAuthorities:[]

    }

    }

    if (chrome.platformKeys != undefined) {

    chrome.platformKeys.selectClientCertificates(details, 

    function(matches) {

        console.log("matches", matches);

        if (matches) {

            var match = matches[0];

            console.error(match.certificate);

            console.log(match.keyAlgorithm.name);

            console.log(match.keyAlgorithm.modulusLength);

            console.log(match.keyAlgorithm.publicExponent); 

        }

    }); 

}

Please help,
Thanks,
H
Reply all
Reply to author
Forward
0 new messages