[Mageia-sysadm] [403] don't filter \n and \r as we're now saving passphrase in hex

root at mageia.org root at mageia.org
Thu Feb 3 19:31:48 CET 2011


Revision: 403
Author:   boklm
Date:     2011-02-03 19:31:48 +0100 (Thu, 03 Feb 2011)
Log Message:
-----------
don't filter \n and \r as we're now saving passphrase in hex

Modified Paths:
--------------
    gpg/generate-key
    gpg/random-passphrase

Modified: gpg/generate-key
===================================================================
--- gpg/generate-key	2011-02-03 18:17:39 UTC (rev 402)
+++ gpg/generate-key	2011-02-03 18:31:48 UTC (rev 403)
@@ -7,6 +7,7 @@
 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 @@
 gpg -c --passphrase-file "$passphrase" "$seckey"
 rm -f "$seckey"
 
-#TODO : split secret key using ssss-split
+./split-passphrase
 

Modified: gpg/random-passphrase
===================================================================
--- gpg/random-passphrase	2011-02-03 18:17:39 UTC (rev 402)
+++ gpg/random-passphrase	2011-02-03 18:31:48 UTC (rev 403)
@@ -10,10 +10,8 @@
     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);
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20110203/2ec96b5c/attachment.html>


More information about the Mageia-sysadm mailing list