merged usage() information from master
[fwknop.git] / server / incoming_spa.c
index 2c33192..254990e 100644 (file)
@@ -345,7 +345,8 @@ incoming_spa(fko_srv_options_t *opts)
         if(enc_type == FKO_ENCRYPTION_RIJNDAEL)
         {
             if(acc->key != NULL)
-                res = fko_new_with_data(&ctx, (char *)spa_pkt->packet_data, acc->key);
+                res = fko_new_with_data(&ctx,
+                    (char *)spa_pkt->packet_data, acc->key, acc->encryption_mode);
             else
             {
                 log_msg(LOG_ERR,
@@ -359,11 +360,12 @@ incoming_spa(fko_srv_options_t *opts)
         else if(enc_type == FKO_ENCRYPTION_GPG)
         {
             /* For GPG we create the new context without decrypting on the fly
-             * so we can set some  GPG parameters first.
+             * so we can set some GPG parameters first.
             */
             if(acc->gpg_decrypt_pw != NULL)
             {
-                res = fko_new_with_data(&ctx, (char *)spa_pkt->packet_data, NULL);
+                res = fko_new_with_data(&ctx, (char *)spa_pkt->packet_data, NULL,
+                        acc->encryption_mode);
                 if(res != FKO_SUCCESS)
                 {
                     log_msg(LOG_WARNING,