My code is:
FILE * fp = fopen(inputdata, "r"); PKCS12 * p12 = d2i_PKCS12_fp(fp, NULL); if (p12 == NULL) { NSLog(@"Error loading PKCS12 file to p12 \n"); } if ((ret = PKCS12_verify_mac(p12,"tcs",3))){ lblmsg.text = @"password validated"; NSLog(@"Password validated %s",ppvc_pfxPassPhrase); } NSLog(@"ret value %d",ret);
I can upload the file to p12, but could not verify the PKCS12 file. I get 0 as return from PKCS12_verify_mac .
Why does it return 0?
source share