Name

EncryptProgram — specify default encryption program

SYNOPSIS

filename [arguments]

DESCRIPTION

Specify default encryption program, and a template to call it. The encryption program will be called to perform tasks such as encrypting credit card numbers (if they are stored on the server).

Two placeholders can be used, %p and %f. At encryption time, %p expands to a password, and %f to a temporary file name.

If Interchange can found a variant of gpg/pgp on your system, it is the default. Setting of none disables encryption.

Specifying command line options for the encryption program isn't required, as Interchange automatically adds the following options, depending on the program recognized:

  • gpg --batch --always-trust -e -a -r KEY

  • pgpe -fat -r KEY

  • pgp -fat - KEY

DIRECTIVE TYPE AND DEFAULT VALUE

Global directive,
Catalog directive

EXAMPLES

Example: Specifying EncryptProgram

EncryptProgram gpg

Example: Specifying EncryptProgram with full path and arguments

EncryptProgram /usr/local/bin/gpg --batch --always-trust -e -a -r orders@mydomain.local

Example: Specifying EncryptProgram with full path and arguments

EncryptProgram /usr/bin/pgpe -fat -r orders@mydomain.local

NOTES

This directive is different from PGP, which is used to encrypt complete orders and not just part of their contents.

If the order Route method of sending orders is used (default in the standard demo), then this directive sets the default value of the encrypt_program attribute.

Since Interchange 4.7.7, specifying program filename only is enough — no arguments are needed, although they will still work as expected.

If the encrypt program is in your path, avoid using full pathname to ease the eventual switch to a platform with different binary file locations.

AVAILABILITY

EncryptProgram is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: lib/Vend/Config.pm
Line 443

['EncryptProgram',  'executable',     [ 'gpg', 'pgpe', 'none', ] ],

Source: lib/Vend/Config.pm
Line 4057 (context shows lines 4057-4113)

sub parse_executable {
my($var, $initial) = @_;
my($x);
my(@tries);

if(ref $initial) {
  @tries = @$initial;
}
else {
  @tries = $initial;
}

TRYEXE:
foreach my $value (@tries) {
#::logDebug("trying $value for $var");
  my $root = $value;
  $root =~ s/\s.*//;

  return $value if $Global::Windows;
  if( ! defined $value or $value eq '') {
    $x = '';
  }
  elsif( $value eq 'none') {
    $x = 'none';
    last;
  }
  elsif( $value =~ /^\w+::[:\w]+\w$/) {
    ## Perl module like Net::SMTP
    eval {
      eval "require $value";
      die if $@;
      $x = $value;
    };
    last if $x;
  }
  elsif ($root =~ m#^/# and -x $root) {
    $x = $value;
    last;
  }
  else {
    my @path = split /:/, $ENV{PATH};
    for (@path) {
      next unless -x "$_/$root";
      $x = $value;
      last TRYEXE;
    }
  }
}
config_error( errmsg(
        "Can't find executable (%s) for the %s directive\n",
        join('|', @tries),
        $var,
        )
  ) unless defined $x;
#::logDebug("$var=$x");
return $x;
}

Source: lib/Vend/Config.pm
Line 676

['EncryptProgram',   undef,            $Global::EncryptProgram || ''],

AUTHORS

Interchange Development Group

SEE ALSO

DebugFile(7ic), GPG_PATH(7ic), DEBUG(7ic), encrypt(7ic), DataTrace(7ic), PGP(7ic), EncryptKey(7ic), CreditCardAuto(7ic)

DocBook! Interchange!