主页

索引

模块索引

搜索页面

mac的p12导出私钥

p12文件:

/files/encrypts/apns-dev-key.p12

导出无私钥的证书文件:

openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12
Bag Attributes
    friendlyName: Apple Development IOS Push Services: com.wei64.octopus
    localKeyID: 7F 0E 83 38 DF C0 1A 04 75 E1 95 21 A0 83 61 C0 8A E5 05 0B 
subject=/UID=com.wei64.octopus/CN=Apple Development IOS Push Services: com.wei64.octopus/OU=6VMJ9DSG5J/C=CN
issuer=/C=US/O=Apple Inc./OU=Apple Worldwide Developer Relations/CN=Apple Worldwide Developer Relations Certification Authority
-----BEGIN CERTIFICATE-----
MIIFhzCCBG+gAwIBAgIIA5NhHm0FzCcwDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV
BAYTAlVTMRMwEQYDVQQKDApBcHBsZSBJbmMuMSwwKgYDVQQLDCNBcHBsZSBXb3Js
ZHdpZGUgRGV2ZWxvcGVyIFJlbGF0aW9uczFEMEIGA1UEAww7QXBwbGUgV29ybGR3
aWRlIERldmVsb3BlciBSZWxhdGlvbnMgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkw
HhcNMTgwODAxMDYwMDM1WhcNMTkwODAxMDYwMDM1WjCBhjEhMB8GCgmSJomT8ixk
AQEMEWNvbS53ZWk2NC5vY3RvcHVzMT8wPQYDVQQDDDZBcHBsZSBEZXZlbG9wbWVu
dCBJT1MgUHVzaCBTZXJ2aWNlczogY29tLndlaTY0Lm9jdG9wdXMxEzARBgNVBAsM
CjZWTUo5RFNHNUoxCzAJBgNVBAYTAkNOMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEAu+CJUERgJI+YcJHMMmdfy6hPPShFBsg/AQjV2Kx7xFDgOS+80n1j
ClNYnF3oFlQ6MVOhqHGHN/dcKB1w8VBmr42c+vIisjGAI8TLmmnlYvC2oV3fRtCs
UodcLsn5owjvPb1Cih7gFTM8m/pkCnhmGjEwgJJLbx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JsIz3qjPr
blVT1issE0GIHxPlRENZ7txLgwMFchBCZosc26RXvQRAiADxICrk1br8E41p7E+7
MIeUGNRIfx0F3FBn1njkz1HS2gbZcwK9FLcGsz5qtKgGnGylmQMf1IgLBdoqa6tp
lONQ5oGHN7HYJPczb1dVutASzDXdXwVNIgXW
-----END CERTIFICATE-----

导出私钥:

openssl pkcs12 -nocerts -nodes -out apns-dev-key.pem -in apns-dev-key.p12
Bag Attributes
    friendlyName: octopus
    localKeyID: 7F 0E 83 38 DF C0 1A 04 75 E1 95 21 A0 83 61 C0 8A E5 05 0B 
Key Attributes: <No Attributes>
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC74IlQRGAkj5hw
kcwyZ1/LqE89KEUGyD8BCNXYrHvEUOA5L7zSfWMKU1icXegWVDoxU6GocYc391wo
HXDxUGavjZz68iKyMYAjxMuaaeVi8LahXd9G0KxSh1wuyfmjCO89vUKKHuAVMzyb
+mQKeGYaMTCAkktvH1E4mbEKrtfYmrEUkALGxIkDsgjuyQwo5VyriOSDZyLy0Aj4
FL+Bh3QthC8ra3PMt6eyrCemR48BgCk1TcG1Dnv2G9ufrF+35ZQoRzh41mqKGJOQ
9URybjtZVhM3hTiHAA/enuiRQmfTboUkuGYPlJueE7bOMrAEGYNGTPcKeKh7Hr/9
DYpU0cA9AgMBAAECggEAR6jkFwaNeUSAC2fA7/S3+DERUC1c7rJQPa/GCSf46S9D
5uwLZGnI7fZOVQ4IaQPlUk0o2tu6jKE/uFlKa/CTyiAEoT7b9wWkb4AvfI0pnixc
LH5mnFcZcz0H7xzAp+vPfMgEajROmid51bCSmd/EafcbHd8vAIp8a09L1NxNneLy
XwFnbBeAETURlgC7yEEiKO+HiPiA9/ggCZfOyd6QZ8e8Lpktr+KA2ddg+VJ5PCTU
mdaX2UBC20e2FL0ZQz8gaC4qpLgkbP2LZrxpcx+VbMLN7fYhw72H6kqf9FI+MnBT
9vKkZ1a8dwdOQdTP0mto6onabD5iXfTqbibv3VbpTQKBgQD3ubTX40ujKl0n6DqV
lus2zi4Qaomi2eF12bYC/S2FV3DqhFdjiiAbo2qtL8a/7gNWkLvVYjaF7TRoKOSf
Q4JHtzbUSTLFhn87B6uGZDv2IsMHzsgcbJyx5VYc8V+bBdM9qh1V5yFYYSreAEWy
mebYG5/JIUiRPi4VwhoD+qyJ1wKBgQDCJxGLSL+h5CJ5Sp3OhaMnmEAK+YlzhC1X
1cWGEVQVGAw+Ol0xdieVG/u3jg2r2aeaYYTJbu8lZ7jJzZ0jVIX/2sdCss0EhbwP
QeX7DpXPOw7Fo1ag7EI1oqiUQDM6tH1cRqqN84ML4FIqLgdauGXHdrhP3AziqpRt
sZT3peRMCwKBgFdITEqgoD7OJ2JvNW0NbrSxspNAJlyFriWq3rFw6QAJThSjKnM8
8JEsY+K/aaSoRO7UMgo9/33ylLt6ZQskaxu/lwb2/3ePKvbufeXtHR9dIiB3IBS7
w/3+EvhBp3DkfYhFju58cEhGfCcaK3SBO0+7c/IW0w2xveUWrbnnMbGjAoGBAInq
asIASXBcuEhkwrijoYRM2KFzJTqTmAoe5pMX2Byr2naRywWJoxB+sk5vcDK1CCPY
RhU44lQ128QudQNV1WIsLQOqM4yU20QTUaUHdU+h6hpmrvDdIyMqionVGQ8Ii0xz
PlBbvKlBDdy8majN+C66nK7N57FT7uAFF4bbptKFAoGAAhdd5EVBbZYm5146iL1R
t4Ha51TmjsWNfY2MTDUrdAh+e/ZNM0HUx5qlnWDotWCmrdqiYaPnCdhCj+GXa4AO
ex2k1FsWHDApv2HL+1eybEbPvcM+9aSRytHomRRtrFazrvu6FVde8t/39mlpV0xr
md7RePNayXdEbK+Vm8jYli8=
-----END PRIVATE KEY-----

去掉私钥中的密码:

openssl rsa -in apns-dev-key.pem -out apns-dev-key-noenc.pem
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAu+CJUERgJI+YcJHMMmdfy6hPPShFBsg/AQjV2Kx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RLGPiv2mkqETu1DIKPf998pS7emULJGsb
v5cG9v93jyr27n3l7R0fXSIgdyAUu8P9/hL4Qadw5H2IRY7ufHBIRnwnGit0gTtP
u3PyFtMNsb3lFq255zGxowKBgQCJ6mrCAElwXLhIZMK4o6GETNihcyU6k5gKHuaT
F9gcq9p2kcsFiaMQfrJOb3AytQgj2EYVOOJUNdvELnUDVdViLC0DqjOMlNtEE1Gl
B3VPoeoaZq7w3SMjKoqJ1RkPCItMcz5QW7ypQQ3cvJmozfguupyuzeexU+7gBReG
26bShQKBgAIXXeRFQW2WJudeOoi9UbeB2udU5o7FjX2NjEw1K3QIfnv2TTNB1Mea
pZ1g6LVgpq3aomGj5wnYQo/hl2uADnsdpNRbFhwwKb9hy/tXsmxGz73DPvWkkcrR
6JkUbaxWs677uhVXXvLf9/ZpaVdMa5ne0XjzWsl3RGyvlZvI2JYv
-----END RSA PRIVATE KEY-----

合并私钥和证书:

cat apns-dev-cert.pem apns-dev-key-noenc.pem > apns-dev.pem
Bag Attributes
    friendlyName: Apple Development IOS Push Services: com.wei64.octopus
    localKeyID: 7F 0E 83 38 DF C0 1A 04 75 E1 95 21 A0 83 61 C0 8A E5 05 0B 
subject=/UID=com.wei64.octopus/CN=Apple Development IOS Push Services: com.wei64.octopus/OU=6VMJ9DSG5J/C=CN
issuer=/C=US/O=Apple Inc./OU=Apple Worldwide Developer Relations/CN=Apple Worldwide Developer Relations Certification Authority
-----BEGIN CERTIFICATE-----
MIIFhzCCBG+gAwIBAgIIA5NhHm0FzCcwDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV
BAYTAlVTMRMwEQYDVQQKDApBcHBsZSBJbmMuMSwwKgYDVQQLDCNBcHBsZSBXb3Js
ZHdpZGUgRGV2ZWxvcGVyIFJlbGF0aW9uczFEMEIGA1UEAww7QXBwbGUgV29ybGR3
aWRlIERldmVsb3BlciBSZWxhdGlvbnMgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkw
HhcNMTgwODAxMDYwMD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GA1UdJQQMMAoGCCsGAQUFBwMCME0GA1Ud
HwRGMEQwQqBAoD6GPGh0dHA6Ly9kZXZlbG9wZXIuYXBwbGUuY29tL2NlcnRpZmlj
YXRpb25hdXRob3JpdHkvd3dkcmNhLmNybDAdBgNVHQ4EFgQUfw6DON/AGgR14ZUh
oINhwIrlBQswCwYDVR0PBAQDAgeAMBAGCiqGSIb3Y2QGAwEEAgUAMA0GCSqGSIb3
DQEBBQUAA4IBAQBuey1+dq5C+jiGvng2/rBjuMxkrIpW8d/qX5nIi+JI0OxoIkyc
FVNcBU6sZjoywP7VmyMaMsQ5XK1PmfkL6KOBthM0pmlgbBeO9kNMUlatcqS2b2Rs
4D+Q958nq6nOG/SFIaNnQe2bBpm0xc27SyqftLjrXAIgaPI/CxrSK/sJsIz3qjPr
blVT1issE0GIHxPlRENZ7txLgwMFchBCZosc26RXvQRAiADxICrk1br8E41p7E+7
MIeUGNRIfx0F3FBn1njkz1HS2gbZcwK9FLcGsz5qtKgGnGylmQMf1IgLBdoqa6tp
lONQ5oGHN7HYJPczb1dVutASzDXdXwVNIgXW
-----END CERTIFICATE-----
Bag Attributes
    friendlyName: octopus
    localKeyID: 7F 0E 83 38 DF C0 1A 04 75 E1 95 21 A0 83 61 C0 8A E5 05 0B 
Key Attributes: <No Attributes>
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC74IlQRGAkj5hw
kcwyZ1/LqE89KEUGyD8BCNXYrHvEUOA5L7zSfWMKU1icXegWVDoxU6GocYc391wo
HXDxUGavjZz68iKyMYAjxMuaaeVi8LahXd9G0KxSh1wuyfmjCO89vUKKHuAVMzyb
+mQKeGYaMTCAkktvH1E4mbEKrtfYmrEUkALGxIkDsgjuyQwo5VyriOSDZyLy0Aj4
FL+Bh3QthC8ra3PMt6eyrCemR48BgCk1TcG1Dnv2G9ufrF+35ZQoRzh41mqKGJOQ
9URybjtZVhM3hTiHAA/enuiRQmfTbo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