-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 840fd56
Showing
88 changed files
with
8,190 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# SPDX-License-Identifier: MIT | ||
# Copyright 2023, Jamf | ||
|
||
* @macblazer @JacobHearst @jamf/apple-natives-write |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# SPDX-License-Identifier: MIT | ||
# Copyright 2023, Jamf | ||
|
||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "swift" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# SPDX-License-Identifier: MIT | ||
# Copyright 2023, Jamf | ||
|
||
name: UnitTests | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
Test-on-macOS: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run macOS tests (including integration) | ||
run: swift test | ||
|
||
Test-on-all-others: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run iOS tests | ||
run: xcodebuild test -scheme Haversack-Package -destination 'platform=iOS Simulator,name=iPhone 14' | ||
- name: Run tvOS tests | ||
run: xcodebuild test -scheme Haversack-Package -destination 'platform=tvOS Simulator,name=Apple TV 4K (3rd generation)' | ||
- name: Run watchOS tests | ||
run: xcodebuild test -scheme Haversack-Package -destination 'platform=watchOS Simulator,name=Apple Watch Series 8 (41mm)' | ||
|
||
SwiftLint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: GitHub Action for SwiftLint | ||
uses: norio-nomura/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.DS_Store | ||
/.build | ||
/Packages | ||
/*.xcodeproj | ||
xcuserdata/ | ||
.scannerwork/ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
included: | ||
- Sources | ||
- Package.swift | ||
|
||
line_length: 200 | ||
file_length: | ||
warning: 500 | ||
ignore_comment_only_lines: true | ||
type_body_length: 300 | ||
|
||
file_header: | ||
severity: error | ||
required_pattern: | | ||
\/\/ SPDX-License-Identifier: MIT | ||
\/\/ Copyright 2023, Jamf | ||
opt_in_rules: | ||
- contains_over_filter_count | ||
- contains_over_filter_is_empty | ||
- contains_over_first_not_nil | ||
- contains_over_range_nil_comparison | ||
- discouraged_direct_init | ||
- discouraged_object_literal | ||
- empty_collection_literal | ||
- empty_count | ||
- empty_string | ||
- first_where | ||
- flatmap_over_map_reduce | ||
- last_where | ||
- strict_fileprivate | ||
- test_case_accessibility | ||
- file_header | ||
|
||
analyzer_rules: | ||
- unused_declaration | ||
- unused_import |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
.swiftpm/xcode/package.xcworkspace/xcshareddata/IDETemplateMacros.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>FILEHEADER</key> | ||
<string> SPDX-License-Identifier: MIT | ||
// Copyright 2023, Jamf</string> | ||
</dict> | ||
</plist> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [1.1.0] - 2023-09-14 | ||
### Added | ||
- Import and export capability for certificates, keys, and identities. | ||
- Additional documentation and examples. | ||
|
||
### Changed | ||
- First public release. | ||
|
||
## [1.0.0] - 2022-10-25 - internal Jamf release | ||
### Added | ||
- Async-await variants of all public functions that have completion handlers. | ||
|
||
### Changed | ||
- Queries now default to returning `.data` if not otherwise specified. | ||
- The result of the `save()` function and it's async-await counterpart are marked as discardable. The function returns the item that was given to it to save which is sometimes handy, but not necessary. | ||
|
||
### Fixed | ||
- Search queries that ask for password data for multiple password entities (generic or internet) now fail with a clear error message explaining the problem. | ||
- On iOS, fixed the `delete` function and the `save(..., updateExisting: true)` function (that calls `delete` behind the scenes). | ||
- When calling `save` with the `updateExisting:` parameter set to true, the code does not throw an `errSecDuplicatedItem` if the item being saved only has very basic information such as a `SecCertificate`. | ||
|
||
## [0.0.2] - 2021-11-03 - internal Jamf release | ||
### Added | ||
- Cryptographic key generation with a fluent interface in `KeyGenerationConfig`. | ||
- GitHub Actions are used to run unit tests on macOS, iOS, tvOS, and watchOS, and integration tests on macOS during Pull Requests. | ||
|
||
## [0.0.1] - 2021-09-08 - internal Jamf release | ||
### Added | ||
- Initial internal Jamf release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright 2023, Jamf | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"pins" : [ | ||
{ | ||
"identity" : "swift-collections", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-collections", | ||
"state" : { | ||
"revision" : "937e904258d22af6e447a0b72c0bc67583ef64a2", | ||
"version" : "1.0.4" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-docc-plugin", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-docc-plugin", | ||
"state" : { | ||
"revision" : "26ac5758409154cc448d7ab82389c520fa8a8247", | ||
"version" : "1.3.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-docc-symbolkit", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-docc-symbolkit", | ||
"state" : { | ||
"revision" : "b45d1f2ed151d057b54504d653e0da5552844e34", | ||
"version" : "1.0.0" | ||
} | ||
} | ||
], | ||
"version" : 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// swift-tools-version:5.6 | ||
// SPDX-License-Identifier: MIT | ||
// Copyright 2023, Jamf | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "Haversack", | ||
platforms: [ | ||
.macOS(.v10_13), | ||
.iOS(.v12), | ||
.tvOS(.v12), | ||
.watchOS(.v5) | ||
], | ||
products: [ | ||
.library(name: "Haversack", targets: ["Haversack"]), | ||
.library(name: "HaversackCryptoKit", targets: ["HaversackCryptoKit"]), | ||
.library(name: "HaversackMock", targets: ["HaversackMock"]) | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/apple/swift-collections", from: "1.0.4"), | ||
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.2.0") | ||
], | ||
targets: [ | ||
.target(name: "Haversack", dependencies: [ | ||
.product(name: "OrderedCollections", package: "swift-collections")]), | ||
.target(name: "HaversackCryptoKit", dependencies: ["Haversack"]), | ||
.target(name: "HaversackMock", dependencies: ["Haversack"]), | ||
.testTarget(name: "HaversackTests", dependencies: ["HaversackMock"], | ||
resources: [.copy("TestResources/")]) | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?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>NSPrivacyCollectedDataTypes</key> | ||
<array/> | ||
<key>NSPrivacyAccessedAPITypes</key> | ||
<array/> | ||
<key>NSPrivacyTrackingDomains</key> | ||
<array/> | ||
<key>NSPrivacyTracking</key> | ||
<false/> | ||
</dict> | ||
</plist> |
Oops, something went wrong.