+ switch(dp->encrypt) {
+ case ENCRYPT_CUST:
+ if(am_has_feature(their_features, fe_options_encrypt_cust)) {
+ encrypt_opt = newvstralloc(encrypt_opt, "encrypt-cust=",
+ dp->clnt_encrypt, ";", NULL);
+ if (BSTRNCMP(encrypt_opt, "encrypt-cust=;") == 0) {
+ if(fdout) {
+ g_fprintf(fdout,
+ _("ERROR: %s:%s encrypt client with no encryption program specified\n"),
+ dp->host->hostname, qdpname);
+ }
+ err++;
+ }
+ if ( dp->compress == COMP_SERVER_FAST ||
+ dp->compress == COMP_SERVER_BEST ||
+ dp->compress == COMP_SERVER_CUST ) {
+ if(fdout) {
+ g_fprintf(fdout,
+ _("ERROR: %s:Client encryption with server compression is "
+ "not supported. See amanda.conf(5) for detail.\n"),
+ dp->host->hostname);
+ }
+ err++;
+ }
+ if(dp->clnt_decrypt_opt) {
+ if(am_has_feature(their_features, fe_options_client_decrypt_option)) {
+ decrypt_opt = newvstralloc(decrypt_opt, "client-decrypt-option=",
+ dp->clnt_decrypt_opt, ";", NULL);
+ }
+ else if(fdout) {
+ g_fprintf(fdout,
+ _("WARNING: %s:%s does not support client decrypt option\n"),
+ dp->host->hostname, qdpname);
+ }
+ }
+ }
+ else if(fdout) {
+ g_fprintf(fdout,
+ _("WARNING: %s:%s does not support client data encryption\n"),
+ dp->host->hostname, qdpname);
+ }
+ break;
+ case ENCRYPT_SERV_CUST:
+ if(am_has_feature(their_features, fe_options_encrypt_serv_cust)) {
+ encrypt_opt = newvstralloc(encrypt_opt, "encrypt-serv-cust=",
+ dp->srv_encrypt, ";", NULL);
+ if (BSTRNCMP(encrypt_opt, "encrypt-serv-cust=;") == 0){
+ if(fdout) {
+ g_fprintf(fdout,
+ _("ERROR: %s:%s No encryption program specified in dumptypes\n"),
+ dp->host->hostname, qdpname);
+ g_fprintf(fdout, _("Change the dumptype in the disklist or mention "
+ "the ecnryption program to use in the dumptypes file"));
+
+ }
+ err++;
+ }
+ if(dp->srv_decrypt_opt) {
+ if(am_has_feature(their_features, fe_options_server_decrypt_option)) {
+ decrypt_opt = newvstralloc(decrypt_opt, "server-decrypt-option=",
+ dp->srv_decrypt_opt, ";", NULL);
+ }
+ else if(fdout) {
+ g_fprintf(fdout,
+ _("WARNING: %s:%s does not support server decrypt option\n"),
+ dp->host->hostname, qdpname);
+ }
+ }
+ }
+ else if(fdout) {
+ g_fprintf(fdout,
+ _("WARNING: %s:%s does not support server data encryption\n"),
+ dp->host->hostname, qdpname);
+ }
+ break;
+ }
+