
我從一家公司收到了一個 PFX 文件,以便使用他們的 VPN。對於 openfortivpn,我需要兩個 PEM 檔案來傳遞--user-cert=cert.pem --user-key=key.pem
,因此我使用openssl pkcs12 -in REDACTED.pfx -nocerts -out key.pem -nodes
和openssl pkcs12 -in REDACTED.pfx -clcerts -nokeys -out cert.pem
來提取它們。他們在我的 VirtualBox VM 上使用 Ubuntu 22.10 進行工作。然後我把我的筆記型電腦送去更換SSD(錯誤地用比廣告上說的小一點的SSD出售),當它回來時我設置了一個虛擬機,這次是Ubuntu 22.04(結果證明是必要的) ,但它不起作用。
命令是sudo openfortivpn REDACTED:11443 -u REDACTED -p REDACTED --trusted-cert REDACTED --user-cert=~/dev/cert.pem --user-key=~/dev/key.pem
。其輸出:
WARN: You should not pass the password on the command line. Type it interactively or use a configuration file instead.
ERROR: SSL_CTX_use_certificate_chain_file: error:0A080002:SSL routines::system lib
INFO: Closed connection to gateway.
ERROR: SSL_CTX_use_certificate_chain_file: error:0A080002:SSL routines::system lib
INFO: Could not log out.
將安全等級變更openssl.cfn
為 1 甚至 0,如建議的那樣這個答案並證實了這個,沒有幫助。我想應該在伺服器端完成,但我無法做到這一點。
我是否正確地假設最可能的原因是他們同時更改了伺服器上 OpenSSL 的預設安全等級?而不是現在我的不同(舊)版本的Ubuntu?
我該如何解決這個問題?
在我看來,由於我在 PFX 檔案中同時擁有私鑰和公鑰,所以我應該能夠產生我想要的任何格式的金鑰,包括不能產生的 PEM 檔案(預設是這樣,至少當該PFX 檔案作為輸入給出)使用MD5,從而滿足更高的安全要求。如果這是正確的方法,那麼需要什麼命令?