#######################################################
#
# Tries to copy using TLS (which is default now), from two servers: one
# with the default TLS ciphers list and another with a non-default very
# restricted one.
#
# It should succeed in both cases since default client-side cipherlist
# is OpenSSL's default, which is very broad.
#
#######################################################

body common control
{
      inputs => { "../../default.cf.sub" };
      bundlesequence  => { default("$(this.promise_filename)") };

      # Do not set this, just use the very broad OpenSSL default.
      #
      # tls_ciphers => "";
}

bundle agent init
{
}

bundle agent test
{
  files:
      # Server with reordered default "allowciphers"
      "$(G.testdir)/destfile1"
          copy_from => dcs_remote_cp("simple_source", "127.0.0.1", "9893"),
          classes => classes_generic("copy1");
}

#######################################################

bundle agent check
{
  classes:
      "dummy"   expression => regextract("(.*)\.sub", $(this.promise_filename), "fn");
      "exists1" expression => fileexists("$(G.testdir)/destfile1");

  reports:

    copy1_repaired.exists1::
      "$(fn[1]) Pass";
}
