Comment: | iOS: Finish support for key files |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
d49bbec74cf3b4da2083755a47b1d516 |
User & Date: | js on 2017-11-26 21:51:37 |
Other Links: | manifest | tags |
2018-01-11
| ||
22:49 | iOS: Add initial support for upload via browser check-in: 8545f203d8 user: js tags: trunk | |
2017-11-26
| ||
21:51 | iOS: Finish support for key files check-in: d49bbec74c user: js tags: trunk | |
20:09 | iOS: Add initial parts of support for key files check-in: 43dbe5c8cb user: js tags: trunk | |
Modified LegacyPasswordGenerator.h from [7f1763dc99] to [844f8dbbf6].
1 | 1 2 3 4 5 6 7 8 9 | - + | /* |
︙ |
Modified LegacyPasswordGenerator.m from [dded19427e] to [57913569cc].
1 | 1 2 3 4 5 6 7 8 9 | - + | /* |
︙ |
Modified NewPasswordGenerator.h from [e075899521] to [4edb901c0e].
1 | 1 2 3 4 5 6 7 8 9 | - + | /* |
︙ |
Modified NewPasswordGenerator.m from [a9b0ef1bc2] to [50b60ad18e].
1 | 1 2 3 4 5 6 7 8 9 | - + | /* |
︙ |
Modified PasswordGenerator.h from [db2e07f394] to [b78de7da7b].
1 | 1 2 3 4 5 6 7 8 9 | - + | /* |
︙ |
Modified ScryptPWGen.h from [03797d9774] to [3e34cc6ece].
1 | 1 2 3 4 5 6 7 8 9 | - + | /* |
︙ |
Modified iOS/AboutController.h from [78dc35192c] to [8a939a27d3].
1 | 1 2 3 4 5 6 7 8 9 | - + | /* |
︙ |
Modified iOS/AboutController.m from [8422ba6553] to [789424ff38].
1 | 1 2 3 4 5 6 7 8 9 | - + | /* |
︙ |
Modified iOS/AddSiteController.h from [a0b21e026a] to [46b3e8eae6].
1 | 1 2 3 4 5 6 7 8 9 | - + | /* |
︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | + | #import "MainViewController.h" @interface AddSiteController: UITableViewController <UITableViewDelegate> @property (nonatomic, retain) IBOutlet UITextField *nameField; @property (nonatomic, retain) IBOutlet UITextField *lengthField; @property (nonatomic, retain) IBOutlet UISwitch *legacySwitch; @property (nonatomic, copy) NSString *keyFile; @property (nonatomic, retain) IBOutlet UILabel *keyFileLabel; @property (retain) MainViewController *mainViewController; - (IBAction)done: (id)sender; - (IBAction)cancel: (id)sender; @end |
Modified iOS/AddSiteController.m from [1b0750a97b] to [1bc20e8d42].
1 | 1 2 3 4 5 6 7 8 9 | - + | /* |
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | + | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #import <ObjFW_Bridge/ObjFW_Bridge.h> #import "AddSiteController.h" #import "SelectKeyFileController.h" static void showAlert(UIViewController *controller, NSString *title, NSString *message) { UIAlertController *alert = [UIAlertController alertControllerWithTitle: title message: message |
︙ | |||
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | + - + + - - - - - | @implementation AddSiteController - (void)dealloc { [_nameField release]; [_lengthField release]; [_legacySwitch release]; [_keyFile release]; [_keyFileLabel release]; [_mainViewController release]; [super dealloc]; } - (void)tableView: (UITableView *)tableView didSelectRowAtIndexPath: (NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath: indexPath animated: YES]; if (indexPath.section == 1 && indexPath.row == 1) |
︙ | |||
109 110 111 112 113 114 115 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | - + + + + + + + + | @"Please pick a name that does not exist yet."); return; } [self.mainViewController.siteStorage setSite: name length: length legacy: self.legacySwitch.on |
Modified iOS/AppDelegate.h from [1286ebd308] to [077774775e].
1 | 1 2 3 4 5 6 7 8 9 | - + | /* |
︙ |
Modified iOS/AppDelegate.m from [edb40869df] to [9c769f463c].
1 | 1 2 3 4 5 6 7 8 9 | - + | /* |
︙ |
Modified iOS/Base.lproj/Main.storyboard from [ce215435c7] to [6479de6e84].
︙ | |||
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | </navigationItem> <simulatedToolbarMetrics key="simulatedBottomBarMetrics"/> <connections> <outlet property="keyFileLabel" destination="wv8-GU-ahj" id="Tdf-2p-DSb"/> <outlet property="legacySwitch" destination="jcs-6K-Sbe" id="sCo-l6-9n7"/> <outlet property="lengthField" destination="KQA-JL-1zl" id="tdI-mj-8Ng"/> <outlet property="nameField" destination="AXY-MA-LhE" id="Noo-It-VNV"/> <segue destination="4bs-rP-TxE" kind="show" identifier="selectKeyFile" id="wen-iK-VNb"/> </connections> </tableViewController> <placeholder placeholderIdentifier="IBFirstResponder" id="6ti-F1-srK" userLabel="First Responder" sceneMemberID="firstResponder"/> <tableViewSection id="s3j-z4-wEb"> <cells/> </tableViewSection> </objects> <point key="canvasLocation" x="1992.8" y="-1102.3988005997003"/> </scene> <!--Select Key File Controller--> <scene sceneID="fKq-Aa-JNA"> <objects> <tableViewController id="4bs-rP-TxE" customClass="SelectKeyFileController" sceneMemberID="viewController"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="SYH-wm-J8Z"> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <prototypes> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="QAR-8T-qhV"> <rect key="frame" x="0.0" y="28" width="375" height="44"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="QAR-8T-qhV" id="u3r-6g-c9v"> <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/> <autoresizingMask key="autoresizingMask"/> </tableViewCellContentView> </tableViewCell> </prototypes> <connections> <outlet property="dataSource" destination="4bs-rP-TxE" id="ETv-7q-fl3"/> <outlet property="delegate" destination="4bs-rP-TxE" id="Tnz-0X-Y4f"/> </connections> </tableView> <toolbarItems/> <navigationItem key="navigationItem" id="bWa-Dd-f4f"/> <simulatedToolbarMetrics key="simulatedBottomBarMetrics"/> </tableViewController> <placeholder placeholderIdentifier="IBFirstResponder" id="hBM-t2-PD9" userLabel="First Responder" sceneMemberID="firstResponder"/> </objects> <point key="canvasLocation" x="2935" y="-1234"/> </scene> <!--Show Details Controller--> <scene sceneID="rn9-fJ-mg7"> <objects> <tableViewController id="ayJ-fs-aIU" customClass="ShowDetailsController" sceneMemberID="viewController"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="vWS-Yc-qQ5"> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
︙ |
Modified iOS/Info.plist from [b0d84f038e] to [cc5f97ce78].
︙ | |||
31 32 33 34 35 36 37 38 39 | 31 32 33 34 35 36 37 38 39 40 41 | + + | <key>UISupportedInterfaceOrientations</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> </array> <key>UIFileSharingEnabled</key> <true/> </dict> </plist> |
Modified iOS/MainViewController.h from [f6c81971ca] to [7918b23aad].
1 | 1 2 3 4 5 6 7 8 9 | - + | /* |
︙ |
Modified iOS/MainViewController.m from [7b5e60dc8a] to [9d72eb29c9].
1 | 1 2 3 4 5 6 7 8 9 | - + | /* |
︙ | |||
56 57 58 59 60 61 62 | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | - + | objc_autoreleasePoolPop(pool); } - (NSInteger)tableView: (UITableView *)tableView numberOfRowsInSection: (NSInteger)section { |
︙ |
Added iOS/SelectKeyFileController.h version [3a78e95089].
Added iOS/SelectKeyFileController.m version [325d611e26].
Modified iOS/ShowDetailsController.h from [7882b18344] to [c6a36ae624].
1 | 1 2 3 4 5 6 7 8 9 | - + | /* |
︙ |
Modified iOS/ShowDetailsController.m from [3e64773eef] to [2cd4aee875].
1 | 1 2 3 4 5 6 7 8 9 | - + | /* |
︙ | |||
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | + + + + + + + + + + + + + + + + + + + + + + + | if (_legacy) generator = [LegacyPasswordGenerator generator]; else generator = [NewPasswordGenerator generator]; generator.site = _name; generator.length = _length; if (_keyFile != nil) { NSString *documentDirectory; OFString *keyFilePath; if ((documentDirectory = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES).firstObject) == nil) { NSLog(@"Could not get key files: No documents " @"directory"); return; } keyFilePath = [documentDirectory.OFObject stringByAppendingPathComponent: _keyFile]; generator.keyFile = [OFMutableData dataWithContentsOfFile: keyFilePath]; } passphrase = of_strdup(self.passphraseField.text.UTF8String); generator.passphrase = passphrase; mainStoryboard = [UIStoryboard storyboardWithName: @"Main" bundle: nil]; activityController = [mainStoryboard instantiateViewControllerWithIdentifier: @"activityIndicator"]; [self.navigationController.view addSubview: activityController.view]; dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^ { @try { [generator derivePassword]; } @finally { if (generator.keyFile != nil) of_explicit_memset( (void *)generator.keyFile.items, 0, generator.keyFile.count); of_explicit_memset(passphrase, 0, strlen(passphrase)); free(passphrase); } NSMutableString *password = [[[NSMutableString alloc] initWithBytes: (char *)generator.output length: generator.length |
︙ |
Modified iOS/SiteStorage.h from [8a1dad4503] to [bfeedb41fd].
1 | 1 2 3 4 5 6 7 8 9 | - + | /* |
︙ |
Modified iOS/SiteStorage.m from [47936472f3] to [5d305d30e2].
1 | 1 2 3 4 5 6 7 8 9 | - + | /* |
︙ |
Modified iOS/main.m from [f2227d698c] to [b20626de32].
1 | 1 2 3 4 5 6 7 8 9 | - + | /* |
︙ |
Modified iOS/scrypt-pwgen.xcodeproj/project.pbxproj from [d7d45a6c34] to [215e12d1d4].
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | + | 4B9525261F96BB900095F259 /* ObjFW_Bridge.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B9525241F96BB820095F259 /* ObjFW_Bridge.framework */; }; 4B9525291F994CD30095F259 /* ObjFW.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4B9525231F96BB820095F259 /* ObjFW.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 4B95252A1F9953350095F259 /* ObjFW_Bridge.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4B9525241F96BB820095F259 /* ObjFW_Bridge.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 4BA115D21DA9432D007ED4EA /* LegacyPasswordGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BA115CE1DA9432D007ED4EA /* LegacyPasswordGenerator.m */; settings = {COMPILER_FLAGS = "-fconstant-string-class=OFConstantString -fno-constant-cfstrings"; }; }; 4BA115D31DA9432D007ED4EA /* NewPasswordGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BA115D01DA9432D007ED4EA /* NewPasswordGenerator.m */; settings = {COMPILER_FLAGS = "-fconstant-string-class=OFConstantString -fno-constant-cfstrings"; }; }; 4BA115D61DA94390007ED4EA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BA115D51DA94390007ED4EA /* UIKit.framework */; }; 4BB3CDFD1DA9764300FEE5ED /* AddSiteController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BB3CDFC1DA9764300FEE5ED /* AddSiteController.m */; }; 4BC29DD51FCB5FAE00A1E786 /* SelectKeyFileController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BC29DD41FCB5FAE00A1E786 /* SelectKeyFileController.m */; }; 4BF4ADEA1DA9A3DB0073B995 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BF4ADE91DA9A3DB0073B995 /* Foundation.framework */; }; 4BF4ADED1DA9A6B00073B995 /* SiteStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF4ADEC1DA9A6B00073B995 /* SiteStorage.m */; settings = {COMPILER_FLAGS = "-fconstant-string-class=OFConstantString -fno-constant-cfstrings"; }; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ 4BB3CDF61DA967C100FEE5ED /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; |
︙ | |||
63 64 65 66 67 68 69 70 71 72 73 74 75 76 | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | + + | 4BA115CE1DA9432D007ED4EA /* LegacyPasswordGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LegacyPasswordGenerator.m; path = ../LegacyPasswordGenerator.m; sourceTree = "<group>"; }; 4BA115CF1DA9432D007ED4EA /* NewPasswordGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NewPasswordGenerator.h; path = ../NewPasswordGenerator.h; sourceTree = "<group>"; }; 4BA115D01DA9432D007ED4EA /* NewPasswordGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NewPasswordGenerator.m; path = ../NewPasswordGenerator.m; sourceTree = "<group>"; }; 4BA115D11DA9432D007ED4EA /* PasswordGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PasswordGenerator.h; path = ../PasswordGenerator.h; sourceTree = "<group>"; }; 4BA115D51DA94390007ED4EA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 4BB3CDFB1DA9764300FEE5ED /* AddSiteController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AddSiteController.h; sourceTree = "<group>"; }; 4BB3CDFC1DA9764300FEE5ED /* AddSiteController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AddSiteController.m; sourceTree = "<group>"; }; 4BC29DD41FCB5FAE00A1E786 /* SelectKeyFileController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SelectKeyFileController.m; sourceTree = "<group>"; }; 4BC29DD61FCB5FC400A1E786 /* SelectKeyFileController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SelectKeyFileController.h; sourceTree = "<group>"; }; 4BF4ADE91DA9A3DB0073B995 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 4BF4ADEB1DA9A6B00073B995 /* SiteStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SiteStorage.h; sourceTree = "<group>"; }; 4BF4ADEC1DA9A6B00073B995 /* SiteStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SiteStorage.m; sourceTree = "<group>"; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 4B2E52D91DA942840040D091 /* Frameworks */ = { |
︙ | |||
116 117 118 119 120 121 122 123 124 125 126 127 128 129 | 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | + + | 4B2E52E21DA942840040D091 /* AppDelegate.h */, 4B2E52E31DA942840040D091 /* AppDelegate.m */, 4B2E52F01DA942840040D091 /* Info.plist */, 4B2E52ED1DA942840040D091 /* LaunchScreen.storyboard */, 4B2E52E81DA942840040D091 /* Main.storyboard */, 4B2E52E51DA942840040D091 /* MainViewController.h */, 4B2E52E61DA942840040D091 /* MainViewController.m */, 4BC29DD61FCB5FC400A1E786 /* SelectKeyFileController.h */, 4BC29DD41FCB5FAE00A1E786 /* SelectKeyFileController.m */, 4B0719231DAA78D80065997A /* ShowDetailsController.h */, 4B0719241DAA78D80065997A /* ShowDetailsController.m */, 4BF4ADEB1DA9A6B00073B995 /* SiteStorage.h */, 4BF4ADEC1DA9A6B00073B995 /* SiteStorage.m */, 4B2E52E01DA942840040D091 /* main.m */, ); name = iOS; |
︙ | |||
222 223 224 225 226 227 228 229 230 231 232 233 234 235 | 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | + | /* Begin PBXSourcesBuildPhase section */ 4B2E52D81DA942840040D091 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 4B82D1151DAAAFCE00F32B2F /* AboutController.m in Sources */, 4BC29DD51FCB5FAE00A1E786 /* SelectKeyFileController.m in Sources */, 4BB3CDFD1DA9764300FEE5ED /* AddSiteController.m in Sources */, 4B2E52E41DA942840040D091 /* AppDelegate.m in Sources */, 4BA115D21DA9432D007ED4EA /* LegacyPasswordGenerator.m in Sources */, 4B2E52E71DA942840040D091 /* MainViewController.m in Sources */, 4BA115D31DA9432D007ED4EA /* NewPasswordGenerator.m in Sources */, 4B0719251DAA78D80065997A /* ShowDetailsController.m in Sources */, 4BF4ADED1DA9A6B00073B995 /* SiteStorage.m in Sources */, |
︙ |