Browse Source

add Distribution.Exploration

IOSAD-201_from_Release_3.0
Volker Birk 7 months ago
parent
commit
fc9fb9e4b6
6 changed files with 57 additions and 6 deletions
  1. +1
    -0
      .gitignore
  2. +3
    -3
      asn.1/Makefile
  3. +1
    -1
      asn.1/pEp.asn1
  4. +1
    -0
      codegen/cond_act_sync.yml2
  5. +28
    -0
      codegen/distribution.fsm
  6. +23
    -2
      codegen/sync.fsm

+ 1
- 0
.gitignore View File

@ -78,6 +78,7 @@ asn.1/groupsync.asn1
asn.1/keyreset.asn1
asn.1/sync.asn1
asn.1/distribution.asn1
asn.1/exploration.asn1
asn.1/storage.asn1
asn.1/messagestorage.asn1
sync/.codecs


+ 3
- 3
asn.1/Makefile View File

@ -24,8 +24,8 @@ Sync.c: sync.asn1 keysync.asn1 trustsync.asn1 groupsync.asn1 pEp.asn1
rm -f converter-sample.c
touch Sync.c
Distribution.c: distribution.asn1 keyreset.asn1 managedgroup.asn1 pEp.asn1
$(ASN1C) -gen-PER -fincludes-quoted -fcompound-names -pdu=auto pEp.asn1 keyreset.asn1 managedgroup.asn1 $<
Distribution.c: distribution.asn1 keyreset.asn1 managedgroup.asn1 exploration.asn1 pEp.asn1
$(ASN1C) -gen-PER -fincludes-quoted -fcompound-names -pdu=auto pEp.asn1 keyreset.asn1 managedgroup.asn1 exploration.asn1 $<
rm -f converter-sample.c
touch Distribution.c
@ -35,7 +35,7 @@ Storage.c: storage.asn1 messagestorage.asn1 pEp.asn1
touch Storage.c
clean:
rm -f *.a *.o *.c *.h *.sample sync.asn1 keysync.asn1 trustsync.asn1 groupsync.asn1 distribution.asn1 keyreset.asn1 managedgroup.asn1 storage.asn1 messagestorage.asn1
rm -f *.a *.o *.c *.h *.sample sync.asn1 keysync.asn1 trustsync.asn1 groupsync.asn1 distribution.asn1 keyreset.asn1 managedgroup.asn1 exploration.asn1 storage.asn1 messagestorage.asn1
install:


+ 1
- 1
asn.1/pEp.asn1 View File

@ -1,7 +1,7 @@
-- This file is under BSD License 2.0
-- Sync protocol for p≡p
-- Copyright (c) 2016, 2010 p≡p foundation
-- Copyright (c) 2016-2021 p≡p foundation
-- Written by Volker Birk


+ 1
- 0
codegen/cond_act_sync.yml2 View File

@ -369,6 +369,7 @@ timeout KeySync
call "show_handshake" with "type" > SYNC_NOTIFY_TIMEOUT
timeout TrustSync;
timeout GroupSync;
action prepareOwnKeys
||


+ 28
- 0
codegen/distribution.fsm View File

@ -22,6 +22,7 @@ protocol Distribution 2 {
}
}
// this protocol is stateless
fsm ManagedGroup 2 {
version 1, 0;
@ -40,5 +41,32 @@ protocol Distribution 2 {
field Identity manager;
}
}
fsm Exploration 3 {
version 1, 0;
message ExploreRequest 2 {
field TID challenge;
field Identity forward;
}
message ExploreAnswer 3 {
field TID challenge;
field Identity forward;
field Identity back;
}
message ExploreChallenge 4 {
field TID challenge;
field Identity forward;
field Identity back;
}
message ExploreResponse 5 {
field TID challenge;
field Identity forward;
field Identity back;
}
}
}

+ 23
- 2
codegen/sync.fsm View File

@ -705,8 +705,15 @@ protocol Sync 1 {
}
}
// if trust changes send an update to the device group
message TrustUpdate 2 {
auto Version version;
field IdentityList trust;
}
// if we should know the trust status ask the device group
message TrustRequest 3 {
field IdentityList trust;
}
}
@ -716,9 +723,15 @@ protocol Sync 1 {
state InitState {
on Init {
go WaitForGroupUpdate;
}
}
state WaitForGroupUpdate {
}
// reflect incoming ManagedGroup messages
message GroupSyncCreate 2 {
field Identity groupIdentity;
@ -734,5 +747,13 @@ protocol Sync 1 {
field Identity groupIdentity;
field Identity manager;
}
// in case a ManagedGroup message arrives for an unknown group ask the
// other devices
message GroupSyncRequest 5 {
field Identity groupIdentity;
field Identity manager;
}
}
}

Loading…
Cancel
Save