chiark / gitweb /
ktype.seccure: Bodge around `permission denied' error in signing.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 6 Oct 2012 22:22:06 +0000 (23:22 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 6 Oct 2012 22:22:06 +0000 (23:22 +0100)
Not sure why /dev/stdout should be problematic, but avoid the problem
using $(...) to provide a fresh and friendly stdout, and then echo to
the existing file descriptor.

ktype.seccure

index dfe552160b7db3661e43ddc995732126bd8ae9ac..da51687a26b0f71251564bc5e3ffe4d1797246c2 100644 (file)
@@ -83,7 +83,8 @@ k_decrypt () {
 
 k_sign () {
   nub=$2
-  run_seccure sign -q -c$kprop_curve -F"$nub" -s/dev/stdout
+  sig=$(run_seccure sign -q -c$kprop_curve -F"$nub" -s/dev/stdout)
+  echo "$sig"
 }
 
 k_verify () {