mirror of
https://github.com/maxgoedjen/secretive.git
synced 2025-04-18 05:22:11 +00:00
Merge branch 'main' into drivername
This commit is contained in:
commit
36ff05b068
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@ -20,7 +20,7 @@ jobs:
|
|||||||
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
|
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
|
||||||
run: ./.github/scripts/signing.sh
|
run: ./.github/scripts/signing.sh
|
||||||
- name: Set Environment
|
- name: Set Environment
|
||||||
run: sudo xcrun xcode-select -s /Applications/Xcode_12.3.app
|
run: sudo xcrun xcode-select -s /Applications/Xcode_13.0.app
|
||||||
- name: Test
|
- name: Test
|
||||||
run: xcrun xcodebuild test -project Secretive.xcodeproj -scheme Secretive
|
run: xcrun xcodebuild test -project Secretive.xcodeproj -scheme Secretive
|
||||||
build:
|
build:
|
||||||
@ -38,7 +38,7 @@ jobs:
|
|||||||
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
|
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
|
||||||
run: ./.github/scripts/signing.sh
|
run: ./.github/scripts/signing.sh
|
||||||
- name: Set Environment
|
- name: Set Environment
|
||||||
run: sudo xcrun xcode-select -s /Applications/Xcode_12.2.app
|
run: sudo xcrun xcode-select -s /Applications/Xcode_13.0.app
|
||||||
- name: Update Build Number
|
- name: Update Build Number
|
||||||
env:
|
env:
|
||||||
TAG_NAME: ${{ github.ref }}
|
TAG_NAME: ${{ github.ref }}
|
||||||
|
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -8,6 +8,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set Environment
|
- name: Set Environment
|
||||||
run: sudo xcrun xcode-select -s /Applications/Xcode_12.3.app
|
run: sudo xcrun xcode-select -s /Applications/Xcode_13.0.app
|
||||||
- name: Test
|
- name: Test
|
||||||
run: xcrun xcodebuild test -project Secretive.xcodeproj -scheme Secretive
|
run: xcrun xcodebuild test -project Secretive.xcodeproj -scheme Secretive
|
||||||
|
@ -26,8 +26,33 @@ Host *
|
|||||||
IdentityAgent /Users/$YOUR_USERNAME/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh
|
IdentityAgent /Users/$YOUR_USERNAME/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Cyberduck
|
||||||
|
|
||||||
|
Add this to `~/Library/LaunchAgents/com.maxgoedjen.Secretive.SecretAgent.plist`
|
||||||
|
|
||||||
|
```
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>Label</key>
|
||||||
|
<string>link-ssh-auth-sock</string>
|
||||||
|
<key>ProgramArguments</key>
|
||||||
|
<array>
|
||||||
|
<string>/bin/sh</string>
|
||||||
|
<string>-c</string>
|
||||||
|
<string>/bin/ln -sf $HOME/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh $SSH_AUTH_SOCK</string>
|
||||||
|
</array>
|
||||||
|
<key>RunAtLoad</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
```
|
||||||
|
|
||||||
|
Log out and log in again before launching Cyberduck.
|
||||||
|
|
||||||
|
|
||||||
# The app I use isn't listed here!
|
# The app I use isn't listed here!
|
||||||
|
|
||||||
If you know how to get it set up, please open a PR for this page and add it! Contributions are very welcome.
|
If you know how to get it set up, please open a PR for this page and add it! Contributions are very welcome.
|
||||||
If you're not able to get it working, please file a [GitHub issue](https://github.com/maxgoedjen/secretive/issues/new) for it. No guarantees we'll be able to get it working, but chances are someone else in the community might be able to.
|
If you're not able to get it working, please file a [GitHub issue](https://github.com/maxgoedjen/secretive/issues/new) for it. No guarantees we'll be able to get it working, but chances are someone else in the community might be able to.
|
||||||
|
@ -12,9 +12,11 @@ public class Updater: ObservableObject, UpdaterProtocol {
|
|||||||
@Published public var update: Release?
|
@Published public var update: Release?
|
||||||
|
|
||||||
private let osVersion: SemVer
|
private let osVersion: SemVer
|
||||||
|
private let currentVersion: SemVer
|
||||||
|
|
||||||
public init(checkOnLaunch: Bool, osVersion: SemVer = SemVer(ProcessInfo.processInfo.operatingSystemVersion)) {
|
public init(checkOnLaunch: Bool, osVersion: SemVer = SemVer(ProcessInfo.processInfo.operatingSystemVersion), currentVersion: SemVer = SemVer(Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "0.0.0")) {
|
||||||
self.osVersion = osVersion
|
self.osVersion = osVersion
|
||||||
|
self.currentVersion = currentVersion
|
||||||
if checkOnLaunch {
|
if checkOnLaunch {
|
||||||
// Don't do a launch check if the user hasn't seen the setup prompt explaining updater yet.
|
// Don't do a launch check if the user hasn't seen the setup prompt explaining updater yet.
|
||||||
checkForUpdates()
|
checkForUpdates()
|
||||||
@ -54,7 +56,6 @@ extension Updater {
|
|||||||
guard !userIgnored(release: release) else { return }
|
guard !userIgnored(release: release) else { return }
|
||||||
guard !release.prerelease else { return }
|
guard !release.prerelease else { return }
|
||||||
let latestVersion = SemVer(release.name)
|
let latestVersion = SemVer(release.name)
|
||||||
let currentVersion = SemVer(Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "0.0.0")
|
|
||||||
if latestVersion > currentVersion {
|
if latestVersion > currentVersion {
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
self.update = release
|
self.update = release
|
||||||
|
@ -51,7 +51,7 @@ class ReleaseParsingTests: XCTestCase {
|
|||||||
func testGreatestSelectedIfOldPatchIsPublishedLater() {
|
func testGreatestSelectedIfOldPatchIsPublishedLater() {
|
||||||
// If 2.x.x series has been published, and a patch for 1.x.x is issued
|
// If 2.x.x series has been published, and a patch for 1.x.x is issued
|
||||||
// 2.x.x should still be selected if user can run it.
|
// 2.x.x should still be selected if user can run it.
|
||||||
let updater = Updater(checkOnLaunch: false, osVersion: SemVer("2.2.3"))
|
let updater = Updater(checkOnLaunch: false, osVersion: SemVer("2.2.3"), currentVersion: SemVer("1.0.0"))
|
||||||
let two = Release(name: "2.0.0", prerelease: false, html_url: URL(string: "https://example.com")!, body: "2.0 available! Minimum macOS Version: 2.2.3")
|
let two = Release(name: "2.0.0", prerelease: false, html_url: URL(string: "https://example.com")!, body: "2.0 available! Minimum macOS Version: 2.2.3")
|
||||||
let releases = [
|
let releases = [
|
||||||
Release(name: "1.0.0", prerelease: false, html_url: URL(string: "https://example.com")!, body: "Initial release Minimum macOS Version: 1.2.3"),
|
Release(name: "1.0.0", prerelease: false, html_url: URL(string: "https://example.com")!, body: "Initial release Minimum macOS Version: 1.2.3"),
|
||||||
@ -72,7 +72,7 @@ class ReleaseParsingTests: XCTestCase {
|
|||||||
func testLatestVersionIsRunnable() {
|
func testLatestVersionIsRunnable() {
|
||||||
// If the 2.x.x series has been published but the user can't run it
|
// If the 2.x.x series has been published but the user can't run it
|
||||||
// the last version the user can run should be selected.
|
// the last version the user can run should be selected.
|
||||||
let updater = Updater(checkOnLaunch: false, osVersion: SemVer("1.2.3"))
|
let updater = Updater(checkOnLaunch: false, osVersion: SemVer("1.2.3"), currentVersion: SemVer("1.0.0"))
|
||||||
let oneOhTwo = Release(name: "1.0.2", prerelease: false, html_url: URL(string: "https://example.com")!, body: "Emergency patch! Minimum macOS Version: 1.2.3")
|
let oneOhTwo = Release(name: "1.0.2", prerelease: false, html_url: URL(string: "https://example.com")!, body: "Emergency patch! Minimum macOS Version: 1.2.3")
|
||||||
let releases = [
|
let releases = [
|
||||||
Release(name: "1.0.0", prerelease: false, html_url: URL(string: "https://example.com")!, body: "Initial release Minimum macOS Version: 1.2.3"),
|
Release(name: "1.0.0", prerelease: false, html_url: URL(string: "https://example.com")!, body: "Initial release Minimum macOS Version: 1.2.3"),
|
||||||
|
@ -50,7 +50,7 @@ extension Stub {
|
|||||||
|
|
||||||
public func sign(data: Data, with secret: Secret, for provenance: SigningRequestProvenance) throws -> Data {
|
public func sign(data: Data, with secret: Secret, for provenance: SigningRequestProvenance) throws -> Data {
|
||||||
guard !shouldThrow else {
|
guard !shouldThrow else {
|
||||||
throw NSError()
|
throw NSError(domain: "test", code: 0, userInfo: nil)
|
||||||
}
|
}
|
||||||
let privateKey = SecKeyCreateWithData(secret.privateKey as CFData, [
|
let privateKey = SecKeyCreateWithData(secret.privateKey as CFData, [
|
||||||
kSecAttrKeyType: kSecAttrKeyTypeECSECPrimeRandom,
|
kSecAttrKeyType: kSecAttrKeyTypeECSECPrimeRandom,
|
||||||
|
@ -22,7 +22,9 @@ struct LaunchAgentController {
|
|||||||
func forceLaunch(completion: ((Bool) -> Void)?) {
|
func forceLaunch(completion: ((Bool) -> Void)?) {
|
||||||
Logger().debug("Agent is not running, attempting to force launch")
|
Logger().debug("Agent is not running, attempting to force launch")
|
||||||
let url = Bundle.main.bundleURL.appendingPathComponent("Contents/Library/LoginItems/SecretAgent.app")
|
let url = Bundle.main.bundleURL.appendingPathComponent("Contents/Library/LoginItems/SecretAgent.app")
|
||||||
NSWorkspace.shared.openApplication(at: url, configuration: NSWorkspace.OpenConfiguration()) { app, error in
|
let config = NSWorkspace.OpenConfiguration()
|
||||||
|
config.activates = false
|
||||||
|
NSWorkspace.shared.openApplication(at: url, configuration: config) { app, error in
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
completion?(error == nil)
|
completion?(error == nil)
|
||||||
}
|
}
|
||||||
|
@ -8,19 +8,21 @@ struct SecretDetailView<SecretType: Secret>: View {
|
|||||||
private let keyWriter = OpenSSHKeyWriter()
|
private let keyWriter = OpenSSHKeyWriter()
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Form {
|
ScrollView {
|
||||||
Section {
|
Form {
|
||||||
CopyableView(title: "SHA256 Fingerprint", image: Image(systemName: "touchid"), text: keyWriter.openSSHSHA256Fingerprint(secret: secret))
|
Section {
|
||||||
Spacer()
|
CopyableView(title: "SHA256 Fingerprint", image: Image(systemName: "touchid"), text: keyWriter.openSSHSHA256Fingerprint(secret: secret))
|
||||||
.frame(height: 20)
|
Spacer()
|
||||||
CopyableView(title: "MD5 Fingerprint", image: Image(systemName: "touchid"), text: keyWriter.openSSHMD5Fingerprint(secret: secret))
|
.frame(height: 20)
|
||||||
Spacer()
|
CopyableView(title: "MD5 Fingerprint", image: Image(systemName: "touchid"), text: keyWriter.openSSHMD5Fingerprint(secret: secret))
|
||||||
.frame(height: 20)
|
Spacer()
|
||||||
CopyableView(title: "Public Key", image: Image(systemName: "key"), text: keyString)
|
.frame(height: 20)
|
||||||
Spacer()
|
CopyableView(title: "Public Key", image: Image(systemName: "key"), text: keyString)
|
||||||
|
Spacer()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
.padding()
|
||||||
}
|
}
|
||||||
.padding()
|
|
||||||
.frame(minHeight: 200, maxHeight: .infinity)
|
.frame(minHeight: 200, maxHeight: .infinity)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user