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);
}
});
}