src/message_api.c
changeset 2338 b70a6082836b
parent 2337 ce5d8de1321c
child 2340 5c5ef77d15da
     1.1 --- a/src/message_api.c	Sat Dec 30 15:41:38 2017 +0100
     1.2 +++ b/src/message_api.c	Sat Dec 30 16:06:57 2017 +0100
     1.3 @@ -1420,13 +1420,14 @@
     1.4      assert(src);
     1.5      assert(dst);
     1.6  
     1.7 -    if (!(session && src && dst && enc_format != PEP_enc_none))
     1.8 +    if (!(session && src && dst))
     1.9          return ADD_TO_LOG(PEP_ILLEGAL_VALUE);
    1.10  
    1.11      if (src->dir == PEP_dir_incoming)
    1.12          return ADD_TO_LOG(PEP_ILLEGAL_VALUE);
    1.13  
    1.14      determine_encryption_format(src);
    1.15 +    // TODO: change this for multi-encryption in message format 2.0
    1.16      if (src->enc_format != PEP_enc_none)
    1.17          return ADD_TO_LOG(PEP_ILLEGAL_VALUE);
    1.18  
    1.19 @@ -1576,6 +1577,10 @@
    1.20                  // TODO: implement
    1.21                  NOT_IMPLEMENTED */
    1.22  
    1.23 +            case PEP_enc_none:
    1.24 +                status = PEP_UNENCRYPTED;
    1.25 +                break;
    1.26 +
    1.27              default:
    1.28                  assert(0);
    1.29                  status = PEP_ILLEGAL_VALUE;