diff options
author | Ade Lee <alee@redhat.com> | 2015-09-27 11:18:10 -0400 |
---|---|---|
committer | Ade Lee <alee@redhat.com> | 2015-09-27 11:19:00 -0400 |
commit | 7fd2d207868a0e5c0c444cd5e98836fe6125188f (patch) | |
tree | bfdb7ed7e16ffb22968027ec7498c9a539beae25 /base | |
parent | e037a73e1ea52719473e03c554ce6e3544967907 (diff) | |
download | pki-7fd2d207868a0e5c0c444cd5e98836fe6125188f.tar.gz pki-7fd2d207868a0e5c0c444cd5e98836fe6125188f.tar.xz pki-7fd2d207868a0e5c0c444cd5e98836fe6125188f.zip |
Fixup for python client for subcas
Diffstat (limited to 'base')
-rw-r--r-- | base/common/python/pki/authority.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/base/common/python/pki/authority.py b/base/common/python/pki/authority.py index 295c4ead8..dccbc363a 100644 --- a/base/common/python/pki/authority.py +++ b/base/common/python/pki/authority.py @@ -45,7 +45,7 @@ class AuthorityData(object): 'enabled': 'enabled', 'isHostAuthority': 'is_host_authority', 'link': 'link', - 'parentAID': 'parent_aid' + 'parentID': 'parent_aid' } def __init__(self, dn=None, aid=None, parent_aid=None, @@ -351,15 +351,15 @@ def main(): except ValueError as e: print(e.message) - # Get a top-level CA - print("Getting a top level CA") + # Get the host CA + print("Getting the host CA") print("----------------------") authorities = ca_client.list_cas() for ca in authorities.ca_list: - if ca.parent_aid is None: - top_ca = ca + if ca.is_host_authority: + host_ca = ca - print(str(top_ca)) + print(str(host_ca)) # Create a sub CA print("Creating a new subordinate CA") @@ -368,7 +368,7 @@ def main(): authority_data = { 'dn': subca_subject, 'description': 'Test subordinate CA', - 'parent_aid': top_ca.aid + 'parent_aid': host_ca.aid } data = AuthorityData(**authority_data) subca = ca_client.create_ca(data) |