<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi, <br>
<br>
I am trying to use OpenSSL 3 in FIPS mode to load a PKCS#12. First, I got this error:
<br>
<br>
    [root@q032 ~]# openssl pkcs12 -nokeys -info -in agent.p12 -passin pass:opsware_admin
<br>
    MAC: sha256, Iteration 2048 <br>
    MAC length: 32, salt length: 8 <br>
    Error verifying PKCS12 MAC; no PKCS12KDF support. <br>
    Use -nomacver if MAC verification is not required. <br>
<br>
To my understanding, PKCS12KDF used for PKCS12 MAC is non-FIPS. On openssl-pkcs12 man page I found the following two options: "-nomac" & "-nomacver" that can be useful in FIPS mode. Used "-nomac" to re-create the PKCS#12, and "-nomacver" when loading the PKCS#12
 to get rid of "Warning: MAC is absent!". <br>
<br>
The objective is to do the same thing via PKCS12_parse API. The problem that I'm facing is that there is no API equivalent for -nomacver and the following error occurs:
<br>
<br>
    4087FE21197F0000:error:1180006C:PKCS12 routines:(unknown function):mac absent:crypto/pkcs12/p12_mutl.c:182:
<br>
    4087FE21197F0000:error:11800071:PKCS12 routines:(unknown function):mac verify failure:crypto/pkcs12/p12_kiss.c:71:
<br>
<br>
The error only occurs if PKCS#12 password is not empty. If password is empty, MAC is not verified.
<br>
Am I missing something, or this is actually impossible to achieve? <br>
<br>
Thanks, <br>
<br>
Florin Spatar<br>
</div>
</body>
</html>