我尝试在Windows 上使用curl 来发布时间戳请求。需要认证,所以我使用p12文件。我收到错误消息,但 p12 文件的密码是正确的。
命令:
curl --insecure --cert-type P12 --cert my.p12:mypassword -X POST -d @mytest.req <myTSURL>
Run Code Online (Sandbox Code Playgroud)
错误信息:
curl: (58) 无法解析 PKCS12 文件,检查密码,OpenSSL 错误 error:0308010C:数字信封例程::不支持
卷曲-V
curl 7.83.1 (x86_64-pc-win32) libcurl/7.83.1 OpenSSL/3.0.2 (Schannel) zlib/1.2.12 brotli/1.0.9 libidn2/2.3.2 libssh2/1.10.0 nghttp2/1.47.0 ngtcp2/0.5.0 nghttp3/0.4.1 libgsasl/1.10.0
Release-Date: 2022-05-11
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli gsasl HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Kerberos Largefile …Run Code Online (Sandbox Code Playgroud) 我们正试图从我们的合作伙伴那里实现Web服务的某些功能.现在,传输的内容应该使用我们必须提供的公钥加密.
安全规范说公共证书必须是X.509标准.X.509不依赖于私钥/公钥方法吗?因为我只使用以下命令获得一个.pem文件,包含私钥和证书,但没有公钥:
openssl req -new -x509 -days 365 -nodes -out ./cert.pem -keyout ./cert.pem
Run Code Online (Sandbox Code Playgroud)
我是否必须修改命令才能创建私钥和公钥?