Consolidate base64 encode/decode routines.
[users/heiko/exim.git] / test / aux-fixed / dkim / sign.pl
index 1c2a8728095bb5188d825b6fc9842c23ba84d4e8..6220015aec08b916087c28f99a5fea60b71adb89 100644 (file)
@@ -2,10 +2,15 @@ use Mail::DKIM::Signer;
 use Mail::DKIM::TextWrap;  #recommended
 use Getopt::Long;
 
+# default option values
 my $method = "simple/simple";
+my $selector = "sel";
+my $keyfile = "aux-fixed/dkim/dkim.private";
 
 GetOptions(
        "method=s" => \$method,
+       "selector=s" => \$selector,
+       "keyfile=s" => \$keyfile,
 );
 
 # create a signer object
@@ -13,8 +18,8 @@ my $dkim = Mail::DKIM::Signer->new(
                   Algorithm => "rsa-sha1",
                   Method => $method,
                   Domain => "test.ex",
-                  Selector => "sel",
-                  KeyFile => "aux-fixed/dkim/dkim.private",
+                  Selector => $selector,
+                  KeyFile => $keyfile,
              );
 
 # read an email and pass it into the signer, one line at a time