Skip to content

Instantly share code, notes, and snippets.

@unnamedd
Forked from greencoder/apns.sh
Last active Oct 28, 2020
Embed
What would you like to do?
cURL the APNS HTTP/2 API
# Note: You MUST have curl 7.47+ with http/2 support compiled in
curl -v \
-d '{"aps":{"alert":"<message>","badge":42}}' \
-H "apns-topic: <bundle id>" \
-H "apns-priority: 10" \
--http2 \
--cert <certificate file> \
https://api.development.push.apple.com/3/device/<device token>
# To generate .pem from .p12
openssl pkcs12 -in pushcert.p12 -out pushcert.pem -nodes -clcerts
@cuongkjm
Copy link

cuongkjm commented Oct 28, 2020

i got this error:

Trying 17.188.138.73:443...
Connected to api.development.push.apple.com (17.188.138.73) port 443 (#0)
ALPN, offering h2
ALPN, offering http/1.1
Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
successfully set certificate verify locations:
 CAfile: C:\curl\cacert.pem
 CApath: none
TLSv1.2 (OUT), TLS header, Certificate Status (22):
TLSv1.2 (OUT), TLS handshake, Client hello (1):
TLSv1.2 (IN), TLS handshake, Server hello (2):
TLSv1.2 (IN), TLS handshake, Certificate (11):
TLSv1.2 (IN), TLS handshake, Server key exchange (12):
TLSv1.2 (IN), TLS handshake, Request CERT (13):
TLSv1.2 (IN), TLS handshake, Server finished (14):
TLSv1.2 (OUT), TLS handshake, Certificate (11):
TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
TLSv1.2 (OUT), TLS handshake, CERT verify (15):
TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
TLSv1.2 (OUT), TLS handshake, Finished (20):
TLSv1.2 (IN), TLS alert, internal error (592):
error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error
Closing connection 0
curl: (35) error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error

do you have any suggestions?

Loading

@unnamedd
Copy link
Author

unnamedd commented Oct 28, 2020

Hi @cuongkjm, to be really honest? I have no clue how can I help. Sorry 😔

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment