'Loads and verifies the server certificate.'

def LoadServerCertificate(self, server_certificate=None, ca_certificate=None):

    try:
        server_certificate.Verify(ca_certificate.GetPublicKey())
    except rdf_crypto.VerificationError:
        self.server_name = None
        raise IOError('Server    cert    is    invalid.')
    server_cert_serial = server_certificate.GetSerialNumber()
    if (server_cert_serial < config.CONFIG['Client.server_serial_number']):
        raise IOError('Server    cert    is    too    old.')
    elif (server_cert_serial > config.CONFIG['Client.server_serial_number']):
        logging.info('Server    serial    number    updated    to    %s', server_cert_serial)
        config.CONFIG.Set('Client.server_serial_number', server_cert_serial)
        config.CONFIG.Write()
    self.server_name = server_certificate.GetCN()
    self.server_certificate = server_certificate
    self.ca_certificate = ca_certificate
    self.server_public_key = server_certificate.GetPublicKey()
