user4068530
user4068530

Reputation:

How to check content of certificate.p12 WITHOUT installing on the Keychain or accessing apple portal

I have an iOS certificate.p12 file, is it possible to check the content of .P12 file (iOS certificate + public key) and be sure that it is a correct Distribution certificate and not (development or wildcard), I know it is possible via Apple portal or with installing the certificate on the keychain but is there a way to check the content of this file and be sure that it is a distribution Certificate with out apple portal check and without installing the file?

Thanks in advance!

Update:

what I want is to check the customers distribution certificate.p12, instead of installing their certificate in my keychain each time, I want to have a mechanism to check the content of certificate and let me know that this certificate is not expired and also it is distribution certificate, I want to know if it is possible or not?

1.Expiration Date

  1. It it is Distribution or not

Upvotes: 16

Views: 43827

Answers (2)

Kevin De Keyser
Kevin De Keyser

Reputation: 11

Nowadays you need to add -legacy to the command:

openssl pkcs12 -in certificate.p12 -out certificate.pem -nodes -legacy
cat certificate.pem | openssl x509 -noout -enddate

Upvotes: 1

Dilar
Dilar

Reputation: 1061

to check the expiration date : first extract .p12 to .pem :

openssl pkcs12 -in certificate.p12 -out certificate.pem -nodes

then get the expiration date :

cat certificate.pem | openssl x509 -noout -enddate

Upvotes: 26

Related Questions