On macOS 15.0 security import -f pkcs12 does not accept unencrypted PKCS#12 containers that are generated by OpenSSL. The command terminates with exist code 1 and emits an error:
Alter action keychain add-certificates to use attempt certificate import with openssl format if initial import with pkcs12 format fails such that error message contains Unable to decode the provided data.
On macOS 15.0
security import -f pkcs12
does not accept unencrypted PKCS#12 containers that are generated by OpenSSL. The command terminates with exist code 1 and emits an error:The very same certificate can be still imported when
-f
switch value is changed toopenssl
:Alter action
keychain add-certificates
to use attempt certificate import withopenssl
format if initial import withpkcs12
format fails such that error message containsUnable to decode the provided data
.Updated actions:
keychain add-certificates