summaryrefslogtreecommitdiffstats
path: root/ipapython/dn.py
diff options
context:
space:
mode:
authorFlorence Blanc-Renaud <flo@redhat.com>2016-12-20 16:21:58 +0100
committerDavid Kupka <dkupka@redhat.com>2017-03-02 15:09:42 +0100
commit9e24918c89f30a6d7064844dc0dd848bb35140df (patch)
tree42d9144b5aaba9bb9ee33e0bd405e4734adbcc5e /ipapython/dn.py
parent22d7492c94837342a559c368454c223f566490ac (diff)
downloadfreeipa-9e24918c89f30a6d7064844dc0dd848bb35140df.tar.gz
freeipa-9e24918c89f30a6d7064844dc0dd848bb35140df.tar.xz
freeipa-9e24918c89f30a6d7064844dc0dd848bb35140df.zip
Support for Certificate Identity Mapping
See design http://www.freeipa.org/page/V4/Certificate_Identity_Mapping https://fedorahosted.org/freeipa/ticket/6542 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipapython/dn.py')
-rw-r--r--ipapython/dn.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/ipapython/dn.py b/ipapython/dn.py
index 4e8c22bb0..a54629e8b 100644
--- a/ipapython/dn.py
+++ b/ipapython/dn.py
@@ -1155,9 +1155,15 @@ class DN(object):
def _get_rdn(self, rdn):
return self.RDN_type(*rdn, **{'raw': True})
- def __str__(self):
+ def ldap_text(self):
return dn2str(self.rdns)
+ def x500_text(self):
+ return dn2str(reversed(self.rdns))
+
+ def __str__(self):
+ return self.ldap_text()
+
def __repr__(self):
return "%s.%s('%s')" % (self.__module__, self.__class__.__name__, self.__str__())