【问题标题】:Get bundle id from p12/pem file从 p12/pem 文件中获取 bundle id
【发布时间】:2015-05-24 03:10:03
【问题描述】:

是否可以从 APNS 的 p12/pem 文件中获取应用程序的 bundle id?

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

【问题讨论】:

    标签: ios apple-push-notifications pem pkcs#12


    【解决方案1】:

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

    openssl pkcs12 -info -in mycert.p12 -passin pass:MyCertPassPhrase
    

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

    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
    

    com.mybundle.domain 是您要查找的内容。

    【讨论】:

    • 我们如何在 java 中做到这一点,知道吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-30
    • 1970-01-01
    • 1970-01-01
    • 2014-06-26
    • 1970-01-01
    • 2021-12-30
    相关资源
    最近更新 更多