从p12/pem文件获取软件包ID

Rub*_*con 9 pkcs#12 pem apple-push-notifications ios

是否可以从AP12的p12/pem文件获取应用程序的包ID?

我有一个系统,用户可以上传他的推送证书(p12或pem),很高兴向他展示有关捆绑ID的信息,以便用户可以检查他上传的内容

hex*_*mal 14

我不确定它是否100%有用,但您可以通过以下方式使用openssl库中的命令行工具

openssl pkcs12 -info -in mycert.p12 -passin pass:MyCertPassPhrase
Run Code Online (Sandbox Code Playgroud)

这将产生您可以解析的输出

MAC Iteration 1
MAC verified OK
PKCS7 Encrypted data: pbeWithSHA1And40BitRC2-CBC, Iteration 2048
Certificate bag
Bag Attributes
    friendlyName: Apple Production IOS Push Services: com.mybundle.domain
    localKeyID: F2 FZ 5D 00 44 73 F1 64 B8 FF EF 37 82 BC 13 F4 81 6A B2 14 
subject=/UID=com.mybundle.domain/CN=Apple Production IOS Push Services: com.mybundle.domain/OU=Q7QX7A5JZ7/C=RU
issuer=/C=US/O=Apple Inc./OU=Apple Worldwide Developer Relations/CN=Apple Worldwide Developer Relations Certification Authority
-----BEGIN CERTIFICATE-----
MIIFeTCCBGGgAwIBAgIILW8Tn/Z054IwDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV
Run Code Online (Sandbox Code Playgroud)

com.mybundle.domain就是你要找的地方.

  • 我们如何在Java中做到这一点? (2认同)