sync/gen_statemachine.ysl2
branchsync
changeset 3129 ad8aa4d09cf0
parent 3127 d97ed5c1c16e
child 3143 81c80e27cbf7
     1.1 --- a/sync/gen_statemachine.ysl2	Thu Nov 08 13:20:38 2018 +0100
     1.2 +++ b/sync/gen_statemachine.ysl2	Tue Nov 20 12:32:09 2018 +0100
     1.3 @@ -451,25 +451,38 @@
     1.4                          goto the_end;
     1.5                      }
     1.6                      memcpy(_data, data, size);
     1.7 -                    status = base_prepare_message(
     1.8 -                            li->ident,
     1.9 -                            li->ident,
    1.10 -                            _data,
    1.11 -                            size,
    1.12 -                            &_m
    1.13 -                        );
    1.14 -                    if (status) {
    1.15 -                        free(_data);
    1.16 -                        goto the_end;
    1.17 -                    }
    1.18  
    1.19                      switch (message_type) {
    1.20                      `` for "fsm/message[@security='unencrypted']" |>>> case «../@name»__payload_PR_«yml:mixedCase(@name)»:
    1.21 +                            status = base_prepare_message(
    1.22 +                                    li->ident,
    1.23 +                                    li->ident,
    1.24 +                                    _data,
    1.25 +                                    size,
    1.26 +                                    li->ident->fpr,
    1.27 +                                    &_m
    1.28 +                                );
    1.29 +                            if (status) {
    1.30 +                                free(_data);
    1.31 +                                goto the_end;
    1.32 +                            }
    1.33                              attach_own_key(session, _m);
    1.34                              m = _m;
    1.35                              break;
    1.36  
    1.37                          default:
    1.38 +                            status = base_prepare_message(
    1.39 +                                    li->ident,
    1.40 +                                    li->ident,
    1.41 +                                    _data,
    1.42 +                                    size,
    1.43 +                                    NULL,
    1.44 +                                    &_m
    1.45 +                                );
    1.46 +                            if (status) {
    1.47 +                                free(_data);
    1.48 +                                goto the_end;
    1.49 +                            }
    1.50                              status = encrypt_message(session, _m, NULL, &m, PEP_enc_PEP, 0);
    1.51                              if (status) {
    1.52                                  status = PEP_«yml:ucase(@name)»_CANNOT_ENCRYPT;