ktype.seccure: Stop `seccure' from trying to open `/dev/tty'.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 23 Feb 2012 03:01:16 +0000 (03:01 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 23 Feb 2012 03:14:38 +0000 (03:14 +0000)
It won't work in a `userv' service.  For some reason, it will try to do
this if you don't provide a key file, even for operations which don't
need a private key.

ktype.seccure

index 3b716d2..dfe5521 100644 (file)
@@ -69,7 +69,8 @@ k_check () {
 
 k_encrypt () {
   base=$1
-  run_seccure encrypt -q -c$kprop_curve -m$kprop_tagsz -- $(cat "$base/pub")
+  run_seccure encrypt -q -c$kprop_curve -m$kprop_tagsz -F/dev/null -- \
+    $(cat "$base/pub")
 }
 
 k_decrypt () {
@@ -87,7 +88,7 @@ k_sign () {
 
 k_verify () {
   base=$1 sig=$3
-  if run_seccure verify -q -c$kprop_curve -- \
+  if run_seccure verify -q -c$kprop_curve -F/dev/null -- \
     $(cat "$base/pub") "$sig"
   then :; else
     rc=$?