| |
@@ -402,7 +402,7 @@
|
| |
|
| |
|
| |
def bundle_user_browser_cert(crt_path, key_path, ca_crt_path, force):
|
| |
- pkcs12_path = key_path.replace('.key', '_browser_cert.p12')
|
| |
+ pkcs12_path = re.sub(r'\.key$', '_browser_cert.p12', key_path)
|
| |
# If this is a user cert, and we have a matching .key file in the same
|
| |
# directory, then generate a pkcs12 bundle file with the cert and key.
|
| |
write_pkcs12(crt_path, key_path, ca_crt_path, pkcs12_path, force)
|
| |
Prior to this change, koji-ssl-admin would determine the path for the pkcs12 bundle file by globally searching-and-replacing the string ".key" in the key filename.
This would cause problems if the Koji server hostname or Koji username contained the string ".key".
Use a regular expression to determine the correct filename instead, by only replacing the final occurrences of ".key".
This fix is similar to the change in b0d83f3.