'Constructor.
Args:
ca_cert: String representation of a CA certificate to use for checking
server certificate.
worker: The client worker class to use. Defaults to GRRThreadedWorker().
private_key: The private key for this client. Defaults to
config Client.private_key.'

def __init__(self, ca_cert=None, worker=None, private_key=None):

    self.ca_cert = ca_cert
    if (private_key is None):
        private_key = config.CONFIG.Get('Client.private_key', default=None)
    self.server_certificate = None
    self.http_manager = self.http_manager_class()
    self.communicator = ClientCommunicator(private_key=private_key)
    self.timer = Timer()
    self.last_enrollment_time = 0
    self.last_foreman_check = 0
    if worker:
        self.client_worker = worker
    else:
        self.client_worker = GRRThreadedWorker(client=self)
