Dump
This commit is contained in:
parent
9f5950269f
commit
fc2d740680
|
@ -2,6 +2,8 @@ import Foundation
|
||||||
import Security
|
import Security
|
||||||
import CryptoTokenKit
|
import CryptoTokenKit
|
||||||
|
|
||||||
|
// TODO: Might need to split this up into "sub-stores?"
|
||||||
|
// ie, each token has its own Store.
|
||||||
extension SmartCard {
|
extension SmartCard {
|
||||||
|
|
||||||
public class Store: SecretStore {
|
public class Store: SecretStore {
|
||||||
|
@ -13,7 +15,12 @@ extension SmartCard {
|
||||||
|
|
||||||
public init() {
|
public init() {
|
||||||
watcher.setInsertionHandler { (string) in
|
watcher.setInsertionHandler { (string) in
|
||||||
print(string)
|
guard !string.contains("setoken") else { return }
|
||||||
|
let driver = TKSmartCardTokenDriver()
|
||||||
|
let token = TKToken(tokenDriver: driver, instanceID: string)
|
||||||
|
let session = TKSmartCardTo kenSession(token: token)
|
||||||
|
print(session)
|
||||||
|
|
||||||
}
|
}
|
||||||
print(watcher.tokenIDs)
|
print(watcher.tokenIDs)
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||||
|
|
||||||
func applicationDidFinishLaunching(_ aNotification: Notification) {
|
func applicationDidFinishLaunching(_ aNotification: Notification) {
|
||||||
|
|
||||||
let contentView = ContentView(store: secureEnclave)
|
let contentView = ContentView(store: yubikey)
|
||||||
// Create the window and set the content view.
|
// Create the window and set the content view.
|
||||||
window = NSWindow(
|
window = NSWindow(
|
||||||
contentRect: NSRect(x: 0, y: 0, width: 480, height: 300),
|
contentRect: NSRect(x: 0, y: 0, width: 480, height: 300),
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>com.apple.security.app-sandbox</key>
|
<key>com.apple.security.app-sandbox</key>
|
||||||
<true/>
|
<false/>
|
||||||
<key>keychain-access-groups</key>
|
<key>keychain-access-groups</key>
|
||||||
<array>
|
<array>
|
||||||
<string>$(AppIdentifierPrefix)com.maxgoedjen.Secretive</string>
|
<string>$(AppIdentifierPrefix)com.maxgoedjen.Secretive</string>
|
||||||
|
|
Loading…
Reference in New Issue