Hi Kaleb,
When I debug my code, I find that in function wc_PKCS12_parse, a call for DecryptContent returns error. The error message is "Decryption failed, algorithm not compiled in?".
In function DecryptContent in asn.c, a call for CheckAlgo returns error. Is there someting wrong with my pfx file? My password of the pfx file is just a word like "password". The file is generated by cmd like below:
openssl req -newkey rsa:2048 -nodes -keyout test.key -x509 -days 365 -out test.cer
openssl pkcs12 -export -in test.cer -inkey test.key -out test.pfx
It will be required to set password for the pfx file and input a word like "password".
My code is from function test_wolfSSL_PKCS12 in wolfssl/tests/api.c. It is for .p12 file. But my test file is .pfx. I have test the file with some openssl cmd, it could be simply transfered into .pem file with certificate and private key.
So shall I firstly transfer the .pfx file into .p12 file? Is there something wrong with the code or shall I change to use another piece of sample code?
Thanks,
Alfred