SSL 证书 - OS X Mavericks [英] SSL Certificates - OS X Mavericks

查看:20
本文介绍了SSL 证书 - OS X Mavericks的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试连接到本地主机上使用 SSL 的应用程序.我正在使用 Mac OS X Mavericks.我得到的错误如下:

I am trying to connect to application on localhost which uses SSL. I am using Mac OS X Mavericks. The error I am getting is following:

Error sending cURL get request to https://dev.site.com:5555/version  
Error code: 60 Error msg: SSL certificate problem: Invalid certificate chain

我尝试将证书添加到链中:

I tried to add certificates to the chain:

/usr/bin/security add-trusted-cert -d -r trustRoot -k "/Library/Keychains/System.keychain" /etc/path/ca_key.pem 

仍然遇到同样的错误.

推荐答案

--cacert--cert 在 OSX Mavericks 中被破坏.

--cacert and --cert are broken in OSX Mavericks.

您可以在此处阅读更多信息:https://groups.google.com/forum/#!topic/munki-dev/oX2xUnoQEi4

You can read more about it here: https://groups.google.com/forum/#!topic/munki-dev/oX2xUnoQEi4

解决方法在这里:http://curl.haxx.se/mail/archive-2013-10/0036.html 表示需要将证书导入为可信系统证书:

The workaround is here: http://curl.haxx.se/mail/archive-2013-10/0036.html which indicates that you need to import the certificate as a trusted system cert:

使用 Keychain Access 将证书导入系统(系统")或用户(登录")钥匙串,并将其标记为对于 SSL 和 X.509 基本策略始终受信任.

Import the certificate into the system ("System") or user ("login") keychain using Keychain Access and mark it as always trusted for SSL and X.509 basic policy.

这篇关于SSL 证书 - OS X Mavericks的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆