Allow empty passphrase when using environment variable
This commit is contained in:
parent
19732daaf5
commit
ee4c2ad221
|
@ -18,8 +18,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func getPassphrase() ([]byte, error) {
|
func getPassphrase() ([]byte, error) {
|
||||||
passphrase := os.Getenv("KEY_PASSPHRASE")
|
passphrase, exists := os.LookupEnv("KEY_PASSPHRASE")
|
||||||
if passphrase != "" {
|
if exists {
|
||||||
return []byte(passphrase), nil
|
return []byte(passphrase), nil
|
||||||
}
|
}
|
||||||
return askPassphrase()
|
return askPassphrase()
|
||||||
|
|
Loading…
Reference in New Issue