#!/usr/bin/env ruby require 'openssl' include OpenSSL passwd_cb = Proc.new{|flag| print "Enter password: " pass = $stdin.gets.chop! # when the flag is true, this passphrase # will be used to perform encryption; otherwise it will # be used to perform decryption. if flag print "Verify password: " pass2 = $stdin.gets.chop! raise "verify failed." if pass != pass2 end pass } def usage myname = File::basename($0) $stderr.puts <