コード例 #1
0
ファイル: client.py プロジェクト: ashish-bagri/bow
def main():
    config_file = sys.argv[1]
    config = ConfigParser.ConfigParser()
    config.read(config_file)

    rec_api = ClientAPI(config)
    rec_api.run()
コード例 #2
0
def create_api_with_publickey(storage, forceGetCert=False):
    api = ClientAPI()
    api.set_public_key(*_get_public_key(storage, forceGetCert))
    return api
コード例 #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)
コード例 #4
0
def creaet_api_with_publickey():
    api = ClientAPI()
    api.set_public_key(*_get_public_key())
    return api
コード例 #5
0
def _get_public_key():
    from simple_rsa import get_public_key
    cert = ClientAPI().get_cert()[0]
    return get_public_key(cert)
コード例 #6
0
def creaet_api_with_publickey():
    api = ClientAPI()
    api.set_public_key(*_get_public_key())
    return api
コード例 #7
0
def create_api_with_publickey(storage, forceGetCert = False):
    api = ClientAPI()
    api.set_public_key(*_get_public_key(storage, forceGetCert))
    return api