Skip to content

Commit

Permalink
Fix pki-server subsystem-cert-export
Browse files Browse the repository at this point in the history
Solve the pki-server subsystem-cert-export error when trying to export a
CSR.

Fix bz-2276139
  • Loading branch information
fmarco76 committed May 13, 2024
1 parent d659756 commit d6650be
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions base/server/python/pki/server/subsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,11 @@ def get_cert_info(self, tag):
cert['nickname'] = self.config.get('%s.%s.nickname' % (self.name, tag))
cert['token'] = self.config.get('%s.%s.tokenname' % (self.name, tag))
cert['certusage'] = self.config.get('%s.cert.%s.certusage' % (self.name, tag))
csr_file = self.csr_file(tag)
if os.path.isfile(csr_file):
with open(csr_file, "r", encoding='utf-8') as f:
request = f.read()
cert['request'] = pki.nssdb.convert_csr(request, 'pem', 'base64')

return cert

Expand Down

0 comments on commit d6650be

Please sign in to comment.