def create_and_store_rsa_key_pair(name="pyoidc", path=".", size=2048):

    key = RSA.generate(size)

    if name:
        with open(os.path.join(path, name), 'wb') as f:
            f.write(key.exportKey('PEM'))

        _pub_key = key.publickey()
        with open(os.path.join(path, '{}.pub'.format(name)), 'wb') as f:
            f.write(_pub_key.exportKey('PEM'))

    return key
Listing of subscriptions on a topic.
dataset/ETHPy150Open rohe/pyoidc/src/oic/utils/keyio.py/create_and_store_rsa_key_pair--crossover with--dataset/ETHPy150Open softlayer/softlayer-python/SoftLayer/managers/messaging.py/MessagingConnection.get_subscriptions