Minor fixes
This commit is contained in:
@ -22,7 +22,7 @@ const (
|
||||
// Default certificate validity period
|
||||
DefaultCertValidityDays = 365 // 1 year
|
||||
// Default PKI directory
|
||||
DefaultPKIDir = "/var/lib/kat/pki"
|
||||
DefaultPKIDir = ".kat/pki"
|
||||
)
|
||||
|
||||
// GenerateCA creates a new Certificate Authority key pair and certificate.
|
||||
@ -271,18 +271,6 @@ func GetPKIPathFromClusterConfig(backupPath string) string {
|
||||
return filepath.Dir(backupPath) + "/pki"
|
||||
}
|
||||
|
||||
// GetPKIPathFromClusterConfig determines the PKI directory from the cluster configuration.
|
||||
// If backupPath is provided, it uses the parent directory of backupPath.
|
||||
// Otherwise, it uses the default PKI directory.
|
||||
func GetPKIPathFromClusterConfig(backupPath string) string {
|
||||
if backupPath == "" {
|
||||
return DefaultPKIDir
|
||||
}
|
||||
|
||||
// Use the parent directory of backupPath
|
||||
return filepath.Dir(backupPath) + "/pki"
|
||||
}
|
||||
|
||||
// generateSerialNumber creates a random serial number for certificates
|
||||
func generateSerialNumber() (*big.Int, error) {
|
||||
serialNumberLimit := new(big.Int).Lsh(big.NewInt(1), 128) // 128 bits
|
||||
|
Reference in New Issue
Block a user