Hey guys,
I am trying all day to get my server working to send out push notifications but somehow I am not able to tell pushy (or java-apns which I tried out before) to accept the SSL connection of the the apple APNS server (why the hell aren't they using proper signed certificates, it's not like they don't have the money to buy them). Anyway:
The error I am getting when running your example from the Github page is the following:
2015-04-13T19:58:32,539 DEBUG [nioEventLoopGroup-2-1] ApnsConnection [connect] - ExamplePushManager-connection-123 beginning connection process.
2015-04-13T19:58:32,546 DEBUG [nioEventLoopGroup-2-1] ApnsConnection [exceptionCaught] - ExamplePushManager-connection-122 caught an exception. io.netty.handler.codec.DecoderException: javax.net.ssl.SSLException: Received fatal alert: handshake_failure
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:346)
2015-04-13T19:58:32,813 DEBUG [nioEventLoopGroup-2-1] ApnsConnection [operationComplete] - ExamplePushManager-connection-123 connected; waiting for TLS handshake.
2015-04-13T19:58:33,309 DEBUG [nioEventLoopGroup-2-1] ApnsConnection [operationComplete] - ExamplePushManager-connection-123 failed to complete TLS handshake with APNs gateway. javax.net.ssl.SSLException: Received fatal alert: handshake_failure
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
2015-04-13T19:58:33,311 TRACE [nioEventLoopGroup-2-1] PushManager [handleConnectionFailure] - Connection failed: ApnsConnection [name=ExamplePushManager-connection-123] javax.net.ssl.SSLException: Received fatal alert: handshake_failure
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
That basically means that my server is not accepting the provided certificate of Apple, right?
Could you please tell me what I am missing and why java just cant ignore this error or send out a warning?
It would be great if someone of you could give me a step-by-step guide how to get this thing flying.
Thank you so much in advance for taking the time!
P.S.: I am currently using (against your advise) tomcat 8 with openjdk 8 version "1.8.0_40-internal". My Github repo about this project (including the iOS client) can be found
here, although the last push still "uses" java-apns.