From 55ccd29d3657b0b58bf4a07aceb8568b387b82c9 Mon Sep 17 00:00:00 2001 From: fabrice Date: Fri, 24 Oct 2014 12:01:55 +0200 Subject: [PATCH] Switched SSL method with APNS servers from SSL 3.0 to TLS1.0 because of Apple dropping support for SSL3.0 --- pyapns/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyapns/server.py b/pyapns/server.py index a4ec928..6ecbe04 100644 --- a/pyapns/server.py +++ b/pyapns/server.py @@ -54,7 +54,7 @@ def __init__(self, ssl_cert_file): log.msg('APNSClientContextFactory ssl_cert_file=%s' % ssl_cert_file) else: log.msg('APNSClientContextFactory ssl_cert_file={FROM_STRING}') - self.ctx = SSL.Context(SSL.SSLv3_METHOD) + self.ctx = SSL.Context(SSL.TLSv1_METHOD) if 'BEGIN CERTIFICATE' in ssl_cert_file: cer = crypto.load_certificate(crypto.FILETYPE_PEM, ssl_cert_file) pkey = crypto.load_privatekey(crypto.FILETYPE_PEM, ssl_cert_file)