Skip to content

Commit

Permalink
Fix renewal for HSM
Browse files Browse the repository at this point in the history
Resolves: dogtagpki#4355
  • Loading branch information
edewata committed Nov 2, 2023
1 parent de8eb39 commit a0408dd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
5 changes: 3 additions & 2 deletions base/server/python/pki/server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -883,8 +883,9 @@ def open_nssdb(self, token=pki.nssdb.INTERNAL_TOKEN_NAME,
password=self.get_token_password(token),
internal_password=self.get_token_password(),
passwords=self.passwords,
user=user,
group=group)
password_conf=self.password_conf,
user=self.user,
group=self.group)

def get_webapps(self):

Expand Down
11 changes: 10 additions & 1 deletion base/server/python/pki/server/subsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1005,6 +1005,15 @@ def temp_cert_create(self, nssdb, cert_tag, serial, new_cert_file):

aki = self.get_cert_ski(ca_cert_data)

nickname = ca_signing_cert['nickname']
token = pki.nssdb.normalize_token(ca_signing_cert['token'])

if token:
fullname = token + ':' + nickname
else:
fullname = nickname
logger.debug('Issuer: %s', fullname)

csr_file = self.instance.csr_file(cert_tag)
logger.debug('Reusing existing CSR in %s', csr_file)

Expand All @@ -1030,7 +1039,7 @@ def temp_cert_create(self, nssdb, cert_tag, serial, new_cert_file):
logger.debug('Creating temp cert')

rc = nssdb.create_cert(
issuer=ca_signing_cert['nickname'],
issuer=fullname,
request_file=csr_file,
cert_file=new_cert_file,
serial=serial,
Expand Down

0 comments on commit a0408dd

Please sign in to comment.