I try to use tcl package pki::sign. The goal is to sign a SOAP message with a X509 certificate, using tclws.
Parsing the public key is OK :
pki::x509::parse_cert $publickey
However, parsing the private key does not work
pki::pkcs::parse_key $privatekey
It results in the following error :
"Expected Sequence (0x30), but got 42"
The certificate was provided to me as a .p12 file. I could get the public and private key with openssl with the following commands :
Public key :
openssl pkcs12 -in cert.p12 -clcerts -nokeys -out cert.pem
Private key :
openssl pkcs12 -in cert.p12 -nocerts -nodes -out key.pem