mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-12 08:24:52 -05:00
Normalize RA agent certificate
Certificate parsed out of sslget request to pki-ca was not always properly formatted and it may still contain DOS line ending. Make sure that the certificate is printed with correct line ending.
This commit is contained in:
1 parent
d27878ce9d
commit
57d5042d28
1 file changed
+4
-1
@@ -1004,8 +1004,11 @@ class CAInstance(service.Service):
|
||||
outputList = get_outputList(data)
|
||||
|
||||
self.ra_cert = outputList['b64_cert']
|
||||
self.ra_cert = self.ra_cert.replace('\\n','')
|
||||
|
||||
# Strip certificate headers and convert it to proper line ending
|
||||
self.ra_cert = x509.strip_header(self.ra_cert)
|
||||
self.ra_cert = "\n".join(line.strip() for line
|
||||
in self.ra_cert.splitlines() if line.strip())
|
||||
|
||||
# Add the new RA cert to the database in /etc/httpd/alias
|
||||
(agent_fd, agent_name) = tempfile.mkstemp()
|
||||
|
||||
Reference in new issue
Block a user