]> Cypherpunks.ru repositories - govpn.git/commitdiff
Use stderr for passphrase prompt, to prevent newclient.sh from catching it
authorSergey Matveev <stargrave@stargrave.org>
Thu, 21 Jan 2016 09:20:13 +0000 (12:20 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 21 Jan 2016 09:27:59 +0000 (12:27 +0300)
Signed-off-by: Sergey Matveev <stargrave@stargrave.org>
VERSION
doc/news.texi
src/cypherpunks.ru/govpn/verifier.go

diff --git a/VERSION b/VERSION
index ef425ca98208c00037caa6df391724cc8762d239..d346e2ab7f2109b12c9bf53299bbbf6e7527fe7f 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5.2
+5.3
index 608613a93689fd2ca87430ac8dfe02190c5a8ccc..2846bc6ed66fa80ba2dc326f6a340326bee14b8a 100644 (file)
@@ -5,6 +5,14 @@
 
 @table @strong
 
+@item Release 5.3
+@cindex Release 5.3
+@itemize
+@item Fixed minor bug with @code{newclient.sh} that caught
+"Passphrase:" prompt and inserted it into example YAML output.
+Just replaced stdout output to stderr for that prompt.
+@end itemize
+
 @item Release 5.2
 @cindex Release 5.2
 @itemize
index 0dc9388188ad0e1f0c29eec611e7218cae32b687..a452a50a84737231a2e0e3d28701dee10138bf23 100644 (file)
@@ -25,6 +25,7 @@ import (
        "fmt"
        "io/ioutil"
        "log"
+       "os"
        "strings"
 
        "github.com/agl/ed25519"
@@ -125,9 +126,9 @@ func KeyRead(path string) (string, error) {
        var err error
        var pass string
        if path == "" {
-               fmt.Print("Passphrase:")
+               os.Stderr.Write([]byte("Passphrase:"))
                p, err = terminal.ReadPassword(0)
-               fmt.Print("\n")
+               os.Stderr.Write([]byte("\n"))
                pass = string(p)
        } else {
                p, err = ioutil.ReadFile(path)