PyAPNs icon indicating copy to clipboard operation
PyAPNs copied to clipboard

Certificate server verification

Open njustin opened this issue 12 years ago • 0 comments

Hello,

From a security point of view, it is better to check the server certificate, at least its certificate signature with:

self._ssl = wrap_socket(self._socket, keyfile=self.key_file, certfile=self.cert_file, ca_certs=cacertfile)

Where cacertfile comes from https://www.entrust.net/downloads/binary/entrust_2048_ca.cer. It could be downloaded and included into PyAPNs package.

Even better checking the APN gateway certificate validity by checking the CRL or the OCSP, but I do not think that Python SSL library handle this easily...

njustin avatar Jun 19 '13 15:06 njustin