merged in default and added key_reset.h file sync
authorKrista Bennett <krista@pep-project.org>
Fri, 05 Oct 2018 15:03:04 +0200
branchsync
changeset 301734a733193f47
parent 3008 b2d7141a42e9
parent 3016 bd2796d69c13
child 3018 51d334ed9a02
merged in default and added key_reset.h file
src/Makefile
src/keymanagement.c
     1.1 --- a/build-mac/pEpEngine.xcodeproj/project.pbxproj	Fri Oct 05 11:31:55 2018 +0200
     1.2 +++ b/build-mac/pEpEngine.xcodeproj/project.pbxproj	Fri Oct 05 15:03:04 2018 +0200
     1.3 @@ -14,6 +14,8 @@
     1.4  		43370834203C075A004E6547 /* sqlite3.h in Headers */ = {isa = PBXBuildFile; fileRef = 43370832203C075A004E6547 /* sqlite3.h */; };
     1.5  		4354FF651D6EDF300033069C /* sync_impl.c in Sources */ = {isa = PBXBuildFile; fileRef = 4354FF641D6EDF300033069C /* sync_impl.c */; };
     1.6  		4354FF691D6EE1A70033069C /* NULL.c in Sources */ = {isa = PBXBuildFile; fileRef = 4354FF681D6EE1A70033069C /* NULL.c */; };
     1.7 +		438C43B52167752C00C7425B /* labeled_int_list.h in Headers */ = {isa = PBXBuildFile; fileRef = 438C43AF2167752C00C7425B /* labeled_int_list.h */; };
     1.8 +		438C43B62167752C00C7425B /* labeled_int_list.c in Sources */ = {isa = PBXBuildFile; fileRef = 438C43B42167752C00C7425B /* labeled_int_list.c */; };
     1.9  		43BA0F461D7964750059172F /* asn1_helper.c in Sources */ = {isa = PBXBuildFile; fileRef = 43BA0F451D7964750059172F /* asn1_helper.c */; };
    1.10  		43E9BC6A1DB51A1E00AD2352 /* GroupUpdate.c in Sources */ = {isa = PBXBuildFile; fileRef = 43E9BC691DB51A1E00AD2352 /* GroupUpdate.c */; };
    1.11  		43E9BC7F1DB6720E00AD2352 /* UpdateRequest.c in Sources */ = {isa = PBXBuildFile; fileRef = 43E9BC7E1DB6720E00AD2352 /* UpdateRequest.c */; };
    1.12 @@ -201,6 +203,8 @@
    1.13  		4346F86A1ECB38E700381CBE /* sync_app.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = sync_app.h; path = ../src/sync_app.h; sourceTree = "<group>"; };
    1.14  		4354FF641D6EDF300033069C /* sync_impl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sync_impl.c; path = ../src/sync_impl.c; sourceTree = "<group>"; };
    1.15  		4354FF681D6EE1A70033069C /* NULL.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = NULL.c; path = ../asn.1/NULL.c; sourceTree = "<group>"; };
    1.16 +		438C43AF2167752C00C7425B /* labeled_int_list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = labeled_int_list.h; path = ../src/labeled_int_list.h; sourceTree = "<group>"; };
    1.17 +		438C43B42167752C00C7425B /* labeled_int_list.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = labeled_int_list.c; path = ../src/labeled_int_list.c; sourceTree = "<group>"; };
    1.18  		43BA0F451D7964750059172F /* asn1_helper.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = asn1_helper.c; path = ../src/asn1_helper.c; sourceTree = "<group>"; };
    1.19  		43E9BC691DB51A1E00AD2352 /* GroupUpdate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = GroupUpdate.c; path = ../asn.1/GroupUpdate.c; sourceTree = "<group>"; };
    1.20  		43E9BC7E1DB6720E00AD2352 /* UpdateRequest.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = UpdateRequest.c; path = ../asn.1/UpdateRequest.c; sourceTree = "<group>"; };
    1.21 @@ -514,6 +518,8 @@
    1.22  		64A8264B1B455C5600EECAF0 /* srcref */ = {
    1.23  			isa = PBXGroup;
    1.24  			children = (
    1.25 +				438C43B42167752C00C7425B /* labeled_int_list.c */,
    1.26 +				438C43AF2167752C00C7425B /* labeled_int_list.h */,
    1.27  				4337082D203C075A004E6547 /* sqlite3.c */,
    1.28  				43370832203C075A004E6547 /* sqlite3.h */,
    1.29  				430BCC472015EE800077E998 /* pEp_string.c */,
    1.30 @@ -593,6 +599,7 @@
    1.31  				646C40F21D510CD800C63EFF /* asn_SET_OF.h in Headers */,
    1.32  				646C41311D510CD800C63EFF /* PrintableString.h in Headers */,
    1.33  				646C40F51D510CD800C63EFF /* Beacon.h in Headers */,
    1.34 +				438C43B52167752C00C7425B /* labeled_int_list.h in Headers */,
    1.35  				646C40F71D510CD800C63EFF /* ber_decoder.h in Headers */,
    1.36  				646C41351D510CD800C63EFF /* UTF8String.h in Headers */,
    1.37  				646C40EC1D510CD800C63EFF /* asn_codecs_prim.h in Headers */,
    1.38 @@ -793,7 +800,7 @@
    1.39  			);
    1.40  			runOnlyForDeploymentPostprocessing = 0;
    1.41  			shellPath = /bin/sh;
    1.42 -			shellScript = "mkdir -p \"$BUILT_PRODUCTS_DIR/include\"\n\ncp \"$SRCROOT/../src/\"{\\\npEpEngine.h,\\\ncryptotech.h,\\\nkeymanagement.h,\\\nmessage_api.h,\\\ndynamic_api.h,\\\nstringlist.h,\\\ntimestamp.h,\\\nidentity_list.h,\\\nbloblist.h,\\\nstringpair.h,\\\nmessage.h,\\\nmime.h,\\\nsync_fsm.h,\\\nsync.h,\\\nsync_app.h} \"$BUILT_PRODUCTS_DIR/include\"\n\nbash -l -c \"make -C ../asn.1 generate\"\nbash -l -c \"make -C ../asn.1\"\nbash -l -c \"LC_ALL=en_US.UTF-8 YML_PATH=$HOME/yml2 make -C ../sync\"\n";
    1.43 +			shellScript = "bash -l -c \"make -C ../asn.1 generate\"\nbash -l -c \"make -C ../asn.1\"\nbash -l -c \"LC_ALL=en_US.UTF-8 YML_PATH=$HOME/yml2 make -C ../sync\"\n";
    1.44  		};
    1.45  /* End PBXShellScriptBuildPhase section */
    1.46  
    1.47 @@ -818,6 +825,7 @@
    1.48  				646C41301D510CD800C63EFF /* PrintableString.c in Sources */,
    1.49  				64A8267B1B455D0800EECAF0 /* etpan_mime.c in Sources */,
    1.50  				64A8267A1B455D0800EECAF0 /* email.c in Sources */,
    1.51 +				438C43B62167752C00C7425B /* labeled_int_list.c in Sources */,
    1.52  				646C41261D510CD800C63EFF /* OCTET_STRING.c in Sources */,
    1.53  				646C41141D510CD800C63EFF /* Hash.c in Sources */,
    1.54  				646C410E1D510CD800C63EFF /* DeviceGroup-Protocol.c in Sources */,
    1.55 @@ -1044,6 +1052,7 @@
    1.56  		64796A541B455AA5004B1C24 /* Debug */ = {
    1.57  			isa = XCBuildConfiguration;
    1.58  			buildSettings = {
    1.59 +				HEADER_SEARCH_PATHS = "$(inherited)";
    1.60  				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
    1.61  				LIBRARY_SEARCH_PATHS = (
    1.62  					"$(inherited)",
    1.63 @@ -1054,12 +1063,14 @@
    1.64  				OTHER_LDFLAGS = "-ObjC";
    1.65  				PRODUCT_NAME = "$(TARGET_NAME)";
    1.66  				SKIP_INSTALL = YES;
    1.67 +				USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../src $(PROJECT_DIR) $(PROJECT_DIR)/../../netpgp-et/include/ $(PROJECT_DIR)/../../netpgp-et/src/ $(PROJECT_DIR)/../../OpenSSL-for-iPhone/include $(PROJECT_DIR)/../asn.1/ $(inherited)";
    1.68  			};
    1.69  			name = Debug;
    1.70  		};
    1.71  		64796A551B455AA5004B1C24 /* Release */ = {
    1.72  			isa = XCBuildConfiguration;
    1.73  			buildSettings = {
    1.74 +				HEADER_SEARCH_PATHS = "$(inherited)";
    1.75  				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
    1.76  				LIBRARY_SEARCH_PATHS = (
    1.77  					"$(inherited)",
    1.78 @@ -1069,6 +1080,7 @@
    1.79  				OTHER_LDFLAGS = "-ObjC";
    1.80  				PRODUCT_NAME = "$(TARGET_NAME)";
    1.81  				SKIP_INSTALL = YES;
    1.82 +				USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../src $(PROJECT_DIR) $(PROJECT_DIR)/../../netpgp-et/include/ $(PROJECT_DIR)/../../netpgp-et/src/ $(PROJECT_DIR)/../../OpenSSL-for-iPhone/include $(PROJECT_DIR)/../asn.1/ $(inherited)";
    1.83  			};
    1.84  			name = Release;
    1.85  		};
     2.1 --- a/src/Makefile	Fri Oct 05 11:31:55 2018 +0200
     2.2 +++ b/src/Makefile	Fri Oct 05 15:03:04 2018 +0200
     2.3 @@ -90,6 +90,7 @@
     2.4  	cp -v pEpEngine.h keymanagement.h message_api.h dynamic_api.h stringlist.h \
     2.5  	      timestamp.h identity_list.h bloblist.h stringpair.h message.h mime.h \
     2.6  	      cryptotech.h sync_api.h blacklist.h pEp_string.h openpgp_compat.h \
     2.7 +	      labeled_int_list.h key_reset.h
     2.8  		  ../asn.1/*.h sync_codec.h $(PREFIX)/include/pEp/
     2.9  
    2.10  .PHONY: uninstall
     3.1 --- a/src/keymanagement.c	Fri Oct 05 11:31:55 2018 +0200
     3.2 +++ b/src/keymanagement.c	Fri Oct 05 15:03:04 2018 +0200
     3.3 @@ -1171,6 +1171,12 @@
     3.4      if (!(session && ident && ident->fpr))
     3.5          return PEP_ILLEGAL_VALUE;
     3.6              
     3.7 +        // See if key is revoked already
     3.8 +        bool revoked = false;
     3.9 +        status = key_revoked(session, ident->fpr, &revoked);
    3.10 +        if (!revoked)
    3.11 +            revoke_key(session, ident->fpr, NULL);
    3.12 +            
    3.13      // double-check to be sure key is even in the DB
    3.14      if (ident->fpr)
    3.15          status = set_pgp_keypair(session, ident->fpr);