macos 您所在的位置:网站首页 curl60ssl macos

macos

#macos| 来源: 网络整理| 查看: 265

Root doesn't read from the current user trust settings, but there are both an admin trust settings and root-user-specific trust settings. (These are also distinct from the system trust settings.) Note, also, that certificate trust settings are somewhat distinct from just adding a certificate to a keychain; you can mark a cert as trusted without fully adding it. (The exact situation here is not clear to me, and the docs I've seen are vague.)

You can mark a cert as trusted for your current user as

$ security add-trusted-cert /path/to/cert.pem

but that doesn't help with root. The solution, as you might now guess, is either to sudo the above, which then marks it as trusted for the root user specifically:

$ sudo security add-trusted-cert /path/to/cert.pem

or to use the -d flag to add it to the admin trust settings:

$ security add-trusted-cert -d /path/to/cert.pem

(OS X will pop up a password dialog to confirm this one.)

Either of the latter two seems to be sufficient for sudo curl.

Reference: https://developer.apple.com/library/mac/Documentation/Darwin/Reference/ManPages/man1/security.1.html



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有