Skip to content

Commit f120085

Browse files
authored
Updates: updates (#413)
* Updates: update cert name for wrapper and minor fix to cleanup server/root certificate
1 parent 2c9631d commit f120085

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

fortanix_kmip_setup.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,10 @@ def generate_certs(app_id, args):
141141
os.makedirs(args.cert_dir, exist_ok=True)
142142

143143
# Clean existing certificate files only
144-
key_path = os.path.join(args.cert_dir, "private.key")
145-
cert_path = os.path.join(args.cert_dir, "certificate.crt")
146-
for cert_file in [key_path, cert_path]:
144+
key_path = os.path.join(args.cert_dir, "client_key.pem")
145+
cert_path = os.path.join(args.cert_dir, "client_certificate.pem")
146+
server_cert_path = os.path.join(args.cert_dir, "root_certificate.pem")
147+
for cert_file in [key_path, cert_path, server_cert_path]:
147148
if os.path.isfile(cert_file):
148149
os.remove(cert_file)
149150

@@ -221,7 +222,7 @@ def download_server_cert(args):
221222
result.stdout, re.DOTALL)
222223

223224
if match:
224-
server_cert_path = os.path.join(args.cert_dir, "server.crt")
225+
server_cert_path = os.path.join(args.cert_dir, "root_certificate.pem")
225226
with open(server_cert_path, 'w') as f:
226227
f.write(match.group(0))
227228
print(f"Server certificate saved")

0 commit comments

Comments
 (0)