x509crypt.git

commit c51f074c48222e343293fee213bb62c8c143cd5b

Author: Paolo Lulli <paolo@lulli.net>

add unsafe encrypt (no decr check for pub only key)

 x509crypt | 8 +++++++-


diff --git a/x509crypt b/x509crypt
index 50d7a2f70ce1b881ae9d18e9a1dd7a04e81c0554..bc3e468ee1c7219df1369bedb1f3fee2a4c37ebb 100755
--- a/x509crypt
+++ b/x509crypt
@@ -93,7 +93,9 @@ }
 
 usage(){
   program=$(basename $0)
-  echo "${program} <profile> -e <file> : Encrypt <file>"
+  echo "${program} <profile> -e <file> : Encrypt <file> (safety checks)"
+  echo "${program} <profile> -E <file> : Encrypt <file>"
+  
   echo "${program} <profile> -d <file> : Decrypt <file>"
  
   echo "${program} <profile> -g        : Generate keys"
@@ -150,6 +152,10 @@ fi
 if [ "$#" -eq 3 ]; then
   profile_name=$1
   input_file=$3
+  if [ "$2" == "-E" ]; then
+    file_encrypt $input_file
+    exit
+  fi
   if [ "$2" == "-e" ]; then
     file_encrypt $input_file
     file_decrypt $input_file".enc"