Skip to content

Commit

Permalink
pki-server system certificate from nssdb
Browse files Browse the repository at this point in the history
System certificates are stored in CS.cfg and nssdb. This is redundant,
all operations should use the same source for the certificate which is
the nssdb.

This modify the following command in order to get the certificate from
nssdb:

  [root@pki /] # pki-server cert-export --cert-file <filename>
  • Loading branch information
fmarco76 committed Oct 4, 2023
1 parent 82f0ed0 commit c034463
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions base/common/python/pki/nssdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -2009,6 +2009,8 @@ def get_cert_info(self, nickname, token=None):
cert = {}
cert['object'] = cert_obj

cert['data'] = self.get_cert(nickname=nickname, token=token, output_format='base64')

cert['serial_number'] = cert_obj.serial_number

cert['issuer'] = pki.convert_x509_name_to_dn(cert_obj.issuer)
Expand Down
1 change: 0 additions & 1 deletion base/server/python/pki/server/subsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ def get_cert_info(self, tag):
cert['id'] = tag
cert['nickname'] = self.config.get('%s.%s.nickname' % (self.name, tag))
cert['token'] = self.config.get('%s.%s.tokenname' % (self.name, tag))
cert['data'] = self.config.get('%s.%s.cert' % (self.name, tag))
cert['request'] = self.config.get('%s.%s.certreq' % (self.name, tag))
cert['certusage'] = self.config.get('%s.cert.%s.certusage' % (self.name, tag))

Expand Down

0 comments on commit c034463

Please sign in to comment.