I am trying to do the equivalent of this openssl command programmatically, which works fine:
openssl pkcs12 -in filename.p12 -nokeys -out output.crt
However, when I try this:
if (PKCS12_parse(p12, "password", &pkey, &x509_cert, nullptr) == 0) {
throw MyException("PKCS12_parse failed");
}
pkey and x509_cert are returned as null and no exception is thrown.
p12 was created with "nokeys":
openssl pkcs12 -export -nokeys -in input.crt -out filename.p12