Browse Source

define own protocol family for storage security

doxygen_doc
Volker Birk 7 months ago
parent
commit
182ad1c481
6 changed files with 38 additions and 6 deletions
  1. +3
    -0
      .gitignore
  2. +7
    -2
      asn.1/Makefile
  3. +4
    -2
      codegen/Makefile
  4. +21
    -0
      codegen/storage.fsm
  5. +2
    -2
      src/Makefile
  6. +1
    -0
      src/pEpEngine.h

+ 3
- 0
.gitignore View File

@ -69,10 +69,13 @@ src/KeySync_*
src/Sync_*
src/sync_codec.*
src/distribution_codec.*
src/storage_codec.*
asn.1/keysync.asn1
asn.1/keyreset.asn1
asn.1/sync.asn1
asn.1/distribution.asn1
asn.1/storage.asn1
asn.1/messagestorage.asn1
sync/.codecs
sync/.messages
sync/.actions


+ 7
- 2
asn.1/Makefile View File

@ -10,7 +10,7 @@ ASN1C_INC+= -I.
.PHONY: all clean install uninstall
all: Sync.c Distribution.c
all: Sync.c Distribution.c Storage.c
$(MAKE) libasn1.a
libasn1.a: $(ALL_OBJECTS)
@ -29,8 +29,13 @@ Distribution.c: distribution.asn1 keyreset.asn1 managedgroup.asn1 pEp.asn1
rm -f converter-sample.c
touch Distribution.c
Storage.c: storage.asn1 messagestorage.asn1 pEp.asn1
$(ASN1C) -gen-PER -fincludes-quoted -fcompound-names -pdu=auto pEp.asn1 messagestorage.asn1 $<
rm -f converter-sample.c
touch Storage.c
clean:
rm -f *.a *.o *.c *.h *.sample sync.asn1 keysync.asn1 distribution.asn1 keyreset.asn1 managedgroup.asn1
rm -f *.a *.o *.c *.h *.sample sync.asn1 keysync.asn1 distribution.asn1 keyreset.asn1 managedgroup.asn1 storage.asn1 messagestorage.asn1
install:


+ 4
- 2
codegen/Makefile View File

@ -16,14 +16,16 @@ generated:
.statemachines: sync.fsm gen_statemachine.ysl2 fsm.yml2 functions.ysl2 | generated
$(YML2_PROC) -y gen_statemachine.ysl2 $< -o $@
.codecs: sync.fsm distribution.fsm gen_codec.ysl2 fsm.yml2 functions.ysl2 | generated
.codecs: sync.fsm distribution.fsm storage.fsm gen_codec.ysl2 fsm.yml2 functions.ysl2 | generated
$(YML2_PROC) -y gen_codec.ysl2 $< -o $@
$(YML2_PROC) -y gen_codec.ysl2 distribution.fsm -o $@
$(YML2_PROC) -y gen_codec.ysl2 storage.fsm -o $@
.messages: sync.fsm distribution.fsm gen_messages.ysl2 gen_message_func.ysl2 fsm.yml2 functions.ysl2 | generated
.messages: sync.fsm distribution.fsm storage.fsm gen_messages.ysl2 gen_message_func.ysl2 fsm.yml2 functions.ysl2 | generated
$(YML2_PROC) -y gen_messages.ysl2 $< -o $@
$(YML2_PROC) -y gen_message_func.ysl2 $< -o $@
$(YML2_PROC) -y gen_messages.ysl2 distribution.fsm -o $@
$(YML2_PROC) -y gen_messages.ysl2 storage.fsm -o $@
clean:
rm -rf generated


+ 21
- 0
codegen/storage.fsm View File

@ -0,0 +1,21 @@
// This file is under BSD License 2.0
// Storage protocol for p≡p
// Copyright (c) 2021, p≡p foundation
// Written by Volker Birk
include ./fsm.yml2
protocol Storage 3 {
// this protocol is stateless
fsm MessageStorage 1 {
version 1, 0;
message ReceiverRating 2, security=ignore {
field Rating rating;
}
}
}

+ 2
- 2
src/Makefile View File

@ -95,7 +95,7 @@ libpEpEngine.a: $(ALL_OBJECTS)
clean:
rm -f *.d *.o *.a $(TARGET) *.dll *.so *.zip *.d.* *.def *~
rm -Rf $(TARGET).dSYM
rm -f KeySync_fsm.* Sync_actions.c Sync_event.* Sync_func.* Sync_impl.* sync_codec.* distribution_codec.*
rm -f KeySync_fsm.* Sync_actions.c Sync_event.* Sync_func.* Sync_impl.* sync_codec.* distribution_codec.* storage_codec.*
# CAVEAT:
# install_headers is needed for building *STANDALONE* pEp MIME - it is NOT used for built-in functionality!!!
@ -105,7 +105,7 @@ install_headers: $(TARGET)
cp pEpEngine.h keymanagement.h message_api.h dynamic_api.h stringlist.h \
timestamp.h identity_list.h bloblist.h stringpair.h message.h mime.h \
cryptotech.h sync_api.h blacklist.h pEp_string.h openpgp_compat.h engine_sql.h \
labeled_int_list.h key_reset.h base64.h sync_codec.h distribution_codec.h \
labeled_int_list.h key_reset.h base64.h sync_codec.h distribution_codec.h storage_codec.h \
status_to_string.h aux_mime_msg.h keyreset_command.h platform.h platform_unix.h ../asn.1/*.h \
$(PREFIX)/include/pEp/


+ 1
- 0
src/pEpEngine.h View File

@ -159,6 +159,7 @@ typedef enum {
PEP_CANNOT_RETRIEVE_MEMBERSHIP_INFO = 0x0b0b,
PEP_DISTRIBUTION_ILLEGAL_MESSAGE = 0x1002,
PEP_STORAGE_ILLEGAL_MESSAGE = 0x1102,
PEP_COMMIT_FAILED = 0xff01,
PEP_MESSAGE_CONSUME = 0xff02,


Loading…
Cancel
Save