mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06: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:
@@ -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