Skip to content

Commit

Permalink
Clean up PKIDeployer.generate_csr()
Browse files Browse the repository at this point in the history
The PKIDeployer.generate_csr() has been modified to get the
CSR path using PKIServer.csr_file().
  • Loading branch information
edewata committed Dec 6, 2023
1 parent 4154441 commit 0535778
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions base/server/python/pki/server/deployment/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2949,15 +2949,14 @@ def generate_csr(self,

shutil.move(csr_pathname, csr_path)

certs_folder = os.path.join(self.instance.conf_dir, 'certs')
if tag != 'sslserver' and tag != 'subsystem':
csr_name = subsystem.name + '_' + tag + '.csr'
csr_name = subsystem.name + '_' + tag
else:
csr_name = tag + '.csr'
csr_name = tag

self.file.copy(
old_name=csr_path,
new_name=os.path.join(certs_folder, csr_name),
new_name=self.instance.csr_file(csr_name),
overwrite_flag=True)

def create_cert_request(self, nssdb, tag, request):
Expand Down

0 comments on commit 0535778

Please sign in to comment.