Compare commits
No commits in common. "main" and "v1.0.1" have entirely different histories.
20 changed files with 122 additions and 41 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
/iOS/CryptoPassphrase.xcodeproj/project.xcworkspace
|
|
||||||
/iOS/CryptoPassphrase.xcodeproj/xcuserdata
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2024 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://git.nil.im/js/CryptoPassphrase
|
* https://fl.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2024 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://git.nil.im/js/CryptoPassphrase
|
* https://fl.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2024 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://git.nil.im/js/CryptoPassphrase
|
* https://fl.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2024 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://git.nil.im/js/CryptoPassphrase
|
* https://fl.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2024 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://git.nil.im/js/CryptoPassphrase
|
* https://fl.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2024 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://git.nil.im/js/CryptoPassphrase
|
* https://fl.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2024 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://git.nil.im/js/CryptoPassphrase
|
* https://fl.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2024 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://git.nil.im/js/CryptoPassphrase
|
* https://fl.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2024 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://git.nil.im/js/CryptoPassphrase
|
* https://fl.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2024 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://git.nil.im/js/CryptoPassphrase
|
* https://fl.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BN3-Y7-zvx">
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BN3-Y7-zvx">
|
||||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment identifier="iOS"/>
|
<deployment identifier="iOS"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
|
||||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
<objects>
|
<objects>
|
||||||
<navigationController id="BN3-Y7-zvx" sceneMemberID="viewController">
|
<navigationController id="BN3-Y7-zvx" sceneMemberID="viewController">
|
||||||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="K8n-wn-irC">
|
<navigationBar key="navigationBar" contentMode="scaleToFill" id="K8n-wn-irC">
|
||||||
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
|
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
</navigationBar>
|
</navigationBar>
|
||||||
<connections>
|
<connections>
|
||||||
|
@ -40,14 +40,14 @@
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<searchBar contentMode="redraw" translatesAutoresizingMaskIntoConstraints="NO" id="CMc-ZN-RAn">
|
<searchBar contentMode="redraw" translatesAutoresizingMaskIntoConstraints="NO" id="CMc-ZN-RAn">
|
||||||
<rect key="frame" x="0.0" y="64" width="375" height="56"/>
|
<rect key="frame" x="0.0" y="44" width="375" height="51"/>
|
||||||
<textInputTraits key="textInputTraits"/>
|
<textInputTraits key="textInputTraits"/>
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="delegate" destination="P19-6i-fpd" id="G7P-7f-gbO"/>
|
<outlet property="delegate" destination="P19-6i-fpd" id="G7P-7f-gbO"/>
|
||||||
</connections>
|
</connections>
|
||||||
</searchBar>
|
</searchBar>
|
||||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="eoq-EJ-t3s">
|
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="eoq-EJ-t3s">
|
||||||
<rect key="frame" x="0.0" y="120" width="375" height="547"/>
|
<rect key="frame" x="0.0" y="95" width="375" height="572"/>
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="dataSource" destination="P19-6i-fpd" id="1sa-qY-oQx"/>
|
<outlet property="dataSource" destination="P19-6i-fpd" id="1sa-qY-oQx"/>
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<webView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2xd-QR-99d">
|
<webView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2xd-QR-99d">
|
||||||
<rect key="frame" x="0.0" y="64" width="375" height="603"/>
|
<rect key="frame" x="0.0" y="44" width="375" height="623"/>
|
||||||
<color key="backgroundColor" red="0.36078431370000003" green="0.38823529410000002" blue="0.4039215686" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
<color key="backgroundColor" red="0.36078431370000003" green="0.38823529410000002" blue="0.4039215686" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="delegate" destination="MZ3-iZ-Dsf" id="uKq-6T-ltJ"/>
|
<outlet property="delegate" destination="MZ3-iZ-Dsf" id="uKq-6T-ltJ"/>
|
||||||
|
@ -234,7 +234,7 @@
|
||||||
<rect key="frame" x="0.0" y="186" width="375" height="44"/>
|
<rect key="frame" x="0.0" y="186" width="375" height="44"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Oqt-88-vl9" id="j4y-Zr-ep4">
|
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Oqt-88-vl9" id="j4y-Zr-ep4">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="348.5" height="44"/>
|
<rect key="frame" x="0.0" y="0.0" width="350.5" height="44"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Key file" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Uyw-CW-atj">
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Key file" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Uyw-CW-atj">
|
||||||
|
@ -247,7 +247,7 @@
|
||||||
<nil key="highlightedColor"/>
|
<nil key="highlightedColor"/>
|
||||||
</label>
|
</label>
|
||||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="None" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wv8-GU-ahj">
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="None" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wv8-GU-ahj">
|
||||||
<rect key="frame" x="124" y="11.5" width="215.5" height="21"/>
|
<rect key="frame" x="124" y="11.5" width="217.5" height="21"/>
|
||||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||||
<nil key="textColor"/>
|
<nil key="textColor"/>
|
||||||
<nil key="highlightedColor"/>
|
<nil key="highlightedColor"/>
|
||||||
|
@ -309,7 +309,7 @@
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
<prototypes>
|
<prototypes>
|
||||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="QAR-8T-qhV">
|
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="QAR-8T-qhV">
|
||||||
<rect key="frame" x="0.0" y="50" width="375" height="43.5"/>
|
<rect key="frame" x="0.0" y="44.5" width="375" height="43.5"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<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">
|
<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"/>
|
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
|
||||||
|
@ -325,6 +325,11 @@
|
||||||
<toolbarItems/>
|
<toolbarItems/>
|
||||||
<navigationItem key="navigationItem" id="bWa-Dd-f4f">
|
<navigationItem key="navigationItem" id="bWa-Dd-f4f">
|
||||||
<nil key="title"/>
|
<nil key="title"/>
|
||||||
|
<barButtonItem key="rightBarButtonItem" enabled="NO" title="Upload" id="85s-WF-868">
|
||||||
|
<connections>
|
||||||
|
<action selector="upload:" destination="4bs-rP-TxE" id="DnV-UG-h0y"/>
|
||||||
|
</connections>
|
||||||
|
</barButtonItem>
|
||||||
</navigationItem>
|
</navigationItem>
|
||||||
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
|
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
|
||||||
</tableViewController>
|
</tableViewController>
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
4B5BCEFB22B5CF3200E551BD /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B5BCEFA22B5CF3200E551BD /* MainViewController.swift */; };
|
4B5BCEFB22B5CF3200E551BD /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B5BCEFA22B5CF3200E551BD /* MainViewController.swift */; };
|
||||||
4B5BCEFD22B5D98800E551BD /* SelectKeyFileController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B5BCEFC22B5D98800E551BD /* SelectKeyFileController.swift */; };
|
4B5BCEFD22B5D98800E551BD /* SelectKeyFileController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B5BCEFC22B5D98800E551BD /* SelectKeyFileController.swift */; };
|
||||||
4B5BCEFF22B5E36900E551BD /* ShowDetailsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B5BCEFE22B5E36900E551BD /* ShowDetailsController.swift */; };
|
4B5BCEFF22B5E36900E551BD /* ShowDetailsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B5BCEFE22B5E36900E551BD /* ShowDetailsController.swift */; };
|
||||||
|
4B93656E22B5ADA00099DD08 /* HTTPServerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B93656D22B5ADA00099DD08 /* HTTPServerDelegate.swift */; };
|
||||||
4B93657022B5AE2C0099DD08 /* AboutController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B93656F22B5AE2C0099DD08 /* AboutController.swift */; };
|
4B93657022B5AE2C0099DD08 /* AboutController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B93656F22B5AE2C0099DD08 /* AboutController.swift */; };
|
||||||
4B93657222B5B1FB0099DD08 /* AddSiteController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B93657122B5B1FB0099DD08 /* AddSiteController.swift */; };
|
4B93657222B5B1FB0099DD08 /* AddSiteController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B93657122B5B1FB0099DD08 /* AddSiteController.swift */; };
|
||||||
4B9525251F96BB900095F259 /* ObjFW.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B9525231F96BB820095F259 /* ObjFW.framework */; };
|
4B9525251F96BB900095F259 /* ObjFW.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B9525231F96BB820095F259 /* ObjFW.framework */; };
|
||||||
|
@ -55,6 +56,7 @@
|
||||||
4B5BCEFA22B5CF3200E551BD /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; };
|
4B5BCEFA22B5CF3200E551BD /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; };
|
||||||
4B5BCEFC22B5D98800E551BD /* SelectKeyFileController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectKeyFileController.swift; sourceTree = "<group>"; };
|
4B5BCEFC22B5D98800E551BD /* SelectKeyFileController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectKeyFileController.swift; sourceTree = "<group>"; };
|
||||||
4B5BCEFE22B5E36900E551BD /* ShowDetailsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShowDetailsController.swift; sourceTree = "<group>"; };
|
4B5BCEFE22B5E36900E551BD /* ShowDetailsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShowDetailsController.swift; sourceTree = "<group>"; };
|
||||||
|
4B93656D22B5ADA00099DD08 /* HTTPServerDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HTTPServerDelegate.swift; sourceTree = "<group>"; };
|
||||||
4B93656F22B5AE2C0099DD08 /* AboutController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutController.swift; sourceTree = "<group>"; };
|
4B93656F22B5AE2C0099DD08 /* AboutController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutController.swift; sourceTree = "<group>"; };
|
||||||
4B93657122B5B1FB0099DD08 /* AddSiteController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddSiteController.swift; sourceTree = "<group>"; };
|
4B93657122B5B1FB0099DD08 /* AddSiteController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddSiteController.swift; sourceTree = "<group>"; };
|
||||||
4B9525231F96BB820095F259 /* ObjFW.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ObjFW.framework; path = Frameworks/ObjFW.framework; sourceTree = "<group>"; };
|
4B9525231F96BB820095F259 /* ObjFW.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ObjFW.framework; path = Frameworks/ObjFW.framework; sourceTree = "<group>"; };
|
||||||
|
@ -108,6 +110,7 @@
|
||||||
4B93656F22B5AE2C0099DD08 /* AboutController.swift */,
|
4B93656F22B5AE2C0099DD08 /* AboutController.swift */,
|
||||||
4B93657122B5B1FB0099DD08 /* AddSiteController.swift */,
|
4B93657122B5B1FB0099DD08 /* AddSiteController.swift */,
|
||||||
4B5BCEF822B5B94C00E551BD /* AppDelegate.swift */,
|
4B5BCEF822B5B94C00E551BD /* AppDelegate.swift */,
|
||||||
|
4B93656D22B5ADA00099DD08 /* HTTPServerDelegate.swift */,
|
||||||
4B2E52F01DA942840040D091 /* Info.plist */,
|
4B2E52F01DA942840040D091 /* Info.plist */,
|
||||||
4B2E52ED1DA942840040D091 /* LaunchScreen.storyboard */,
|
4B2E52ED1DA942840040D091 /* LaunchScreen.storyboard */,
|
||||||
4B2E52E81DA942840040D091 /* Main.storyboard */,
|
4B2E52E81DA942840040D091 /* Main.storyboard */,
|
||||||
|
@ -220,6 +223,7 @@
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
4B5BCEF922B5B94C00E551BD /* AppDelegate.swift in Sources */,
|
4B5BCEF922B5B94C00E551BD /* AppDelegate.swift in Sources */,
|
||||||
|
4B93656E22B5ADA00099DD08 /* HTTPServerDelegate.swift in Sources */,
|
||||||
4B5BCEFB22B5CF3200E551BD /* MainViewController.swift in Sources */,
|
4B5BCEFB22B5CF3200E551BD /* MainViewController.swift in Sources */,
|
||||||
4B93657222B5B1FB0099DD08 /* AddSiteController.swift in Sources */,
|
4B93657222B5B1FB0099DD08 /* AddSiteController.swift in Sources */,
|
||||||
4BA115D21DA9432D007ED4EA /* LegacyPasswordGenerator.m in Sources */,
|
4BA115D21DA9432D007ED4EA /* LegacyPasswordGenerator.m in Sources */,
|
||||||
|
|
27
iOS/HTTPServerDelegate.swift
Normal file
27
iOS/HTTPServerDelegate.swift
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
|
*
|
||||||
|
* https://fl.nil.im/cryptopassphrase
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||||
|
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||||
|
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||||
|
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||||
|
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||||
|
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import ObjFW
|
||||||
|
|
||||||
|
class HTTPServerDelegate: OFObject, OFHTTPServerDelegate {
|
||||||
|
func server(_ server: OFHTTPServer, didReceive request: OFHTTPRequest,
|
||||||
|
requestBody: OFStream?, response: OFHTTPResponse) {
|
||||||
|
print("\(request)")
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2024 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://git.nil.im/js/CryptoPassphrase
|
* https://fl.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2024 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://git.nil.im/js/CryptoPassphrase
|
* https://fl.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
@ -23,6 +23,21 @@ class SelectKeyFileController: UITableViewController {
|
||||||
public var addSiteController: AddSiteController?
|
public var addSiteController: AddSiteController?
|
||||||
|
|
||||||
private var keyFiles: [String] = []
|
private var keyFiles: [String] = []
|
||||||
|
private var httpServer: OFHTTPServer
|
||||||
|
private var httpServerDelegate: HTTPServerDelegate
|
||||||
|
private var httpServerThread: OFThread
|
||||||
|
|
||||||
|
required init?(coder aDecoder: NSCoder) {
|
||||||
|
httpServer = OFHTTPServer()
|
||||||
|
httpServer.host = "127.0.0.1".ofObject
|
||||||
|
|
||||||
|
httpServerDelegate = HTTPServerDelegate()
|
||||||
|
httpServer.delegate = self.httpServerDelegate
|
||||||
|
|
||||||
|
httpServerThread = OFThread()
|
||||||
|
|
||||||
|
super.init(coder: aDecoder)
|
||||||
|
}
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
|
@ -43,6 +58,13 @@ class SelectKeyFileController: UITableViewController {
|
||||||
navigationController?.popViewController(animated: true)
|
navigationController?.popViewController(animated: true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
httpServerThread.start()
|
||||||
|
}
|
||||||
|
|
||||||
|
override func viewDidDisappear(_ animated: Bool) {
|
||||||
|
httpServerThread.runLoop.stop()
|
||||||
|
httpServerThread.join()
|
||||||
}
|
}
|
||||||
|
|
||||||
override func tableView(_ tableView: UITableView,
|
override func tableView(_ tableView: UITableView,
|
||||||
|
@ -70,4 +92,29 @@ class SelectKeyFileController: UITableViewController {
|
||||||
|
|
||||||
self.navigationController?.popViewController(animated: true)
|
self.navigationController?.popViewController(animated: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@IBAction func upload(_ sender: Any?) {
|
||||||
|
let timer = OFTimer.scheduledTimer(withTimeInterval: 0,
|
||||||
|
repeats: false) { (OFTimer) in
|
||||||
|
self.httpServer.port = 0
|
||||||
|
self.httpServer.start()
|
||||||
|
|
||||||
|
let message =
|
||||||
|
"Navigate to http://\(self.httpServer.host!.nsObject):" +
|
||||||
|
"\(self.httpServer.port)/ in your browser.\n\n" +
|
||||||
|
"Press OK when done."
|
||||||
|
let alert = UIAlertController(title: "Server Running",
|
||||||
|
message: message,
|
||||||
|
preferredStyle: .alert)
|
||||||
|
alert.addAction(
|
||||||
|
UIAlertAction(title: "OK", style: .default, handler: nil))
|
||||||
|
|
||||||
|
DispatchQueue.main.sync {
|
||||||
|
self.present(alert, animated: true) {
|
||||||
|
self.httpServer.stop()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
httpServerThread.runLoop.add(timer)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2024 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://git.nil.im/js/CryptoPassphrase
|
* https://fl.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2024 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://git.nil.im/js/CryptoPassphrase
|
* https://fl.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://git.nil.im/js/CryptoPassphrase
|
* https://fl.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://git.nil.im/js/CryptoPassphrase
|
* https://fl.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue