One or more parameters passed to a function were not valid

Viewed 738

I am trying to import the Certificates to iOS Simulator from Keychain app. When I drag and drop the certificate in the Simulator. It shows this popup.

enter image description here

Important observation

When I drag and drop a Root certificate it is imported successfully but when I try the same thing with Standard certificate, it fails to do that.

enter image description here

Blue certificates are : standard certificates
Golden certificates are: root certificate

1 Answers

This is likely caused by the errSecParam from the Security framework. Either your certificate contains items the Keychain doesn't support, or the format is something the Keychain cannot decode.

You could try to transform your certificate from PEM/NET to DER and attempt the import again. The OpenSSL command to do so is:

openssl x509 -inform PEM -outform DER -in <cert_file> -out <cert_out_file>

Related