Ubuntu Server in DigitalOcean
Nginx as proxy with Let's Encrypt for TLS
Swift 5.3.3
Vapor 4.0
Guide to set up APNS: https://docs.vapor.codes/4.0/apns/
I got Apple Push Notification Service working on Vapor 4.0 localhost (127.0.0.1:8080), it sends notifications to my device without problems. But when I deploy it to my server, I'm getting this error:
[ INFO ] GET /push
[ ERROR ] handshakeFailed(NIOSSL.BoringSSLError.sslError([Error: 268435581 error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED]))
I cannot find the error source. Someone with the same problem, or any tips?
This is to do with Apple's intermediate cert which is not trusted by Ubuntu by default (that has changed and should be rolling out soon I believe). You need to add the cert to your trust store with