refactor: change default PKI directory to user home directory
This commit is contained in:
@ -21,7 +21,7 @@ const (
|
|||||||
// Default certificate validity period
|
// Default certificate validity period
|
||||||
DefaultCertValidityDays = 365 // 1 year
|
DefaultCertValidityDays = 365 // 1 year
|
||||||
// Default PKI directory
|
// Default PKI directory
|
||||||
DefaultPKIDir = "/var/lib/kat/pki"
|
DefaultPKIDir = "~/.kat/pki"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GenerateCA creates a new Certificate Authority key pair and certificate.
|
// GenerateCA creates a new Certificate Authority key pair and certificate.
|
||||||
@ -256,7 +256,7 @@ func GetPKIPathFromClusterConfig(backupPath string) string {
|
|||||||
if backupPath == "" {
|
if backupPath == "" {
|
||||||
return DefaultPKIDir
|
return DefaultPKIDir
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use the parent directory of backupPath
|
// Use the parent directory of backupPath
|
||||||
return filepath.Dir(backupPath) + "/pki"
|
return filepath.Dir(backupPath) + "/pki"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user