merged in sync debian_default_test
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Thu, 14 Nov 2019 16:47:58 +0100
branchdebian_default_test
changeset 4171d42a2ed6f5fb
parent 4170 14e0ece2e488
parent 4169 d605633f9a6f
child 4172 c06604b59922
merged in sync
     1.1 --- a/build-android/jni/Android.mk	Thu Nov 14 16:47:46 2019 +0100
     1.2 +++ b/build-android/jni/Android.mk	Thu Nov 14 16:47:58 2019 +0100
     1.3 @@ -4,12 +4,10 @@
     1.4  # see LICENSE.txt
     1.5  LOCAL_PATH := $(call my-dir)
     1.6  
     1.7 -LIBETPAN_PATH:=  $(LOCAL_PATH)/../../../pEpJNIAdapter/android/external/libetpan/build-android
     1.8 -
     1.9  include $(CLEAR_VARS)
    1.10  
    1.11 -ifeq ($(LIBETPAN_PATH),)
    1.12 -$(error LIBETPAN_PATH must be set)
    1.13 +ifeq ($(GPGBUILD),)
    1.14 +$(error GPGBUILD must be set)
    1.15  endif
    1.16  
    1.17  LOCAL_MODULE    := pEpEngine
    1.18 @@ -25,9 +23,8 @@
    1.19  LOCAL_CFLAGS    += -DSQLITE_TEMP_STORE=3 -DUSE_SEQUOIA
    1.20  
    1.21  LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../asn.1 \
    1.22 -                    $(GPGME_INCLUDE_PATH) \
    1.23 -                    $(LIBETPAN_PATH)/include
    1.24 -LOCAL_C_INCLUDES += $(GPGBUILD)/$(TARGET_ARCH_ABI)/app_opt/include
    1.25 +
    1.26 +LOCAL_C_INCLUDES += $(GPGBUILD)/$(TARGET_ARCH_ABI)/include
    1.27  
    1.28  $(shell sh $(LOCAL_PATH)/../takeOutHeaderFiles.sh $(LOCAL_PATH)../../)
    1.29  LOCAL_EXPORT_C_INCLUDES += $(LOCAL_PATH)../include
     2.1 --- a/build-android/jni/Application.mk	Thu Nov 14 16:47:46 2019 +0100
     2.2 +++ b/build-android/jni/Application.mk	Thu Nov 14 16:47:58 2019 +0100
     2.3 @@ -1,4 +1,4 @@
     2.4  APP_OPTIM := debug
     2.5  APP_PLATFORM=android-21
     2.6 -APP_ABI := arm64-v8a
     2.7 +#APP_ABI := arm64-v8a
     2.8  NDK_TOOLCHAIN_VERSION = clang
     3.1 --- a/build-windows/generate_code.cmd	Thu Nov 14 16:47:46 2019 +0100
     3.2 +++ b/build-windows/generate_code.cmd	Thu Nov 14 16:47:58 2019 +0100
     3.3 @@ -3,11 +3,11 @@
     3.4  
     3.5  if not exist generated mkdir generated
     3.6  
     3.7 -python "%YML_PATH%\yml2proc" -E utf-8 -y gen_actions.ysl2 sync.fsm
     3.8 -python "%YML_PATH%\yml2proc" -E utf-8 -y gen_statemachine.ysl2 sync.fsm
     3.9 -python "%YML_PATH%\yml2proc" -E utf-8 -y gen_codec.ysl2 sync.fsm
    3.10 -python "%YML_PATH%\yml2proc" -E utf-8 -y gen_messages.ysl2 sync.fsm
    3.11 -python "%YML_PATH%\yml2proc" -E utf-8 -y gen_message_func.ysl2 sync.fsm
    3.12 +py "%YML_PATH%\yml2proc" -E utf-8 -y gen_actions.ysl2 sync.fsm
    3.13 +py "%YML_PATH%\yml2proc" -E utf-8 -y gen_statemachine.ysl2 sync.fsm
    3.14 +py "%YML_PATH%\yml2proc" -E utf-8 -y gen_codec.ysl2 sync.fsm
    3.15 +py "%YML_PATH%\yml2proc" -E utf-8 -y gen_messages.ysl2 sync.fsm
    3.16 +py "%YML_PATH%\yml2proc" -E utf-8 -y gen_message_func.ysl2 sync.fsm
    3.17  
    3.18  xcopy /y generated\*.asn1 ..\asn.1\
    3.19  xcopy /y generated\*.c ..\src\
     4.1 --- a/src/pgp_sequoia.c	Thu Nov 14 16:47:46 2019 +0100
     4.2 +++ b/src/pgp_sequoia.c	Thu Nov 14 16:47:58 2019 +0100
     4.3 @@ -36,9 +36,10 @@
     4.4      } while (0)
     4.5  #  elif _WIN32
     4.6  #    define _T(...) do {                        \
     4.7 -		char str[256];                          \
     4.8 -		snprintf(str, 256, ##__VA_ARGS__);      \
     4.9 -		OutputDebugStringA(str);                \
    4.10 +        char str[256];                          \
    4.11 +        snprintf(str, 256, ##__VA_ARGS__);      \
    4.12 +        OutputDebugStringA(str);                \
    4.13 +        fprintf(stderr, ##__VA_ARGS__);         \
    4.14      } while (0)
    4.15  
    4.16  #  else
     5.1 --- a/src/sync_api.h	Thu Nov 14 16:47:46 2019 +0100
     5.2 +++ b/src/sync_api.h	Thu Nov 14 16:47:58 2019 +0100
     5.3 @@ -27,15 +27,15 @@
     5.4      // handshake accepted by user
     5.5      SYNC_NOTIFY_ACCEPTED_DEVICE_ADDED = 6,
     5.6      SYNC_NOTIFY_ACCEPTED_GROUP_CREATED = 7,
     5.7 -    // SYNC_NOTIFY_ACCEPTED_DEVICE_MOVED = 8,
     5.8 +    SYNC_NOTIFY_ACCEPTED_DEVICE_ACCEPTED = 8,
     5.9  
    5.10      // handshake dialog must be closed
    5.11 -    SYNC_NOTIFY_OVERTAKEN = 9,
    5.12 +    // SYNC_NOTIFY_OVERTAKEN = 9,
    5.13  
    5.14 -    // formig group
    5.15 -    SYNC_NOTIFY_FORMING_GROUP = 10,
    5.16 +    // forming group
    5.17 +    // SYNC_NOTIFY_FORMING_GROUP = 10,
    5.18  
    5.19 -    // notificaton of actual group status
    5.20 +    // notification of actual group status
    5.21      SYNC_NOTIFY_SOLE = 254,
    5.22      SYNC_NOTIFY_IN_GROUP = 255
    5.23  } sync_handshake_signal;
     6.1 --- a/sync/cond_act_sync.yml2	Thu Nov 14 16:47:46 2019 +0100
     6.2 +++ b/sync/cond_act_sync.yml2	Thu Nov 14 16:47:58 2019 +0100
     6.3 @@ -318,15 +318,12 @@
     6.4  action showGroupedHandshake
     6.5      call "show_handshake" with "type" > SYNC_NOTIFY_INIT_ADD_OTHER_DEVICE
     6.6  
     6.7 -action hideHandshakeDialog
     6.8 -    call "show_handshake" with "type" > SYNC_NOTIFY_OVERTAKEN
     6.9 -
    6.10  action showDeviceAdded
    6.11      call "show_handshake" with "type" > SYNC_NOTIFY_ACCEPTED_DEVICE_ADDED
    6.12  
    6.13 -action showFormingGroup
    6.14 -    call "show_handshake" with "type" > SYNC_NOTIFY_FORMING_GROUP
    6.15 -    
    6.16 +action showDeviceAccepted
    6.17 +    call "show_handshake" with "type" > SYNC_NOTIFY_ACCEPTED_DEVICE_ACCEPTED
    6.18 +
    6.19  action showGroupCreated
    6.20      call "show_handshake" with "type" > SYNC_NOTIFY_ACCEPTED_GROUP_CREATED
    6.21  
    6.22 @@ -496,7 +493,7 @@
    6.23      if (!session->sync_state.keysync.key.size)
    6.24          return PEP_ILLEGAL_VALUE;
    6.25  
    6.26 -    char *fpr = strndup(session->sync_state.keysync.key.buf, session->sync_state.keysync.key.size);
    6.27 +    char *fpr = strndup((const char *) session->sync_state.keysync.key.buf, session->sync_state.keysync.key.size);
    6.28      assert(fpr);
    6.29      if (!fpr)
    6.30          return PEP_OUT_OF_MEMORY;
     7.1 --- a/sync/sync.fsm	Thu Nov 14 16:47:46 2019 +0100
     7.2 +++ b/sync/sync.fsm	Thu Nov 14 16:47:58 2019 +0100
     7.3 @@ -239,7 +239,6 @@
     7.4              on Init {
     7.5                  do prepareOwnKeys;
     7.6                  send OwnKeysOfferer; // we're not grouped yet, this is our own keys
     7.7 -                do showFormingGroup;
     7.8              }
     7.9  
    7.10              on Cancel {
    7.11 @@ -259,9 +258,6 @@
    7.12          }
    7.13  
    7.14          state FormingGroupRequester {
    7.15 -            on Init
    7.16 -                do showFormingGroup;
    7.17 -
    7.18              on Cancel {
    7.19                  send Rollback;
    7.20                  go Sole;
    7.21 @@ -391,7 +387,7 @@
    7.22                  do saveGroupKeys;
    7.23                  do receivedKeysAreDefaultKeys;
    7.24                  do prepareOwnKeys;
    7.25 -                send GroupKeys;
    7.26 +                send GroupKeysAndClose;
    7.27                  do showDeviceAdded;
    7.28                  go Grouped;
    7.29              }
    7.30 @@ -422,8 +418,6 @@
    7.31              // Accept is Phase1Commit
    7.32              on Accept {
    7.33                  do trustThisKey;
    7.34 -                send GroupTrustThisKey;
    7.35 -                send CommitAcceptForGroup;
    7.36                  go HandshakingGroupedPhase1;
    7.37              }
    7.38  
    7.39 @@ -431,7 +425,6 @@
    7.40                  go HandshakingGroupedPhase2;
    7.41  
    7.42              on GroupTrustThisKey {
    7.43 -                do hideHandshakeDialog;
    7.44                  do trustThisKey;
    7.45                  if sameNegotiation
    7.46                      go Grouped;
    7.47 @@ -442,6 +435,11 @@
    7.48          }
    7.49  
    7.50          state HandshakingGroupedPhase1 {
    7.51 +            on Init {
    7.52 +                send GroupTrustThisKey;
    7.53 +                send CommitAcceptForGroup;
    7.54 +            }
    7.55 +
    7.56              on Rollback if sameNegotiationAndPartner
    7.57                  go Grouped;
    7.58  
    7.59 @@ -451,17 +449,20 @@
    7.60              on CommitAccept if sameNegotiationAndPartner {
    7.61                  do prepareOwnKeys;
    7.62                  send GroupKeys;
    7.63 +                do showDeviceAccepted;
    7.64                  go Grouped;
    7.65              }
    7.66  
    7.67 -            on GroupTrustThisKey {
    7.68 +            on GroupTrustThisKey
    7.69                  do trustThisKey;
    7.70 -                if sameNegotiation
    7.71 -                    go Grouped;
    7.72 -            }
    7.73  
    7.74              on GroupKeys
    7.75                  do saveGroupKeys;
    7.76 +            
    7.77 +            on GroupKeysAndClose {
    7.78 +                do saveGroupKeys;
    7.79 +                go Grouped;
    7.80 +            }
    7.81          }
    7.82  
    7.83          state HandshakingGroupedPhase2 {
    7.84 @@ -480,17 +481,20 @@
    7.85                  send GroupTrustThisKey;
    7.86                  do prepareOwnKeys;
    7.87                  send GroupKeys;
    7.88 +                do showDeviceAccepted;
    7.89                  go Grouped;
    7.90              }
    7.91  
    7.92 -            on GroupTrustThisKey {
    7.93 +            on GroupTrustThisKey
    7.94                  do trustThisKey;
    7.95 -                if sameNegotiation
    7.96 -                    go Grouped;
    7.97 -            }
    7.98  
    7.99              on GroupKeys
   7.100                  do saveGroupKeys;
   7.101 +            
   7.102 +            on GroupKeysAndClose {
   7.103 +                do saveGroupKeys;
   7.104 +                go Grouped;
   7.105 +            }
   7.106          }
   7.107   
   7.108          external Accept 129;
   7.109 @@ -551,23 +555,27 @@
   7.110              field IdentityList ownIdentities;
   7.111          }
   7.112  
   7.113 -        message OwnKeysOfferer 13, security=attach_own_keys {
   7.114 +        message GroupKeysAndClose 13, security=attach_own_keys {
   7.115              field IdentityList ownIdentities;
   7.116          }
   7.117  
   7.118 -        message OwnKeysRequester 14, security=attach_own_keys {
   7.119 +        message OwnKeysOfferer 14, security=attach_own_keys {
   7.120 +            field IdentityList ownIdentities;
   7.121 +        }
   7.122 +
   7.123 +        message OwnKeysRequester 15, security=attach_own_keys {
   7.124              field IdentityList ownIdentities;
   7.125          }
   7.126  
   7.127          // grouped handshake
   7.128 -        message NegotiationRequestGrouped 15, security=untrusted {
   7.129 +        message NegotiationRequestGrouped 16, security=untrusted {
   7.130              field TID challenge;
   7.131              auto Version version;
   7.132              field TID negotiation;
   7.133              field bool is_group;
   7.134          }
   7.135  
   7.136 -        message GroupHandshake 16 {
   7.137 +        message GroupHandshake 17 {
   7.138              field TID negotiation;
   7.139              field Hash key;
   7.140          }