'Retrieve the other side\'s certificate (if any)
:return: The peer\'s certificate'

def get_peer_certificate(self):

    cert = _lib.SSL_get_peer_certificate(self._ssl)
    if (cert != _ffi.NULL):
        pycert = X509.__new__(X509)
        pycert._x509 = _ffi.gc(cert, _lib.X509_free)
        return pycert
    return None
