我尝试申请SSL证书,但它不起作用......
当我这样做时:
void main() {
SecureSocket.initialize(
database: './bin/security',
password: 'dartdart'
);
HttpServer.bindSecure('127.0.0.1', 8443, certificateName: 'Dart').then
((server) => server.listen((req) {
req.response.write('hello');
req.response.close();
}));
}
没关系,我收到了关于证书的警告信息,无论如何我都会继续,然后我得到了#hello'。
当我在bindSecure中添加requestClientCertificate标志时,浏览器要求我从列表中选择一个证书,我选择一个,我上浏览器Unable to make a secure connection to the server. This may be a problem with the server, or it may be requiring a client authentication certificate that you don't have.
Error code: ERR_SSL_PROTOCOL_ERROR
但是没有来自服务器端的错误。
我在mac os marverick上。
答案 0 :(得分:0)
尝试将证书安装到Chrome中,因为您说它是自签名的。
chrome://settings
Show advanced settings...
HTTPS/SSL -> Manage certificates...
Import... (follow the wizard)