Tôi đang thử nghiệm truy cập SSL tới server nút địa phương với chìa khóa, ca, cert trong các tùy chọn (self-signed w OpenSSL)SSL Giấy chứng nhận lỗi
var server_options = {
key: fs.readFileSync('/etc/ssl/self-signed/server.key'),
ca: fs.readFileSync('/etc/ssl/self-signed/server.csr'),
cert: fs.readFileSync('/etc/ssl/self-signed/server.crt')
};
cố gắng để truy cập vào nó:
curl -v --user 1234567890:abcdefghijklmnopqrstuvwxyz --data "grant_type=password&username=yves&password=123456789" https://macMini.local:8000/oauth/token
sử dụng curl Tôi nhận được lỗi sau:
curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Tôi đã tải xuống chứng chỉ ca từ http://curl.haxx.se/ca/cacert.pem và thêm chúng vào curl-c của tôi một bó new.crt tập tin, như đề xuất trong một số bài viết liên quan đến cuộn tròn ... nhưng không có cách nào
đây là nhật ký
- About to connect() to macMini.local port 8000 (#0)
- Trying 192.168.1.14...
- connected
- Connected to macMini.local (192.168.1.14) port 8000 (#0)
- SSLv3, TLS handshake, Client hello (1):
- SSLv3, TLS handshake, Server hello (2):
- SSLv3, TLS handshake, CERT (11):
- SSLv3, TLS alert, Server hello (2):
- SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
- Closing connection #0 curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed More details here: http://curl.haxx.se/docs/sslcerts.html
Tôi biết tôi có thể bỏ qua việc kiểm tra Curl CA, sử dụng:
curl -k -v --user 1234567890:abcdefghijklmnopqrstuvwxyz --data "grant_type=password&username=yves&password=123456789" https://macMini.local:8000/oauth/token
trong trường hợp nó đang chạy tốt mà, tôi có thể thấy:
SSL certificate verify result: self signed certificate (18), continuing anyway.
nhưng tôi muốn biết nếu có bất kỳ cách t o giải quyết vấn đề này ...
cảm ơn, tôi chỉ gặp một số khó khăn khi tìm thấy cacert.pem nằm trên OSX (10.8) xem ở trên .... – erwin