0

在尝试使用 openssl 工具分两个阶段将 PKCS12 格式的私钥文件转换为 PEM 格式(Wireshark 使用)时,出现以下错误

PS C:\OpenSSL-Win64\bin> openssl pkcs12 -nodes -in test_cer123456.pfx -out key.pem -nocerts -nodes
openssl : The term 'openssl' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At line:1 char:1
+ openssl pkcs12 -nodes -in test_cer123456.pfx -out key.pem -nocerts -nodes
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (openssl:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


Suggestion [3,General]: The command openssl was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by
default. If you trust this command, instead type ".\openssl". See "get-help about_Command_Precedence" for more details.
PS C:\OpenSSL-Win64\bin>

有人可以帮我解决这个问题吗?

注意:我正在关注这篇文章

4

1 回答 1

0

Powershell 不包含当前目录作为搜索路径的一部分。错误消息实际上告诉了您这一点并解释了要做什么(添加了重点):

建议[3,General]:openssl 命令未找到,但当前位置确实存在。默认情况下,Windows PowerShell 不会从当前位置加载命令。如果您信任此命令,请键入“.\openssl”。有关更多详细信息,请参阅“获取关于_Command_Precedence 的帮助”。

于 2015-07-13T12:14:53.013 回答