Exemplo n.º 1
0
def main():
    config_file = sys.argv[1]
    config = ConfigParser.ConfigParser()
    config.read(config_file)

    rec_api = ClientAPI(config)
    rec_api.run()
Exemplo n.º 2
0
def create_api_with_publickey(storage, forceGetCert=False):
    api = ClientAPI()
    api.set_public_key(*_get_public_key(storage, forceGetCert))
    return api
Exemplo n.º 3
0
def _get_public_key(storage, forceGetCert=False):
    cert = storage.get('cert', '')
    if forceGetCert or cert == '':
        cert = ClientAPI().get_cert()[0]
        storage['cert'] = cert
    return get_public_key(cert)
Exemplo n.º 4
0
def creaet_api_with_publickey():
    api = ClientAPI()
    api.set_public_key(*_get_public_key())
    return api
Exemplo n.º 5
0
def _get_public_key():
    from simple_rsa import get_public_key
    cert = ClientAPI().get_cert()[0]
    return get_public_key(cert)
Exemplo n.º 6
0
def creaet_api_with_publickey():
    api = ClientAPI()
    api.set_public_key(*_get_public_key())
    return api
Exemplo n.º 7
0
def create_api_with_publickey(storage, forceGetCert = False):
    api = ClientAPI()
    api.set_public_key(*_get_public_key(storage, forceGetCert))
    return api