merge IOS-1483
authorbuff <andreas@pep-project.org>
Wed, 19 Jun 2019 21:40:56 +0200
changeset 1037c70e556c9f38
parent 1025 ec10c23813e1
parent 1036 a78c36269f98
child 1039 5b43d918edeb
merge IOS-1483
     1.1 --- a/pEpObjCAdapter.xcodeproj/project.pbxproj	Fri Jun 14 12:10:07 2019 +0200
     1.2 +++ b/pEpObjCAdapter.xcodeproj/project.pbxproj	Wed Jun 19 21:40:56 2019 +0200
     1.3 @@ -9,6 +9,7 @@
     1.4  /* Begin PBXBuildFile section */
     1.5  		152A9C472010F50400F962ED /* PEPSessionTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 152A9C462010F50400F962ED /* PEPSessionTest.m */; };
     1.6  		152D58EF201B6DB200036219 /* PEPMessageUtilTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 152D58EE201B6DB200036219 /* PEPMessageUtilTest.m */; };
     1.7 +		155674ED22B82D710097930C /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 155674EC22B82D710097930C /* libz.dylib */; };
     1.8  		15D3D761200F61BB00A0DA20 /* PEPSessionProviderTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 15D3D760200F61BB00A0DA20 /* PEPSessionProviderTest.m */; };
     1.9  		430CD9B12292AC4900AAC37F /* PEPSync.h in Headers */ = {isa = PBXBuildFile; fileRef = 430CD9B02292AC4900AAC37F /* PEPSync.h */; settings = {ATTRIBUTES = (Public, ); }; };
    1.10  		430CD9B62292ADAC00AAC37F /* PEPSendMessageDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 430CD9B52292ADAC00AAC37F /* PEPSendMessageDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
    1.11 @@ -67,12 +68,10 @@
    1.12  		43E02A231C71F65B008F05E9 /* msg_to_A3FC7F0A_from_mutt.ser in Resources */ = {isa = PBXBuildFile; fileRef = 43E02A1F1C71F65B008F05E9 /* msg_to_A3FC7F0A_from_mutt.ser */; };
    1.13  		43E3985F221D7E56008E7983 /* PEPObjCAdapterFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 43E3985D221D7E56008E7983 /* PEPObjCAdapterFramework.h */; settings = {ATTRIBUTES = (Public, ); }; };
    1.14  		43E39867221D7EB1008E7983 /* libpEpEngine.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 64289E561B8B70E800FC617B /* libpEpEngine.a */; };
    1.15 -		43E39869221D7EC2008E7983 /* libbz2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 43E39868221D7EC2008E7983 /* libbz2.tbd */; };
    1.16  		43E3986B221D7EDD008E7983 /* libiconv.2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 43E3986A221D7EDD008E7983 /* libiconv.2.tbd */; };
    1.17  		43FF2ED12226AFE9000D9567 /* PEPEngineTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 43FF2ECC2226AE7E000D9567 /* PEPEngineTypes.h */; settings = {ATTRIBUTES = (Public, ); }; };
    1.18  		640F79231C9B517C00DBEC4E /* 5CB2C182_sec.asc in Resources */ = {isa = PBXBuildFile; fileRef = 640F79211C9B517C00DBEC4E /* 5CB2C182_sec.asc */; };
    1.19  		640F79241C9B517C00DBEC4E /* 5CB2C182.asc in Resources */ = {isa = PBXBuildFile; fileRef = 640F79221C9B517C00DBEC4E /* 5CB2C182.asc */; };
    1.20 -		64415E2E1BE9511300F6CBB2 /* libbz2.1.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 64415E2D1BE9511300F6CBB2 /* libbz2.1.0.dylib */; };
    1.21  		64415E2F1BE9511C00F6CBB2 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 35FB0ABD1B57F99D00377032 /* Security.framework */; };
    1.22  		64415E301BE9513300F6CBB2 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 35FB0ABB1B57F97E00377032 /* CFNetwork.framework */; };
    1.23  		64415E411BE95C2800F6CBB2 /* pEpTrustWords.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 64AE6B211BE15E3A000867E4 /* pEpTrustWords.bundle */; };
    1.24 @@ -131,6 +130,7 @@
    1.25  		15206CC61F8E078B003FF880 /* PEPSession.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPSession.m; sourceTree = "<group>"; };
    1.26  		152A9C462010F50400F962ED /* PEPSessionTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPSessionTest.m; sourceTree = "<group>"; };
    1.27  		152D58EE201B6DB200036219 /* PEPMessageUtilTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPMessageUtilTest.m; sourceTree = "<group>"; };
    1.28 +		155674EC22B82D710097930C /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
    1.29  		15D3D760200F61BB00A0DA20 /* PEPSessionProviderTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPSessionProviderTest.m; sourceTree = "<group>"; };
    1.30  		15D3D77B2010DDC500A0DA20 /* PEPTestUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PEPTestUtils.h; sourceTree = "<group>"; };
    1.31  		15D3D77C2010DDC500A0DA20 /* PEPTestUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PEPTestUtils.m; sourceTree = "<group>"; };
    1.32 @@ -204,7 +204,6 @@
    1.33  		43E3985B221D7E56008E7983 /* PEPObjCAdapterFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PEPObjCAdapterFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; };
    1.34  		43E3985D221D7E56008E7983 /* PEPObjCAdapterFramework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PEPObjCAdapterFramework.h; sourceTree = "<group>"; };
    1.35  		43E3985E221D7E56008E7983 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
    1.36 -		43E39868221D7EC2008E7983 /* libbz2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libbz2.tbd; path = usr/lib/libbz2.tbd; sourceTree = SDKROOT; };
    1.37  		43E3986A221D7EDD008E7983 /* libiconv.2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.2.tbd; path = usr/lib/libiconv.2.tbd; sourceTree = SDKROOT; };
    1.38  		43F73BD22165F6EC00AB4524 /* PEPLock.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PEPLock.h; sourceTree = "<group>"; };
    1.39  		43F73BD32165F6EC00AB4524 /* PEPLock.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PEPLock.m; sourceTree = "<group>"; };
    1.40 @@ -214,7 +213,6 @@
    1.41  		640F79221C9B517C00DBEC4E /* 5CB2C182.asc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = 5CB2C182.asc; sourceTree = "<group>"; };
    1.42  		64415E171BE94FCB00F6CBB2 /* pEpObjCAdapterTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = pEpObjCAdapterTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
    1.43  		64415E1B1BE94FCB00F6CBB2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
    1.44 -		64415E2D1BE9511300F6CBB2 /* libbz2.1.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libbz2.1.0.dylib; path = /usr/lib/libbz2.1.0.dylib; sourceTree = "<absolute>"; };
    1.45  		64415E421BEA523300F6CBB2 /* 6FF00E97.asc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = 6FF00E97.asc; sourceTree = "<group>"; };
    1.46  		64415E431BEA523300F6CBB2 /* 6FF00E97_sec.asc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = 6FF00E97_sec.asc; sourceTree = "<group>"; };
    1.47  		64415E441BEA523300F6CBB2 /* 0x70DCF575.asc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = 0x70DCF575.asc; sourceTree = "<group>"; };
    1.48 @@ -230,7 +228,7 @@
    1.49  			buildActionMask = 2147483647;
    1.50  			files = (
    1.51  				43E3986B221D7EDD008E7983 /* libiconv.2.tbd in Frameworks */,
    1.52 -				43E39869221D7EC2008E7983 /* libbz2.tbd in Frameworks */,
    1.53 +				155674ED22B82D710097930C /* libz.dylib in Frameworks */,
    1.54  				43E39867221D7EB1008E7983 /* libpEpEngine.a in Frameworks */,
    1.55  			);
    1.56  			runOnlyForDeploymentPostprocessing = 0;
    1.57 @@ -239,7 +237,6 @@
    1.58  			isa = PBXFrameworksBuildPhase;
    1.59  			buildActionMask = 2147483647;
    1.60  			files = (
    1.61 -				64415E2E1BE9511300F6CBB2 /* libbz2.1.0.dylib in Frameworks */,
    1.62  				64415E2F1BE9511C00F6CBB2 /* Security.framework in Frameworks */,
    1.63  				64415E301BE9513300F6CBB2 /* CFNetwork.framework in Frameworks */,
    1.64  			);
    1.65 @@ -293,7 +290,6 @@
    1.66  		352988A11AEF964100FA7E2E = {
    1.67  			isa = PBXGroup;
    1.68  			children = (
    1.69 -				64415E2D1BE9511300F6CBB2 /* libbz2.1.0.dylib */,
    1.70  				64DA243B1B833248000BEE80 /* pEpEngine.xcodeproj */,
    1.71  				35FB0ABD1B57F99D00377032 /* Security.framework */,
    1.72  				35FB0ABB1B57F97E00377032 /* CFNetwork.framework */,
    1.73 @@ -364,7 +360,7 @@
    1.74  			isa = PBXGroup;
    1.75  			children = (
    1.76  				43E3986A221D7EDD008E7983 /* libiconv.2.tbd */,
    1.77 -				43E39868221D7EC2008E7983 /* libbz2.tbd */,
    1.78 +				155674EC22B82D710097930C /* libz.dylib */,
    1.79  			);
    1.80  			name = Frameworks;
    1.81  			sourceTree = "<group>";
    1.82 @@ -681,6 +677,7 @@
    1.83  				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
    1.84  				COPY_PHASE_STRIP = NO;
    1.85  				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
    1.86 +				ENABLE_BITCODE = NO;
    1.87  				ENABLE_STRICT_OBJC_MSGSEND = YES;
    1.88  				ENABLE_TESTABILITY = YES;
    1.89  				GCC_C_LANGUAGE_STANDARD = gnu99;
    1.90 @@ -696,7 +693,9 @@
    1.91  				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
    1.92  				GCC_WARN_UNUSED_FUNCTION = YES;
    1.93  				GCC_WARN_UNUSED_VARIABLE = YES;
    1.94 +				HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../Sequoia4iOS/build/include";
    1.95  				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
    1.96 +				LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/../Sequoia4iOS/build/lib";
    1.97  				MTL_ENABLE_DEBUG_INFO = YES;
    1.98  				ONLY_ACTIVE_ARCH = YES;
    1.99  				SDKROOT = iphoneos;
   1.100 @@ -732,6 +731,7 @@
   1.101  				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
   1.102  				COPY_PHASE_STRIP = NO;
   1.103  				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
   1.104 +				ENABLE_BITCODE = NO;
   1.105  				ENABLE_NS_ASSERTIONS = NO;
   1.106  				ENABLE_STRICT_OBJC_MSGSEND = YES;
   1.107  				GCC_C_LANGUAGE_STANDARD = gnu99;
   1.108 @@ -742,7 +742,9 @@
   1.109  				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
   1.110  				GCC_WARN_UNUSED_FUNCTION = YES;
   1.111  				GCC_WARN_UNUSED_VARIABLE = YES;
   1.112 +				HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../Sequoia4iOS/build/include";
   1.113  				IPHONEOS_DEPLOYMENT_TARGET = 10.0;
   1.114 +				LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/../Sequoia4iOS/build/lib";
   1.115  				MTL_ENABLE_DEBUG_INFO = NO;
   1.116  				ONLY_ACTIVE_ARCH = NO;
   1.117  				SDKROOT = iphoneos;
     2.1 --- a/pEpObjCAdapter/NSError+PEP.m	Fri Jun 14 12:10:07 2019 +0200
     2.2 +++ b/pEpObjCAdapter/NSError+PEP.m	Wed Jun 19 21:40:56 2019 +0200
     2.3 @@ -18,11 +18,12 @@
     2.4  + (NSError * _Nonnull)errorWithPEPStatusInternal:(PEP_STATUS)status
     2.5                                          userInfo:(NSDictionary<NSErrorUserInfoKey, id> * _Nonnull)dict
     2.6  {
     2.7 -    switch (status) {
     2.8 +    switch (status) { //BUFF: missing state PEPStatusKeyImported
     2.9          case PEP_STATUS_OK:
    2.10          case PEP_DECRYPTED:
    2.11          case PEP_UNENCRYPTED:
    2.12          case PEP_DECRYPT_NO_KEY:
    2.13 +        case PEP_KEY_IMPORTED:
    2.14          case PEP_KEY_IMPORT_STATUS_UNKNOWN:
    2.15              return nil;
    2.16              break;
     3.1 --- a/pEpObjCTests/PEPSessionTest.m	Fri Jun 14 12:10:07 2019 +0200
     3.2 +++ b/pEpObjCTests/PEPSessionTest.m	Wed Jun 19 21:40:56 2019 +0200
     3.3 @@ -1466,7 +1466,8 @@
     3.4      }
     3.5  }
     3.6  
     3.7 -- (PEPIdentity *)checkMySelfImportingKeyFilePath:(NSString *)filePath address:(NSString *)address
     3.8 +- (PEPIdentity *)checkMySelfImportingKeyFilePath:(NSString *)filePath
     3.9 +                                         address:(NSString *)address
    3.10                                            userID:(NSString *)userID
    3.11                                       fingerPrint:(NSString *)fingerPrint
    3.12                                           session:(PEPSession *)session
     4.1 --- a/pEpObjCTests/TestUtils/PEPTestUtils.m	Fri Jun 14 12:10:07 2019 +0200
     4.2 +++ b/pEpObjCTests/TestUtils/PEPTestUtils.m	Wed Jun 19 21:40:56 2019 +0200
     4.3 @@ -121,9 +121,9 @@
     4.4      // Only files whose content is affected by tests.
     4.5      NSString *home = [[[NSProcessInfo processInfo]environment]objectForKey:@"HOME"];
     4.6      NSString *gpgHome = [home stringByAppendingPathComponent:@".gnupg"];
     4.7 -    return @[[home stringByAppendingPathComponent:@".pEp_management.db"],
     4.8 -             [home stringByAppendingPathComponent:@".pEp_management.db-shm"],
     4.9 -             [home stringByAppendingPathComponent:@".pEp_management.db-wal"],
    4.10 +    return @[[home stringByAppendingPathComponent:@".pEp_keys.db"],
    4.11 +             [home stringByAppendingPathComponent:@".pEp_keys.db-shm"],
    4.12 +             [home stringByAppendingPathComponent:@".pEp_keys.db-wal"],
    4.13               [gpgHome stringByAppendingPathComponent:@"pubring.gpg"],
    4.14               [gpgHome stringByAppendingPathComponent:@"secring.gpg"]];
    4.15