I am using below command to connect:-
curl --cert-type P12 --cert ./my.p12:password --cacert ./my-cert.pem https://host:8443/api/root
but getting this ERROR:
curl: (58) unable to load client cert: -8018 (SEC_ERROR_UNKNOWN_PKCS11_ERROR)
curl version ==:
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.53.1 zlib/1.2.7 libidn/1.28 libssh2/1.8.0
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz unix-sockets
OS version :-
CentOS Linux release 7.7.1908 (Core)
curl with -v results :
- About to connect() to host port 8443 (#0)
- Trying 10.X.X.X
- Connected to host (10.X.X.X) port 8443 (#0)
- Initializing NSS with certpath: sql:/etc/pki/nssdb
- CAfile: ./my-cert.pem CApath: none
- unable to load client cert: -8018 (SEC_ERROR_UNKNOWN_PKCS11_ERROR)
- NSS error -8018 (SEC_ERROR_UNKNOWN_PKCS11_ERROR)
- Unknown PKCS #11 error.
- Closing connection 0 curl: (58) unable to load client cert: -8018 (SEC_ERROR_UNKNOWN_PKCS11_ERROR)