notnoop / java-apns

Java Apple Push Notification Service Provider
notnoop.github.com/java-apns
BSD 3-Clause "New" or "Revised" License
1.79k stars 656 forks source link

Problems With SSL Certificate #353

Closed miltonhit closed 6 years ago

miltonhit commented 6 years ago

Hello, We have been use this code a long time ago, today we have some problems with a SSLHandshake:

javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_expired at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.Alerts.getSSLException(Alerts.java:154) at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2023) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1125) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:747) at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123) at java.io.OutputStream.write(OutputStream.java:75) at com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:240) at com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:230) at com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:46) at com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:56) at com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:36) at com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:45) ...

Is this happening to you? Version: 0.2.3

miltonhit commented 6 years ago

Sorry.

kd8ssq commented 6 years ago

@miltonhit did you ever figure out what the problem was?

miltonhit commented 6 years ago

Hello @kd8ssq I just generate a new certificate key.p12 in Apple

kd8ssq commented 6 years ago

@miltonhit Thanks. Glad it's an easy fix. Had the same problem come up this morning.