aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2011-02-03 18:31:48 +0000
committerNicolas Vigier <boklm@mageia.org>2011-02-03 18:31:48 +0000
commit3331de3df3e2c08bba6843b1f17e71bc40d62a5a (patch)
treee9858f15c608635b8420986e1e73b3901ee78df1
parentce1216f38d11897f58608c6ddaec2b346f8ca148 (diff)
downloadgpg-3331de3df3e2c08bba6843b1f17e71bc40d62a5a.tar
gpg-3331de3df3e2c08bba6843b1f17e71bc40d62a5a.tar.gz
gpg-3331de3df3e2c08bba6843b1f17e71bc40d62a5a.tar.bz2
gpg-3331de3df3e2c08bba6843b1f17e71bc40d62a5a.tar.xz
gpg-3331de3df3e2c08bba6843b1f17e71bc40d62a5a.zip
don't filter \n and \r as we're now saving passphrase in hex
-rwxr-xr-xgenerate-key3
-rwxr-xr-xrandom-passphrase6
2 files changed, 4 insertions, 5 deletions
diff --git a/generate-key b/generate-key
index d41a90c..3329472 100755
--- a/generate-key
+++ b/generate-key
@@ -7,6 +7,7 @@ date
echo '(check if the date is correct and press enter)'
read z
+mkdir -p "$GPGHOMEDIR"
chmod 700 "$GPGHOMEDIR"
echo "Generate key :"
@@ -28,5 +29,5 @@ echo "Generate passphrase"
gpg -c --passphrase-file "$passphrase" "$seckey"
rm -f "$seckey"
-#TODO : split secret key using ssss-split
+./split-passphrase
diff --git a/random-passphrase b/random-passphrase
index 777f10c..0bb2f02 100755
--- a/random-passphrase
+++ b/random-passphrase
@@ -10,10 +10,8 @@ while ($size) {
my $o;
print STDERR "$size random bytes to read.\n";
read $rf, $o, 1;
- if ($o ne "\n" && $o ne "\r") {
- print unpack("H*", $o);
- $size--;
- }
+ print unpack("H*", $o);
+ $size--;
}
close($rf);