[GH-ISSUE #281] api.push.apple.com有CA需要添加 #113

Closed
opened 2026-03-03 11:56:10 +03:00 by kerem · 0 comments
Owner

Originally created by @RuotongX on GitHub (Jul 14, 2024).
Original GitHub issue: https://github.com/Finb/bark-server/issues/281

目前我有着和 #47 一样的问题。SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
我按照相同做法获得了以下日志。
root@iStoreOS:~# curl http://0.0.0.0:8080/GBLZ3teVQDi3q3JhQDTtXC/这里改成你自己的推送内容
{"code":500,"message":"push failed: Post "https://api.push.apple.com/3/device/{MyDeviceToken}": tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match api.push.apple.com","timestamp":1720965593}

root@iStoreOS:~# curl -kiv https://api.push.apple.com/3/device/162e7d2b3b2f4508222883b8ff0ae7ba689e1d1d5d684051c150a785ff6b7846%5C

  • Trying 17.188.143.9:443...
  • Connected to api.push.apple.com (17.188.143.9) port 443
  • ALPN: curl offers h2,http/1.1
  • TLSv1.3 (OUT), TLS handshake, Client hello (1):
  • TLSv1.3 (IN), TLS handshake, Server hello (2):
  • TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
  • TLSv1.3 (IN), TLS handshake, Request CERT (13):
  • TLSv1.3 (IN), TLS handshake, Certificate (11):
  • TLSv1.3 (IN), TLS handshake, CERT verify (15):
  • TLSv1.3 (IN), TLS handshake, Finished (20):
  • TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
  • TLSv1.3 (OUT), TLS handshake, Certificate (11):
  • TLSv1.3 (OUT), TLS handshake, Finished (20):
  • SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
  • ALPN: server accepted h2
  • Server certificate:
  • subject: C=US; ST=California; O=Apple Inc.; CN=api.push.apple.com
  • start date: Apr 29 17:51:35 2024 GMT
  • expire date: Jul 28 18:01:35 2024 GMT
  • issuer: CN=Apple Public Server RSA CA 12 - G1; O=Apple Inc.; ST=California; C=US
  • SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
  • using HTTP/2
  • [HTTP/2] [1] OPENED stream for https://api.push.apple.com/3/device/162e7d2b3b2f4508222883b8ff0ae7ba689e1d1d5d684051c150a785ff6b7846%5C
  • [HTTP/2] [1] [:method: GET]
  • [HTTP/2] [1] [:scheme: https]
  • [HTTP/2] [1] [:authority: api.push.apple.com]
  • [HTTP/2] [1] [:path: /3/device/162e7d2b3b2f4508222883b8ff0ae7ba689e1d1d5d684051c150a785ff6b7846%5C]
  • [HTTP/2] [1] [user-agent: curl/8.4.0]
  • [HTTP/2] [1] [accept: /]

GET /3/device/162e7d2b3b2f4508222883b8ff0ae7ba689e1d1d5d684051c150a785ff6b7846%5C HTTP/2
Host: api.push.apple.com
User-Agent: curl/8.4.0
Accept: /

  • TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
  • TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
  • old SSL session ID is stale, removing
    < HTTP/2 405
    HTTP/2 405
    < apns-id: AEBE28E7-6A4A-8036-04AD-DAA433C53B02
    apns-id: AEBE28E7-6A4A-8036-04AD-DAA433C53B02

<

  • Connection #0 to host api.push.apple.com left intact
    {"reason":"MethodNotAllowed"}
Originally created by @RuotongX on GitHub (Jul 14, 2024). Original GitHub issue: https://github.com/Finb/bark-server/issues/281 目前我有着和 #47 一样的问题。SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway. 我按照相同做法获得了以下日志。 root@iStoreOS:~# curl http://0.0.0.0:8080/GBLZ3teVQDi3q3JhQDTtXC/这里改成你自己的推送内容 {"code":500,"message":"push failed: Post \"https://api.push.apple.com/3/device/{MyDeviceToken}\": tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match api.push.apple.com","timestamp":1720965593} root@iStoreOS:~# curl -kiv https://api.push.apple.com/3/device/162e7d2b3b2f4508222883b8ff0ae7ba689e1d1d5d684051c150a785ff6b7846%5C * Trying 17.188.143.9:443... * Connected to api.push.apple.com (17.188.143.9) port 443 * ALPN: curl offers h2,http/1.1 * TLSv1.3 (OUT), TLS handshake, Client hello (1): * TLSv1.3 (IN), TLS handshake, Server hello (2): * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8): * TLSv1.3 (IN), TLS handshake, Request CERT (13): * TLSv1.3 (IN), TLS handshake, Certificate (11): * TLSv1.3 (IN), TLS handshake, CERT verify (15): * TLSv1.3 (IN), TLS handshake, Finished (20): * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1): * TLSv1.3 (OUT), TLS handshake, Certificate (11): * TLSv1.3 (OUT), TLS handshake, Finished (20): * SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 * ALPN: server accepted h2 * Server certificate: * subject: C=US; ST=California; O=Apple Inc.; CN=api.push.apple.com * start date: Apr 29 17:51:35 2024 GMT * expire date: Jul 28 18:01:35 2024 GMT * issuer: CN=Apple Public Server RSA CA 12 - G1; O=Apple Inc.; ST=California; C=US * SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway. * using HTTP/2 * [HTTP/2] [1] OPENED stream for https://api.push.apple.com/3/device/162e7d2b3b2f4508222883b8ff0ae7ba689e1d1d5d684051c150a785ff6b7846%5C * [HTTP/2] [1] [:method: GET] * [HTTP/2] [1] [:scheme: https] * [HTTP/2] [1] [:authority: api.push.apple.com] * [HTTP/2] [1] [:path: /3/device/162e7d2b3b2f4508222883b8ff0ae7ba689e1d1d5d684051c150a785ff6b7846%5C] * [HTTP/2] [1] [user-agent: curl/8.4.0] * [HTTP/2] [1] [accept: */*] > GET /3/device/162e7d2b3b2f4508222883b8ff0ae7ba689e1d1d5d684051c150a785ff6b7846%5C HTTP/2 > Host: api.push.apple.com > User-Agent: curl/8.4.0 > Accept: */* > * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4): * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4): * old SSL session ID is stale, removing < HTTP/2 405 HTTP/2 405 < apns-id: AEBE28E7-6A4A-8036-04AD-DAA433C53B02 apns-id: AEBE28E7-6A4A-8036-04AD-DAA433C53B02 < * Connection #0 to host api.push.apple.com left intact {"reason":"MethodNotAllowed"}
kerem closed this issue 2026-03-03 11:56:10 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bark-server#113
No description provided.