Skip to content

Commit

Permalink
Merge branch 'main' of github.com:OperatorFoundation/KeychainCli
Browse files Browse the repository at this point in the history
Dr. Brandon Wiley committed Jun 19, 2024
2 parents 89621b8 + 24258f6 commit fb54894
Showing 2 changed files with 22 additions and 21 deletions.
5 changes: 3 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ let package = Package(
name: "Keychain",
platforms: [
.macOS(.v14),
.iOS(.v16)
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
@@ -17,8 +18,8 @@ let package = Package(
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(url: "https://github.com/OperatorFoundation/KeychainLinux.git", branch: "main"),
.package(url: "https://github.com/OperatorFoundation/KeychainTypes.git", branch: "main"),
.package(url: "https://github.com/OperatorFoundation/KeychainLinux", branch: "main"),
.package(url: "https://github.com/OperatorFoundation/KeychainTypes", branch: "main"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
38 changes: 19 additions & 19 deletions Tests/KeychainTests/KeychainTests.swift
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import XCTest
@testable import Keychain
//@testable import Keychain

final class KeychainTests: XCTestCase
{
func testSaveAndLoad()
{
let url = URL(fileURLWithPath: "keychain")
guard let keychain = Keychain(baseDirectory: url) else
{
XCTFail()
return
}
//final class KeychainTests: XCTestCase
//{
// func testSaveAndLoad()
// {
// let url = URL(fileURLWithPath: "keychain")
// guard let keychain = Keychain(baseDirectory: url) else
// {
// XCTFail()
// return
// }
//
// let key1 = keychain.generateAndSavePrivateKey(label: "test", type: KeyType.P256KeyAgreement)
// let key2 = keychain.retrieveOrGeneratePrivateKey(label: "test", type: KeyType.P256KeyAgreement)

let key1 = keychain.generateAndSavePrivateKey(label: "test", type: KeyType.P256KeyAgreement)
let key2 = keychain.retrieveOrGeneratePrivateKey(label: "test", type: KeyType.P256KeyAgreement)
// XCTAssertEqual(key1, key2) }

XCTAssertEqual(key1, key2) }

static var allTests = [
("testSaveAndLoad", testSaveAndLoad),
]
}
// static var allTests = [
// ("testSaveAndLoad", testSaveAndLoad),
// ]
//}

0 comments on commit fb54894

Please sign in to comment.