wezzard
V2EX  ›  macOS

包含 macOS 的環境中自建 PKI 的一個坑。

  •  
  •   wezzard · Jun 15, 2018 · 1871 views
    This topic created in 2913 days ago, the information mentioned may be changed or developed.

    一堆私人設備,不想用 Let's Encrypt 的證書,於是自己建了一個 PKI,私鑰加密算法全部選的是 secp521r1。這個算法在大多數情況下工作得蠻好的,但是由於蘋果在 macOS 的某個版本後使用了 libressl 替代以前的 OpenSSL,而這個算法在 libressl 中不是默認算法,在 macOS 中使用依賴系統自帶 curl 的工具用 TLS 訪問證書私鑰加密算法是這個的服務就總是出錯。

    < HTTP/1.1 200 Connection established
    < 
    * Proxy replied OK to CONNECT request
    * ALPN, offering http/1.1
    * Cipher selection: EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
    * successfully set certificate verify locations:
    *   CAfile: CA 證書文件路徑
      CApath: none
    * error:14004410:SSL routines:CONNECT_CR_SRVR_HELLO:sslv3 alert handshake failure
    * stopped the pause stream!
    * Closing connection 0
    

    使用 Homebrew 裝入 OpenSSL 且安裝了依賴 Homebrew OpenSSL 的 curl 和依賴 Homebrew OpenSSL 和 curl 的 git 之後就工作正常了(具體用法使用「 brew info 軟件包名字」查詢)。

    libressl 的 Github Issues 中也有類似的案例:

    https://github.com/libressl-portable/openbsd/issues/79

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2857 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 04:10 · PVG 12:10 · LAX 21:10 · JFK 00:10
    ♥ Do have faith in what you're doing.