mrDoctorWho / ejabberd_mod_apns

An ejabberd module to send PUSH messages to iOS devices through APNS
MIT License
33 stars 19 forks source link

TLS handshake failure error #21

Closed alok102singh closed 7 years ago

alok102singh commented 7 years ago

i am having issue while sending push notification to ios device. following are the error i am getting.

11:13:35.581 [info] Offline message 11:13:35.625 [info] FORMAT ERROR: "mod_apns: trying to send payload with these parameters: Address: ~s Port: ~s Cert: ~s Keyfile: ~s Password ~s" ["gateway.sandbox.push.apple.com",2195,"/etc/ejabberd/dev_ios/eaze_apns.crt","/etc/ejabberd/dev_ios/eaze_apns.key","eazespot"] 11:13:35.625 [info] FORMAT ERROR: "Option is ~s" [[{certfile,"/etc/ejabberd/dev_ios/eaze_apns.crt"},{keyfile,"/etc/ejabberd/dev_ios/eaze_apns.key"},{password,"eazespot"},{mode,binary}]]

11:13:36.234 [error] SSL: cipher: ssl_alert.erl:97:Fatal error: handshake failure 11:13:36.234 [error] mod_apns: Unable to connect to the APNS server: {tls_alert,"handshake failure"}

mrDoctorWho commented 7 years ago

Hi!

Are you sure the certificate you set in the module configuration is correct? Have you got it from apple?

alok102singh commented 7 years ago

Yeah. I have tested it on http://apns-gcm.bryantan.info/.

mrDoctorWho commented 7 years ago

This is interesting. Could you please provide me your certificate & key? It would be really useful.

It could have happened if you had not or a wrong certificate, but I see you have one and you say it's valid, so it's weird.

alok102singh commented 7 years ago

Closing this issue. Error was on my side. This error happens cause i am using .crt and .key where as i have to convert both (.crt and .key) into .pem file and then use it. As APNS required .pem file. @mrDoctorWho Thanks for the help and for the repo also.

Apart from the issue: Did you have or know any repo to send push notification of offlice MUC message also?

mrDoctorWho commented 7 years ago

No, I'm not aware of any push module providing muc support.