python - Alternative method to find if APNS certification file is valid? -


i'm having problem developing "provider" in apns. server trying send messages using apns-client, seems there no problems occuring while sending messages, device isn't receiving messages @ all.

recently i've changed *.pem file new one. messages received while using previous *.pem file, i'm sure there no problems @ server connections , sending script (written in python). reason is, probably, because old *.pem file valid new *.pem file not.

i desire have "error" response apns server if *.pem file invalid, seems apns server or apns-client library isn't returning error signals if *.pem file invalid. i've proved fact adding 1 hundred 'a's line before before -----end rsa private key----- in *.pem, , running same python script. yes, still didn't receive error messages.

since apns server returning no error messages, it's impossible check if *.pem file valid... aren't there methods check if *.pem file valid?

here's troubleshooting info suggested apple:

problems connecting push service

one possibility server unable connect push service. can mean don't have certificate chain needed tls/ssl validate connection service. in addition ssl identity (certificate , associated private key) created member center, should install entrust ca (2048) root certificate on provider. allows tls/ssl verify full apns server cert chain. if need root certificate, can download entrust's site. verify these identities installed in correct location provider , provider has permission read them.

you can test tls/ssl handshake using openssl s_client command, this:

$ openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert yoursslcertandprivatekey.pem -debug -showcerts -cafile server-ca-cert.pem

where server-ca-cert.pem entrust ca (2048) root certificate.

be sure ssl identity , hostname correct ones push environment you're testing. can configure app id in member center separately sandbox , production environment, , issued separate identity each environment.

using sandbox ssl identity try connect production environment return error this:

critical | 14:48:40.304061 | exception creating ssl connection apple: [errno 1] _ssl.c:480: error:14094414:ssl routines:ssl3_read_bytes:sslv3 alert certificate revoked


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -