Skip to content

Commit

Permalink
'vault implementation'
Browse files Browse the repository at this point in the history
  • Loading branch information
romdalf committed May 1, 2024
1 parent 02cfd86 commit 92494b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions utils/startprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ func startSofthsm(addr, provider, providerConfig string) {

func startHvault(addr, provider, providerConfig string) {

log.Println("BETA: flag -provider", provider, "is currently unsafe to used in production.")
log.Println("BETA: flag -provider", provider, "with -listen", addr, "and -configfile", providerConfig, "currently unsafe to used in production.")
providers.HvaultPlaceholder()

}

func startTpm(addr, provider, providerConfig string) {

log.Println("BETA: flag -provider", provider, "is currently unsafe to used in production.")
log.Println("BETA: flag -provider", provider, "with -listen", addr, "and -configfile", providerConfig, "currently unsafe to used in production.")
providers.TmpPlaceholder()

}
Expand Down
8 changes: 4 additions & 4 deletions utils/validatevar.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ func ValidateListenAddr(listenAddr string) (string, error) {
}

if len(listenAddr) == 0 {
return url.Path, fmt.Errorf("/!\\ can not be an empty string.")
return url.Path, fmt.Errorf("/!\\ can not be an empty string")
}

if url.Scheme != proto {
return url.Scheme, fmt.Errorf("/!\\ proto can be different than unix.")
return url.Scheme, fmt.Errorf("/!\\ proto can be different than unix")
}

if strings.HasPrefix(url.Path, "/@") {
Expand All @@ -40,7 +40,7 @@ func ValidateProvider(providerService string) (string, error) {

providerServices := []string{"hvault", "softhsm", "tpm"}
if !slices.Contains(providerServices, providerService) {
return providerService, fmt.Errorf("/!\\ flag -provider is not supported. Only %v are valid options.", providerServices)
return providerService, fmt.Errorf("/!\\ flag -provider is not supported. Only %v are valid options", providerServices)
}

log.Println("INFO: flag -provider set to", providerService)
Expand All @@ -50,7 +50,7 @@ func ValidateProvider(providerService string) (string, error) {
func ValidateConfigfile(providerConfigFile string) (string, error) {

if len(providerConfigFile) == 0 {
return providerConfigFile, fmt.Errorf("/!\\ can not be an empty string.")
return providerConfigFile, fmt.Errorf("/!\\ can not be an empty string")
}

log.Println("INFO: flag -configfile set to", providerConfigFile)
Expand Down

0 comments on commit 92494b7

Please sign in to comment.