从P12 / PEM文件获取包ID [英] Get bundle id from p12/pem file

查看:457
本文介绍了从P12 / PEM文件获取包ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能获得P12 / PEM文件的应用程序的捆绑ID为APNS?

Is it possible to get application's bundle id from p12/pem file for APNS?

我有一个系统,用户可以上传自己的推证(P12或PEM)和将是巨大的向他出示有关包ID的信息,以便用户能够检查他上传了哪些

I have a system where user can upload his push certificate (p12 or pem) and would be great to show him an info about bundle id so user will be able to check what he uploaded

推荐答案

我不知道它是否是100%的帮助,但你可以从OpenSSL库通过以下方式使用命令行工具

I'm not sure whether it's 100% helpful but you can use command line tool from openssl library in the following manner

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就是你要找的东西。

where com.mybundle.domain is what you're looking for.

这篇关于从P12 / PEM文件获取包ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆