summaryrefslogtreecommitdiffstats
path: root/ipaserver/rpcserver.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-04-05 16:27:46 -0400
committerJason Gerard DeRose <jderose@redhat.com>2010-04-23 04:57:40 -0600
commit1d635090cbd68b6bec9ce57a2fbfd9ff1b91f908 (patch)
tree3816a3809f5274741850c89ea830c24859f05e64 /ipaserver/rpcserver.py
parent7c61663def1b00ceb4daf22be7a8d1c7116b6433 (diff)
downloadfreeipa-1d635090cbd68b6bec9ce57a2fbfd9ff1b91f908.tar.gz
freeipa-1d635090cbd68b6bec9ce57a2fbfd9ff1b91f908.tar.xz
freeipa-1d635090cbd68b6bec9ce57a2fbfd9ff1b91f908.zip
Use the certificate subject base in IPA when requesting certs in certmonger.
When using the dogtag CA we can control what the subject of an issued certificate is regardless of what is in the CSR, we just use the CN value. The selfsign CA does not have this capability. The subject format must match the configured format or certificate requests are rejected. The default format is CN=%s,O=IPA. certmonger by default issues requests with just CN so all requests would fail if using the selfsign CA. This subject base is stored in cn=ipaconfig so we can just fetch that value in the enrollment process and pass it to certmonger to request the right thing. Note that this also fixes ipa-join to work with the new argument passing mechanism.
Diffstat (limited to 'ipaserver/rpcserver.py')
-rw-r--r--ipaserver/rpcserver.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ipaserver/rpcserver.py b/ipaserver/rpcserver.py
index 795a240d9..71d55445b 100644
--- a/ipaserver/rpcserver.py
+++ b/ipaserver/rpcserver.py
@@ -295,7 +295,8 @@ class xmlserver(WSGIExecutioner):
self.info('response: %s: %s', error.__class__.__name__, str(error))
response = Fault(error.errno, error.strerror)
else:
- self.info('response: entries returned %d', result.get('count', 1))
+ if isinstance(result, dict):
+ self.info('response: entries returned %d', result.get('count', 1))
response = (result,)
return xml_dumps(response, methodresponse=True)