Fix uses of O=REALM instead of the configured certificate subject base.

ticket 2521
This commit is contained in:
Jan Cholasta
2012-03-26 20:29:26 -04:00
committed by Rob Crittenden
parent ef21a286f0
commit bd440d515e
6 changed files with 32 additions and 13 deletions
+4 -1
View File
@@ -97,8 +97,11 @@ def makecert(reqdir):
# Generate NSS cert database to store the private key for our CSR
run_certutil(reqdir, ["-N", "-f", pwname])
res = api.Backend.client.run('config_show')
subject_base = res['result']['ipacertificatesubjectbase'][0]
cert = None
subject = 'CN=%s,O=%s' % (api.env.host, api.env.realm)
subject = 'CN=%s,%s' % (api.env.host, subject_base)
princ = 'unittest/%s@%s' % (api.env.host, api.env.realm)
csr = unicode(generateCSR(reqdir, pwname, subject))