1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 11:55:40 +01:00

Added a no_passphrase flag to hide the passphrase input field from the web interface.

This commit is contained in:
Sascha L. Teichmann 2021-11-16 14:43:35 +01:00
parent 7cf1580d5f
commit ef0a92b491
3 changed files with 4 additions and 1 deletions

View file

@ -179,7 +179,7 @@ func (c *controller) handleSignature(r *http.Request, data []byte) (string, stri
// Sign ourself
if passwd := r.FormValue("passphrase"); passwd != "" {
if passwd := r.FormValue("passphrase"); !c.cfg.NoPassphrase && passwd != "" {
if key, err = key.Unlock([]byte(passwd)); err != nil {
return "", "", err
}