简体   繁体   English

OpenSSL 验证 PFX 密码 OK

[英]OpenSSL verify PFX password OK

I want to verify that a given password for a given PFX file works.我想验证给定 PFX 文件的给定密码是否有效。 I tried with我试过了

openssl pkcs12 -in CERT.pfx -password pass:PASSWORD -info

but the problem is it keeps asking me for the PEM password.但问题是它一直要求我输入 PEM 密码。 All I want it to output is a simple result like password OK, or general info about the file, otherwise 'invalid password'.我想要的只是 output 的简单结果,例如密码 OK,或有关文件的一般信息,否则为“无效密码”。

This will be executed from another process, so I need to avoid any interactive password prompts.这将从另一个进程执行,因此我需要避免任何交互式密码提示。

Couldn't find anything about this with Google.在 Google 上找不到任何关于此的信息。

Found it:找到了:

openssl pkcs12 -in CERT.pfx -password pass:PASSWORD -info -nokeys

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM