'Retrieve the TLS X.509 certificate for the given server
Args:
server_name (bytes): The name of the server.
Returns:
(OpenSSL.crypto.X509): The tls certificate.'

@defer.inlineCallbacks
def get_server_certificate(self, server_name):

    (tls_certificate_bytes,) = (yield self._simple_select_one(table='server_tls_certificates', keyvalues={'server_name': server_name}, retcols=('tls_certificate',), desc='get_server_certificate'))
    tls_certificate = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_ASN1, tls_certificate_bytes)
    defer.returnValue(tls_certificate)
