requestCert不工作(Node.js)

我试图使用客户端身份validation,但requestCert不起作用。 加载站点时,没有提示select证书。

var https = require('https'); var fs = require('fs'); var options = { key: fs.readFileSync('/etc/pki/tls/private/ca.key'), cert: fs.readFileSync('/etc/pki/tls/certs/ca.crt'), // This is necessary only if using the client certificate authentication. requestCert: true, // This is necessary only if the client uses the self-signed certificate. ca: [ fs.readFileSync('/etc/pki/tls/private/device.key') ] }; https.createServer(options, function (req, res) { res.writeHead(200); res.write("Hello.\n"); if(req.client.authorized) { res.write('Access granted.\n'); } else { res.write('Access denied.\n'); } res.end(); }).listen(5000); 

怎么了? 我已经使用示例代码! 谢谢。