From 8ddf2373dc63452f5cc7696a3c1dbe823a5acd3a Mon Sep 17 00:00:00 2001 From: michael starke Date: Thu, 29 Oct 2015 18:25:08 +0100 Subject: [PATCH] Using KeePassKit Framework Signed-off-by: michael starke --- .gitmodules | 3 + KeePassKit | 1 + MacPass.xcodeproj/project.pbxproj | 67 +++++++++++++++++++ MacPass/KPKFormat+MPUTIDetection.h | 2 +- MacPass/KPKNode+IconImage.h | 2 +- MacPass/KPKNode+IconImage.m | 9 +-- MacPass/MPAddEntryContextMenuDelegate.m | 3 +- MacPass/MPAppDelegate.m | 2 +- MacPass/MPAttachmentTableViewDelegate.m | 3 +- MacPass/MPAutotypeCommand.m | 7 +- MacPass/MPAutotypeContext.m | 5 +- MacPass/MPAutotypeDaemon.m | 2 +- MacPass/MPAutotypePaste.m | 2 +- MacPass/MPContextBarViewController.m | 5 +- MacPass/MPCustomFieldTableViewDelegate.m | 3 +- MacPass/MPDatabaseSettingsWindowController.m | 10 +-- MacPass/MPDatePickingViewController.m | 4 +- MacPass/MPDocument+Attachments.m | 3 +- MacPass/MPDocument+Autotype.m | 6 +- MacPass/MPDocument+EditingSession.m | 3 +- MacPass/MPDocument+Search.m | 4 +- MacPass/MPDocument.h | 2 +- MacPass/MPDocument.m | 12 +--- MacPass/MPDocumentController.m | 2 +- MacPass/MPDocumentWindowController.m | 4 +- MacPass/MPDocumentWindowDelegate.m | 2 +- MacPass/MPEntryContextMenuDelegate.m | 3 +- MacPass/MPEntryInspectorViewController.m | 12 ++-- MacPass/MPEntryTableDataSource.m | 3 +- MacPass/MPEntryViewController.m | 11 +-- MacPass/MPFixAutotypeWindowController.m | 6 +- MacPass/MPGroupInspectorViewController.m | 3 +- MacPass/MPInspectorViewController.m | 10 +-- MacPass/MPOutlineContextMenuDelegate.m | 3 +- MacPass/MPOutlineDataSource.m | 6 +- MacPass/MPOutlineViewController.m | 8 +-- MacPass/MPPasswordCreatorViewController.m | 3 +- MacPass/MPPasswordEditWindowController.m | 5 +- MacPass/MPPluginManager.m | 3 +- MacPass/MPReferenceBuilderViewController.m | 3 +- MacPass/MPSavePanelAccessoryViewController.h | 2 +- MacPass/MPSavePanelAccessoryViewController.m | 3 +- MacPass/MPTemporaryFileStorage.m | 2 +- MacPass/MPTreeDelegate.h | 3 +- .../MPWindowAssociationsTableViewDelegate.m | 5 +- MacPass/NSString+MPPasswordCreation.m | 2 +- 46 files changed, 130 insertions(+), 134 deletions(-) create mode 160000 KeePassKit diff --git a/.gitmodules b/.gitmodules index 9c71be1e..11a74a0f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "TransformerKit"] path = TransformerKit url = https://github.com/mattt/TransformerKit.git +[submodule "KeePassKit"] + path = KeePassKit + url = https://mstarke@github.com/mstarke/KeePassKit.git diff --git a/KeePassKit b/KeePassKit new file mode 160000 index 00000000..23f60077 --- /dev/null +++ b/KeePassKit @@ -0,0 +1 @@ +Subproject commit 23f6007746bd1a1bfeb8a33aecc8ac5431028841 diff --git a/MacPass.xcodeproj/project.pbxproj b/MacPass.xcodeproj/project.pbxproj index e74bd653..6919ab44 100644 --- a/MacPass.xcodeproj/project.pbxproj +++ b/MacPass.xcodeproj/project.pbxproj @@ -178,6 +178,8 @@ 4C7F8B681A10B68400CCB83D /* WelcomeWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C7F8B6A1A10B68400CCB83D /* WelcomeWindow.xib */; }; 4C80BB6F176DE06F00E5E248 /* HNHScrollDocumentViewAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C80BB6E176DE06F00E5E248 /* HNHScrollDocumentViewAdapter.m */; }; 4C811C8316ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C811C8216ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.m */; }; + 4C8138451BE28621001BF195 /* KeePassKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C81383E1BE28517001BF195 /* KeePassKit.framework */; }; + 4C8138461BE28621001BF195 /* KeePassKit.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4C81383E1BE28517001BF195 /* KeePassKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 4C83814215BF4677001AE468 /* MPDocumentWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C83814115BF4677001AE468 /* MPDocumentWindowController.m */; }; 4C888C9016EB6C91003D34A1 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4C888C8E16EB6C91003D34A1 /* Localizable.strings */; }; 4C888C9316EB6F5E003D34A1 /* MPToolbarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C888C9216EB6F5E003D34A1 /* MPToolbarItem.m */; }; @@ -262,6 +264,27 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ + 4C81383D1BE28517001BF195 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4C8138381BE28517001BF195 /* KeePassKit.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4C5CF3181BE10B650019AA81; + remoteInfo = KeePassKit; + }; + 4C81383F1BE28517001BF195 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4C8138381BE28517001BF195 /* KeePassKit.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 4C5CF3221BE10B650019AA81; + remoteInfo = KeePassKitTests; + }; + 4C8138471BE28621001BF195 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4C8138381BE28517001BF195 /* KeePassKit.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 4C5CF3171BE10B650019AA81; + remoteInfo = KeePassKit; + }; 4CC5D35A18A1162100AF7FA8 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 4CC5D35218A1162100AF7FA8 /* Sparkle.xcodeproj */; @@ -306,6 +329,7 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( + 4C8138461BE28621001BF195 /* KeePassKit.framework in CopyFiles */, 4CC5D36718A1333000AF7FA8 /* Sparkle.framework in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; @@ -593,6 +617,7 @@ 4C80BB6E176DE06F00E5E248 /* HNHScrollDocumentViewAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HNHScrollDocumentViewAdapter.m; sourceTree = ""; }; 4C811C8116ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPKeyfilePathControlDelegate.h; sourceTree = ""; }; 4C811C8216ECD06E00C4BAC6 /* MPKeyfilePathControlDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPKeyfilePathControlDelegate.m; sourceTree = ""; }; + 4C8138381BE28517001BF195 /* KeePassKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = KeePassKit.xcodeproj; path = KeePassKit/KeePassKit.xcodeproj; sourceTree = ""; }; 4C83814015BF4677001AE468 /* MPDocumentWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPDocumentWindowController.h; sourceTree = ""; }; 4C83814115BF4677001AE468 /* MPDocumentWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPDocumentWindowController.m; sourceTree = ""; }; 4C888C8F16EB6C91003D34A1 /* en */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; lineEnding = 0; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.simpleColoring; }; @@ -814,6 +839,7 @@ 4CC5D36418A1162D00AF7FA8 /* Sparkle.framework in Frameworks */, 4C00E33B17D8FAC100F37192 /* Carbon.framework in Frameworks */, 4CAD748E15B88AC100104512 /* libz.dylib in Frameworks */, + 4C8138451BE28621001BF195 /* KeePassKit.framework in Frameworks */, 4CAD748C15B889B700104512 /* Security.framework in Frameworks */, 4C77E36715B84A240093A587 /* Cocoa.framework in Frameworks */, ); @@ -1180,6 +1206,7 @@ 4C77E35715B84A240093A587 = { isa = PBXGroup; children = ( + 4C8138381BE28517001BF195 /* KeePassKit.xcodeproj */, 4CC5D35218A1162100AF7FA8 /* Sparkle.xcodeproj */, 4C00E33917D8FA3B00F37192 /* DDHotKey */, 4C3C4E9418D6FEA100153127 /* TransformerKit */, @@ -1268,6 +1295,15 @@ name = "Supporting Files"; sourceTree = ""; }; + 4C8138391BE28517001BF195 /* Products */ = { + isa = PBXGroup; + children = ( + 4C81383E1BE28517001BF195 /* KeePassKit.framework */, + 4C8138401BE28517001BF195 /* KeePassKitTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; 4C89F525182FB4C50069C73C /* Autotype */ = { isa = PBXGroup; children = ( @@ -1536,6 +1572,7 @@ buildRules = ( ); dependencies = ( + 4C8138481BE28621001BF195 /* PBXTargetDependency */, ); name = MacPass; productName = MacPass; @@ -1574,6 +1611,10 @@ productRefGroup = 4C77E36315B84A240093A587 /* Products */; projectDirPath = ""; projectReferences = ( + { + ProductGroup = 4C8138391BE28517001BF195 /* Products */; + ProjectRef = 4C8138381BE28517001BF195 /* KeePassKit.xcodeproj */; + }, { ProductGroup = 4CC5D35318A1162100AF7FA8 /* Products */; ProjectRef = 4CC5D35218A1162100AF7FA8 /* Sparkle.xcodeproj */; @@ -1588,6 +1629,20 @@ /* End PBXProject section */ /* Begin PBXReferenceProxy section */ + 4C81383E1BE28517001BF195 /* KeePassKit.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = KeePassKit.framework; + remoteRef = 4C81383D1BE28517001BF195 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 4C8138401BE28517001BF195 /* KeePassKitTests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = KeePassKitTests.xctest; + remoteRef = 4C81383F1BE28517001BF195 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; 4CC5D35B18A1162100AF7FA8 /* Sparkle.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; @@ -1918,6 +1973,14 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 4C8138481BE28621001BF195 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = KeePassKit; + targetProxy = 4C8138471BE28621001BF195 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ 4C45FB21178E09ED0010007D /* InfoPlist.strings */ = { isa = PBXVariantGroup; @@ -2308,12 +2371,14 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = MacPassAppIcon; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; "CODE_SIGN_IDENTITY[sdk=macosx*]" = ""; COMBINE_HIDPI_IMAGES = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "MacPass/MacPass-Prefix.pch"; INFOPLIST_FILE = "MacPass/MacPass-Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.8; OTHER_LDFLAGS = ( "-lxml2", @@ -2331,12 +2396,14 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = MacPassAppIcon; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; "CODE_SIGN_IDENTITY[sdk=macosx*]" = ""; COMBINE_HIDPI_IMAGES = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "MacPass/MacPass-Prefix.pch"; INFOPLIST_FILE = "MacPass/MacPass-Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.8; OTHER_LDFLAGS = ( "-lxml2", diff --git a/MacPass/KPKFormat+MPUTIDetection.h b/MacPass/KPKFormat+MPUTIDetection.h index fd48e7ce..3c228fb5 100644 --- a/MacPass/KPKFormat+MPUTIDetection.h +++ b/MacPass/KPKFormat+MPUTIDetection.h @@ -6,7 +6,7 @@ // Copyright (c) 2014 HicknHack Software GmbH. All rights reserved. // -#import "KPKFormat.h" +#import "KeePassKit/KeePassKit.h" @interface KPKFormat (MPUTIDetection) diff --git a/MacPass/KPKNode+IconImage.h b/MacPass/KPKNode+IconImage.h index c14007a4..0bec146d 100644 --- a/MacPass/KPKNode+IconImage.h +++ b/MacPass/KPKNode+IconImage.h @@ -6,7 +6,7 @@ // Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. // -#import "KPKNode.h" +#import "KeePassKit/KeePassKit.h" @interface KPKNode (IconImage) diff --git a/MacPass/KPKNode+IconImage.m b/MacPass/KPKNode+IconImage.m index f2c8b9e0..f6f8da66 100644 --- a/MacPass/KPKNode+IconImage.m +++ b/MacPass/KPKNode+IconImage.m @@ -8,12 +8,7 @@ #import "KPKNode+IconImage.h" -#import "KPKGroup.h" -#import "KPKIcon.h" -#import "KPKMetaData.h" -#import "KPKNode+Private.h" -#import "KPKTimeInfo.h" -#import "KPKTree.h" +#import "KeePassKit/KeePassKit.h" #import "MPIconHelper.h" @@ -39,7 +34,7 @@ } if(self.iconUUID) { - KPKIcon *icon = [self.tree.metaData findIcon:self.iconUUID]; + KPKIcon *icon;// = [self.tree.metaData findIcon:self.iconUUID]; if(icon && icon.image) { return icon.image; } diff --git a/MacPass/MPAddEntryContextMenuDelegate.m b/MacPass/MPAddEntryContextMenuDelegate.m index b9e801c3..1d5cde84 100644 --- a/MacPass/MPAddEntryContextMenuDelegate.m +++ b/MacPass/MPAddEntryContextMenuDelegate.m @@ -25,8 +25,7 @@ #import "MPDocumentWindowController.h" #import "MPActionHelper.h" -#import "KPKEntry.h" -#import "KPKGroup.h" +#import "KeePassKit/KeePassKit.h" #define EDIT_TEMPLATES_ITEM_TAG 10; diff --git a/MacPass/MPAppDelegate.m b/MacPass/MPAppDelegate.m index 0fc14209..a83a3233 100644 --- a/MacPass/MPAppDelegate.m +++ b/MacPass/MPAppDelegate.m @@ -35,7 +35,7 @@ #import "MPTemporaryFileStorageCenter.h" #import "MPValueTransformerHelper.h" -#import "KPKCompositeKey.h" +#import "KeePassKit/KeePassKit.h" NSString *const MPDidChangeStoredKeyFilesSettings = @"com.hicknhack.macpass.MPDidChangeStoredKeyFilesSettings"; diff --git a/MacPass/MPAttachmentTableViewDelegate.m b/MacPass/MPAttachmentTableViewDelegate.m index 349e4547..dd712d63 100644 --- a/MacPass/MPAttachmentTableViewDelegate.m +++ b/MacPass/MPAttachmentTableViewDelegate.m @@ -26,8 +26,7 @@ #import "MPEntryInspectorViewController.h" #import "MPSelectedAttachmentTableCellView.h" -#import "KPKEntry.h" -#import "KPKBinary.h" +#import "KeePassKit/KeePassKit.h" #import "HNHTableRowView.h" diff --git a/MacPass/MPAutotypeCommand.m b/MacPass/MPAutotypeCommand.m index 92ff5de5..738bf537 100644 --- a/MacPass/MPAutotypeCommand.m +++ b/MacPass/MPAutotypeCommand.m @@ -16,14 +16,9 @@ #import "MPAutotypeContext.h" #import "MPKeyMapper.h" -#import "KPKEntry.h" -#import "KPKAutotype.h" -#import "KPKFormat.h" - -#import "NSString+Commands.h" +#import "KeePassKit/KeePassKit.h" #import - #import static CGKeyCode kMPFunctionKeyCodes[] = { kVK_F1, kVK_F2, kVK_F3, kVK_F4, kVK_F5, kVK_F6, kVK_F7, kVK_F8, kVK_F9, kVK_F10, kVK_F11, kVK_F12, kVK_F13, kVK_F14, kVK_F15, kVK_F16, kVK_F17, kVK_F18, kVK_F19 }; diff --git a/MacPass/MPAutotypeContext.m b/MacPass/MPAutotypeContext.m index f64b14d9..3f1976fd 100644 --- a/MacPass/MPAutotypeContext.m +++ b/MacPass/MPAutotypeContext.m @@ -8,10 +8,7 @@ #import "MPAutotypeContext.h" -#import "KPKAutotype.h" -#import "KPKEntry.h" -#import "KPKWindowAssociation.h" -#import "NSString+Commands.h" +#import "KeePassKit/KeePassKit.h" @interface MPAutotypeContext () { NSString *_evaluatedCommand; diff --git a/MacPass/MPAutotypeDaemon.m b/MacPass/MPAutotypeDaemon.m index d8b88350..3f1e5ea7 100644 --- a/MacPass/MPAutotypeDaemon.m +++ b/MacPass/MPAutotypeDaemon.m @@ -18,7 +18,7 @@ #import "MPSettingsHelper.h" -#import "KPKEntry.h" +#import "KeePassKit/KeePassKit.h" #import "DDHotKeyCenter.h" #import "DDHotKey+MacPassAdditions.h" diff --git a/MacPass/MPAutotypePaste.m b/MacPass/MPAutotypePaste.m index edcffb36..6b56be6c 100644 --- a/MacPass/MPAutotypePaste.m +++ b/MacPass/MPAutotypePaste.m @@ -9,7 +9,7 @@ #import "MPAutotypePaste.h" #import "MPPasteBoardController.h" -#import "NSString+Commands.h" +#import "KeePassKit/KeePassKit.h" @interface MPAutotypePaste () diff --git a/MacPass/MPContextBarViewController.m b/MacPass/MPContextBarViewController.m index 8280dbc9..ac980c16 100644 --- a/MacPass/MPContextBarViewController.m +++ b/MacPass/MPContextBarViewController.m @@ -7,9 +7,8 @@ // #import "MPContextBarViewController.h" -#import "KPKEntry.h" -#import "KPKTree.h" -#import "KPKMetaData.h" + +#import "KeePassKit/KeePassKit.h" #import "MPDocument.h" #import "MPFlagsHelper.h" diff --git a/MacPass/MPCustomFieldTableViewDelegate.m b/MacPass/MPCustomFieldTableViewDelegate.m index 8d0f234e..12d5e2ef 100644 --- a/MacPass/MPCustomFieldTableViewDelegate.m +++ b/MacPass/MPCustomFieldTableViewDelegate.m @@ -25,8 +25,7 @@ #import "MPCustomFieldTableCellView.h" #import "MPEntryInspectorViewController.h" -#import "KPKEntry.h" -#import "KPKAttribute.h" +#import "KeePassKit/KeePassKit.h" @implementation MPCustomFieldTableViewDelegate diff --git a/MacPass/MPDatabaseSettingsWindowController.m b/MacPass/MPDatabaseSettingsWindowController.m index 7e3bbe31..8cc4a1ca 100644 --- a/MacPass/MPDatabaseSettingsWindowController.m +++ b/MacPass/MPDatabaseSettingsWindowController.m @@ -14,19 +14,13 @@ #import "MPSettingsHelper.h" #import "MPNumericalInputFormatter.h" -#import "KPKXmlFormat.h" -#import "KPKGroup.h" -#import "KPKTree.h" -#import "KPKMetaData.h" -#import "KPKNode+IconImage.h" -#import "KPKCompositeKey.h" +#import "KeePassKit/KeePassKit.h" #import "HNHRoundedTextField.h" #import "HNHRoundedSecureTextField.h" #import "HNHCommon.h" -#import "NSString+Empty.h" - +#import "KPKNode+IconImage.h" @interface MPDatabaseSettingsWindowController () { NSString *_missingFeature; diff --git a/MacPass/MPDatePickingViewController.m b/MacPass/MPDatePickingViewController.m index 73000f42..504e46d7 100644 --- a/MacPass/MPDatePickingViewController.m +++ b/MacPass/MPDatePickingViewController.m @@ -9,8 +9,8 @@ #import "MPDatePickingViewController.h" #import "MPDocument.h" -#import "KPKNode.h" -#import "KPKTimeInfo.h" + +#import "KeePassKit/KeePassKit.h" typedef NS_ENUM(NSUInteger, MPDatePreset) { MPDatePresetNone, diff --git a/MacPass/MPDocument+Attachments.m b/MacPass/MPDocument+Attachments.m index 8b77b966..b9b776f2 100644 --- a/MacPass/MPDocument+Attachments.m +++ b/MacPass/MPDocument+Attachments.m @@ -22,8 +22,7 @@ #import "MPDocument.h" -#import "KPKEntry.h" -#import "KPKBinary.h" +#import "KeePassKit/KeePassKit.h" @implementation MPDocument (Attachments) diff --git a/MacPass/MPDocument+Autotype.m b/MacPass/MPDocument+Autotype.m index 059ad049..a5f88648 100644 --- a/MacPass/MPDocument+Autotype.m +++ b/MacPass/MPDocument+Autotype.m @@ -23,11 +23,7 @@ #import "MPDocument.h" #import "MPAutotypeContext.h" -#import "KPKNode.h" -#import "KPKGroup.h" -#import "KPKEntry.h" -#import "KPKAutotype.h" -#import "KPKWindowAssociation.h" +#import "KeePassKit/KeePassKit.h" #import "MPSettingsHelper.h" diff --git a/MacPass/MPDocument+EditingSession.m b/MacPass/MPDocument+EditingSession.m index f557b1de..85e1e16f 100644 --- a/MacPass/MPDocument+EditingSession.m +++ b/MacPass/MPDocument+EditingSession.m @@ -8,8 +8,7 @@ #import "MPDocument.h" -#import "KPKTree.h" -#import "KPKNode.h" +#import "KeePassKit/KeePassKit.h" NSString *const MPDocumentDidBeginEditingSelectedItem = @"com.hicknhack.macpass.MPDocumentDidBeginEditingSelectedItem"; NSString *const MPDocumentDidCancelChangesToSelectedItem = @"com.hicknhack.macpass.MPDocumentDidCancelChangesToSelectedItem"; diff --git a/MacPass/MPDocument+Search.m b/MacPass/MPDocument+Search.m index e605b2dc..51a252c4 100644 --- a/MacPass/MPDocument+Search.m +++ b/MacPass/MPDocument+Search.m @@ -9,9 +9,7 @@ #import "MPDocument.h" #import "MPDocumentWindowController.h" -#import "KPKGroup.h" -#import "KPKEntry.h" -#import "KPKTimeInfo.h" +#import "KeePassKit/KeePassKit.h" #import "MPFlagsHelper.h" diff --git a/MacPass/MPDocument.h b/MacPass/MPDocument.h index 6d6508fc..84bb0af1 100644 --- a/MacPass/MPDocument.h +++ b/MacPass/MPDocument.h @@ -21,7 +21,7 @@ // #import -#import "KPKVersion.h" +#import "KeePassKit/KeePassKit.h" #import "MPEntrySearchContext.h" #import "MPTargetNodeResolving.h" diff --git a/MacPass/MPDocument.m b/MacPass/MPDocument.m index fb314ef0..40f655c3 100644 --- a/MacPass/MPDocument.m +++ b/MacPass/MPDocument.m @@ -33,17 +33,7 @@ #import "MPTreeDelegate.h" #import "MPTargetNodeResolving.h" - -#import "DDXMLNode.h" - -#import "KPKEntry.h" -#import "KPKGroup.h" -#import "KPKTree.h" -#import "KPKTree+Serializing.h" -#import "KPKCompositeKey.h" -#import "KPKMetaData.h" -#import "KPKTimeInfo.h" -#import "KPKAttribute.h" +#import "KeePassKit/KeePassKit.h" #import "NSError+Messages.h" #import "NSString+MPPasswordCreation.h" diff --git a/MacPass/MPDocumentController.m b/MacPass/MPDocumentController.m index acf311c3..cf3d6f7a 100644 --- a/MacPass/MPDocumentController.m +++ b/MacPass/MPDocumentController.m @@ -12,7 +12,7 @@ #import "HNHCommon.h" -#import "KPKFormat.h" +#import "KeePassKit/KeePassKit.h" #import "KPKFormat+MPUTIDetection.h" @interface MPDocumentController () diff --git a/MacPass/MPDocumentWindowController.m b/MacPass/MPDocumentWindowController.m index a441f0a9..12af8491 100644 --- a/MacPass/MPDocumentWindowController.m +++ b/MacPass/MPDocumentWindowController.m @@ -24,9 +24,7 @@ #import "MPSettingsHelper.h" #import "MPToolbarDelegate.h" -#import "KPKCompositeKey.h" -#import "KPKEntry.h" -#import "KPKTree.h" +#import "KeePassKit/KeePassKit.h" typedef NS_ENUM(NSUInteger, MPAlertContext) { MPAlertLossySaveWarning, diff --git a/MacPass/MPDocumentWindowDelegate.m b/MacPass/MPDocumentWindowDelegate.m index b834b57a..e2072b7a 100644 --- a/MacPass/MPDocumentWindowDelegate.m +++ b/MacPass/MPDocumentWindowDelegate.m @@ -23,7 +23,7 @@ #import "MPDocumentWindowDelegate.h" #import "MPDocument.h" -#import "KPKEntry.h" +#import "KeePassKit/KeePassKit.h" @implementation MPDocumentWindowDelegate diff --git a/MacPass/MPEntryContextMenuDelegate.m b/MacPass/MPEntryContextMenuDelegate.m index b2a79da9..1a7c2187 100644 --- a/MacPass/MPEntryContextMenuDelegate.m +++ b/MacPass/MPEntryContextMenuDelegate.m @@ -23,8 +23,7 @@ #import "MPEntryContextMenuDelegate.h" #import "MPEntryViewController.h" -#import "KPKEntry.h" -#import "KPKAttribute.h" +#import "KeePassKit/KeePassKit.h" static NSUInteger const kMPCustomFieldMenuItem = 1000; static NSUInteger const kMPAttachmentsMenuItem = 2000; diff --git a/MacPass/MPEntryInspectorViewController.m b/MacPass/MPEntryInspectorViewController.m index f99ef70e..eb4aa116 100644 --- a/MacPass/MPEntryInspectorViewController.m +++ b/MacPass/MPEntryInspectorViewController.m @@ -24,11 +24,7 @@ #import "MPActionHelper.h" #import "MPSettingsHelper.h" -#import "KPKEntry.h" -#import "KPKBinary.h" -#import "KPKAutotype.h" -#import "KPKTimeInfo.h" -#import "KPKWindowAssociation.h" +#import "KeePassKit/KeePassKit.h" #import "HNHScrollView.h" #import "HNHRoundedSecureTextField.h" @@ -184,7 +180,11 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) { [savePanel beginSheetModalForWindow:[[self windowController] window] completionHandler:^(NSInteger result) { if(result == NSFileHandlingPanelOKButton) { - [binary saveToLocation:[savePanel URL]]; + NSError *error; + BOOL sucess = [binary saveToLocation:[savePanel URL] error:&error]; + if(!sucess && error) { + [NSApp presentError:error]; + } } }]; } diff --git a/MacPass/MPEntryTableDataSource.m b/MacPass/MPEntryTableDataSource.m index a53f904e..dfc58e5d 100644 --- a/MacPass/MPEntryTableDataSource.m +++ b/MacPass/MPEntryTableDataSource.m @@ -23,8 +23,7 @@ #import "MPEntryTableDataSource.h" #import "MPEntryViewController.h" -#import "KPKEntry.h" -#import "NSUUID+KeePassKit.h" +#import "KeePassKit/KeePassKit.h" @interface MPEntryTableDataSource () diff --git a/MacPass/MPEntryViewController.m b/MacPass/MPEntryViewController.m index 8f292ca6..93aaa750 100644 --- a/MacPass/MPEntryViewController.m +++ b/MacPass/MPEntryViewController.m @@ -28,22 +28,13 @@ #import "MPValueTransformerHelper.h" #import "MPEntryContextMenuDelegate.h" -#import "KPKUTIs.h" -#import "KPKGroup.h" -#import "KPKEntry.h" -#import "KPKNode+IconImage.h" -#import "KPKAttribute.h" -#import "KPKTimeInfo.h" -#import "KPKTree.h" -#import "KPKMetaData.h" +#import "KeePassKit/KeePassKit.h" #import "HNHTableHeaderCell.h" #import "HNHGradientView.h" #import "MPNotifications.h" -#import "NSString+Commands.h" - #define STATUS_BAR_ANIMATION_TIME 0.15 #define EXPIRED_ENTRY_REFRESH_SECONDS 60 diff --git a/MacPass/MPFixAutotypeWindowController.m b/MacPass/MPFixAutotypeWindowController.m index d340c778..f2281678 100644 --- a/MacPass/MPFixAutotypeWindowController.m +++ b/MacPass/MPFixAutotypeWindowController.m @@ -11,11 +11,7 @@ #import "MPDocument.h" #import "MPIconHelper.h" -#import "KPKNode.h" -#import "KPKEntry.h" -#import "KPKGroup.h" -#import "KPKAutotype.h" -#import "KPKWindowAssociation.h" +#import "KeePassKit/KeePassKit.h" NSString *const kMPAutotypeCell = @"AutotypeCell"; diff --git a/MacPass/MPGroupInspectorViewController.m b/MacPass/MPGroupInspectorViewController.m index ef0c83e6..8810d51e 100644 --- a/MacPass/MPGroupInspectorViewController.m +++ b/MacPass/MPGroupInspectorViewController.m @@ -11,8 +11,7 @@ #import "MPPasteBoardController.h" #import "MPValueTransformerHelper.h" -#import "KPKGroup.h" -#import "KPKTimeInfo.h" +#import "KeePassKit/KeePassKit.h" #import "HNHScrollView.h" #import "HNHRoundedTextField.h" diff --git a/MacPass/MPInspectorViewController.m b/MacPass/MPInspectorViewController.m index 13cf1bb6..367ee720 100644 --- a/MacPass/MPInspectorViewController.m +++ b/MacPass/MPInspectorViewController.m @@ -16,19 +16,15 @@ #import "MPNotifications.h" #import "MPPopupImageView.h" -#import "NSDate+Humanized.h" +#import "KeePassKit/KeePassKit.h" -#import "KPKEntry.h" -#import "KPKGroup.h" -#import "KPKTimeInfo.h" -#import "KPKTree.h" -#import "KPKMetaData.h" -#import "KPKNode.h" #import "KPKNode+IconImage.h" #import "HNHGradientView.h" +#import "NSDate+Humanized.h" + typedef NS_ENUM(NSUInteger, MPContentTab) { MPEntryTab, MPGroupTab, diff --git a/MacPass/MPOutlineContextMenuDelegate.m b/MacPass/MPOutlineContextMenuDelegate.m index 34c7f39d..443e412a 100644 --- a/MacPass/MPOutlineContextMenuDelegate.m +++ b/MacPass/MPOutlineContextMenuDelegate.m @@ -29,8 +29,7 @@ #import "MPActionHelper.h" #import "MPContextMenuHelper.h" -#import "KPKGroup.h" -#import "KPKTree.h" +#import "KeePassKit/KeePassKit.h" NSString *const _MPOutlineMenuDefault = @"Default"; NSString *const _MPOutlineMenuTrash = @"Trash"; diff --git a/MacPass/MPOutlineDataSource.m b/MacPass/MPOutlineDataSource.m index 5edd63f0..cc6cd7fb 100644 --- a/MacPass/MPOutlineDataSource.m +++ b/MacPass/MPOutlineDataSource.m @@ -24,11 +24,7 @@ #import "MPDocument.h" #import "MPConstants.h" -#import "KPKGroup.h" -#import "KPKEntry.h" -#import "KPKUTIs.h" - -#import "NSUUID+KeePassKit.h" +#import "KeePassKit/KeePassKit.h" @interface MPOutlineDataSource () diff --git a/MacPass/MPOutlineViewController.m b/MacPass/MPOutlineViewController.m index 8c7fa361..640983a1 100644 --- a/MacPass/MPOutlineViewController.m +++ b/MacPass/MPOutlineViewController.m @@ -17,14 +17,8 @@ #import "MPOutlineContextMenuDelegate.h" #import "MPOutlineDataSource.h" -#import "KPKEntry.h" -#import "KPKGroup.h" -#import "KPKMetaData.h" -#import "KPKNode.h" +#import "KeePassKit/KeePassKit.h" #import "KPKNode+IconImage.h" -#import "KPKTimeInfo.h" -#import "KPKTree.h" -#import "KPKUTIs.h" #import "HNHGradientView.h" diff --git a/MacPass/MPPasswordCreatorViewController.m b/MacPass/MPPasswordCreatorViewController.m index cb34850b..0c6107f3 100644 --- a/MacPass/MPPasswordCreatorViewController.m +++ b/MacPass/MPPasswordCreatorViewController.m @@ -13,7 +13,8 @@ #import "MPSettingsHelper.h" #import "MPFlagsHelper.h" -#import "KPKEntry.h" + +#import "KeePassKit/KeePassKit.h" /* diff --git a/MacPass/MPPasswordEditWindowController.m b/MacPass/MPPasswordEditWindowController.m index b20adde6..0b512561 100644 --- a/MacPass/MPPasswordEditWindowController.m +++ b/MacPass/MPPasswordEditWindowController.m @@ -10,11 +10,8 @@ #import "MPDocument.h" #import "HNHRoundedSecureTextField.h" -#import "NSString+Empty.h" -#import "NSData+Keyfile.h" -#import "KPKTree.h" -#import "KPKCompositeKey.h" +#import "KeePassKit/KeePassKit.h" @interface MPPasswordEditWindowController () diff --git a/MacPass/MPPluginManager.m b/MacPass/MPPluginManager.m index e78a24f8..a5743776 100644 --- a/MacPass/MPPluginManager.m +++ b/MacPass/MPPluginManager.m @@ -9,7 +9,8 @@ #import "MPPluginManager.h" #import "MPDocument.h" -#import "KPKTree.h" + +#import "KeePassKit/KeePassKit.h" @implementation MPPluginManager diff --git a/MacPass/MPReferenceBuilderViewController.m b/MacPass/MPReferenceBuilderViewController.m index 16867fbd..676406e5 100644 --- a/MacPass/MPReferenceBuilderViewController.m +++ b/MacPass/MPReferenceBuilderViewController.m @@ -7,7 +7,8 @@ // #import "MPReferenceBuilderViewController.h" -#import "KPKFormat.h" + +#import "KeePassKit/KeePassKit.h" @interface MPReferenceBuilderViewController () diff --git a/MacPass/MPSavePanelAccessoryViewController.h b/MacPass/MPSavePanelAccessoryViewController.h index 40544758..0294d37f 100644 --- a/MacPass/MPSavePanelAccessoryViewController.h +++ b/MacPass/MPSavePanelAccessoryViewController.h @@ -7,7 +7,7 @@ // #import "MPViewController.h" -#import "KPKVersion.h" +#import "KeePassKit/KeePassKit.h" @class MPDocument; diff --git a/MacPass/MPSavePanelAccessoryViewController.m b/MacPass/MPSavePanelAccessoryViewController.m index 6ae0f16e..ab884207 100644 --- a/MacPass/MPSavePanelAccessoryViewController.m +++ b/MacPass/MPSavePanelAccessoryViewController.m @@ -10,8 +10,7 @@ #import "MPDocument.h" #import "MPConstants.h" -#import "KPKUTIs.h" -#import "KPKTree.h" +#import "KeePassKit/KeePassKit.h" @interface MPSavePanelAccessoryViewController () @property (readwrite, assign) KPKVersion selectedVersion; diff --git a/MacPass/MPTemporaryFileStorage.m b/MacPass/MPTemporaryFileStorage.m index 56e04956..e1b6827c 100644 --- a/MacPass/MPTemporaryFileStorage.m +++ b/MacPass/MPTemporaryFileStorage.m @@ -9,7 +9,7 @@ #import "MPTemporaryFileStorage.h" #import "MPTemporaryFileStorageCenter.h" -#import "KPKBinary.h" +#import "KeePassKit/KeePassKit.h" #import "NSError+Messages.h" diff --git a/MacPass/MPTreeDelegate.h b/MacPass/MPTreeDelegate.h index fadf8281..adb42f84 100644 --- a/MacPass/MPTreeDelegate.h +++ b/MacPass/MPTreeDelegate.h @@ -7,7 +7,8 @@ // #import -#import "KPKTree.h" + +#import "KeePassKit/KeePassKit.h" @class MPDocument; diff --git a/MacPass/MPWindowAssociationsTableViewDelegate.m b/MacPass/MPWindowAssociationsTableViewDelegate.m index eb696041..d3fe374e 100644 --- a/MacPass/MPWindowAssociationsTableViewDelegate.m +++ b/MacPass/MPWindowAssociationsTableViewDelegate.m @@ -9,9 +9,8 @@ #import "MPWindowAssociationsTableViewDelegate.h" #import "MPDocument.h" -#import "KPKEntry.h" -#import "KPKAutotype.h" -#import "KPKWindowAssociation.h" + +#import "KeePassKit/KeePassKit.h" @implementation MPWindowAssociationsTableViewDelegate diff --git a/MacPass/NSString+MPPasswordCreation.m b/MacPass/NSString+MPPasswordCreation.m index 10d91b30..1f169208 100644 --- a/MacPass/NSString+MPPasswordCreation.m +++ b/MacPass/NSString+MPPasswordCreation.m @@ -7,7 +7,7 @@ // #import "NSString+MPPasswordCreation.h" -#import "NSData+Random.h" +#import "KeePassKit/KeePassKit.h" #import "MPSettingsHelper.h"