-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[Collections] Signing (apple, 1): certificate and key types #3259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is part 1 of a series of PRs to support package collection signing on **non-Apple** platforms. Originally swiftlang#3238. Depends on swiftlang#3259
This is part 2 of a series of PRs to support package collection signing on **Apple** platforms. Originally swiftlang#3242. Depends on [part 1](swiftlang#3259) Modifications: - Add support for signing with EC and RSA keys - Add `Signature`, which is similar to JWS - Introduce `CertificatePolicy` protocol (more on this in part 3) - `PackageCollectionsSigning` - given a package collection, certificate and its private key, generate a "signed" collection; and reverse that process to validate collection signature.
This is part 2 of a series of PRs to support package collection signing on **Apple** platforms. Originally swiftlang#3242. Depends on [part 1](swiftlang#3259) Modifications: - Add support for signing with EC and RSA keys - Add `Signature`, which is similar to JWS - Introduce `CertificatePolicy` protocol (more on this in part 3) - `PackageCollectionsSigning` - given a package collection, certificate and its private key, generate a "signed" collection; and reverse that process to validate collection signature.
@@ -152,11 +152,16 @@ let package = Package( | |||
/** Package collections models */ | |||
name: "PackageCollectionsModel", | |||
dependencies: []), | |||
|
|||
.target( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sources/PackageCollectionsSigning/Certificate/Certificate.swift
Outdated
Show resolved
Hide resolved
Sources/PackageCollectionsSigning/Certificate/Certificate.swift
Outdated
Show resolved
Hide resolved
Sources/PackageCollectionsSigning/Certificate/Certificate.swift
Outdated
Show resolved
Hide resolved
|
||
//===----------------------------------------------------------------------===// | ||
// | ||
// This source file is part of the SwiftCrypto open source project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its unfortunate that we cannot use SwiftCrypto types here instead of re-defining them, is this something @Lukasa can help fix/expose in SwiftCrypto?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this time the answer is no: the ASN.1 code is changing rapidly. While I do want to build out Swift ASN.1 infrastructure, until we get something approaching complete coverage of ASN.1 there's essentially no guarantees on stability (indeed, I plan to break it soon).
In the short term copy-pasting is fine. Longer term when we resolve the ASN.1 issue we should be taking an item to remove these files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually they can be removed sooner than then: as soon as SwiftPM can drop support for Catalina we no longer need these.
This is part 1 of a series of PRs to support package collection signing on **non-Apple** platforms. Originally swiftlang#3238. Depends on swiftlang#3259
This is part 2 of a series of PRs to support package collection signing on **Apple** platforms. Originally swiftlang#3242. Depends on [part 1](swiftlang#3259) Modifications: - Add support for signing with EC and RSA keys - Add `Signature`, which is similar to JWS - Introduce `CertificatePolicy` protocol (more on this in part 3) - `PackageCollectionsSigning` - given a package collection, certificate and its private key, generate a "signed" collection; and reverse that process to validate collection signature.
This is part 2 of a series of PRs to support package collection signing on **Apple** platforms. Originally swiftlang#3242. Depends on [part 1](swiftlang#3259) Modifications: - Add support for signing with EC and RSA keys - Add `Signature`, which is similar to JWS - Introduce `CertificatePolicy` protocol (more on this in part 3) - `PackageCollectionsSigning` - given a package collection, certificate and its private key, generate a "signed" collection; and reverse that process to validate collection signature.
cc @catmurdoch |
This is part 1 of a series of PRs to support package collection signing on **Apple** platforms. Originally swiftlang#3238. Modifications: - New `PackageCollectionsSigning` module - Add `Certificate` type - Add EC and RSA key types
@swift-ci please smoke test |
This is part 2 of a series of PRs to support package collection signing on **Apple** platforms. Originally swiftlang#3242. Depends on [part 1](swiftlang#3259) Modifications: - Add support for signing with EC and RSA keys - Add `Signature`, which is similar to JWS - Introduce `CertificatePolicy` protocol (more on this in part 3) - `PackageCollectionsSigning` - given a package collection, certificate and its private key, generate a "signed" collection; and reverse that process to validate collection signature.
This is part 2 of a series of PRs to support package collection signing on **Apple** platforms. Originally #3242. Depends on [part 1](#3259) Modifications: - Add support for signing with EC and RSA keys - Add `Signature`, which is similar to JWS - Introduce `CertificatePolicy` protocol (more on this in part 3) - `PackageCollectionsSigning` - given a package collection, certificate and its private key, generate a "signed" collection; and reverse that process to validate collection signature.
This is part 1 of a series of PRs to support package collection signing on **all** platforms. Originally swiftlang#3238. Depends on swiftlang#3259
This is part 1 of a series of PRs to support package collection signing on **all** platforms. Originally swiftlang#3238. Depends on swiftlang#3259
This is part 1 of a series of PRs to support package collection signing on **all** platforms. Originally swiftlang#3238. Depends on swiftlang#3259
This is part 1 of a series of PRs to support package collection signing on **all** platforms. Originally swiftlang#3238. Depends on swiftlang#3259
This is part 1 of a series of PRs to support package collection signing on **all** platforms. Originally swiftlang#3238. Depends on swiftlang#3259
This is part 1 of a series of PRs to support package collection signing on **all** platforms. Originally swiftlang#3238. Depends on swiftlang#3259
This is part 1 of a series of PRs to support package collection signing on **all** platforms. Originally swiftlang#3238. Depends on swiftlang#3259
This is part 1 of a series of PRs to support package collection signing on **all** platforms. Originally swiftlang#3238. Depends on swiftlang#3259
This is part 1 of a series of PRs to support package collection signing on **all** platforms. Originally swiftlang#3238. Depends on swiftlang#3259
This is part 1 of a series of PRs to support package collection signing on **all** platforms. Originally swiftlang#3238. Depends on swiftlang#3259
This is part 1 of a series of PRs to support package collection signing on **all** platforms. Originally swiftlang#3238. Depends on swiftlang#3259
This is part 1 of a series of PRs to support package collection signing on **all** platforms. Originally swiftlang#3238. Depends on swiftlang#3259
This is part 1 of a series of PRs to support package collection signing on **all** platforms. Originally swiftlang#3238. Depends on swiftlang#3259
This is part 1 of a series of PRs to support package collection signing on **all** platforms. Originally swiftlang#3238. Depends on swiftlang#3259
This is part 1 of a series of PRs to support package collection signing on **all** platforms. Originally swiftlang#3238. Depends on swiftlang#3259
This is part 1 of a series of PRs to support package collection signing on **all** platforms. Originally swiftlang#3238. Depends on swiftlang#3259
This is part 1 of a series of PRs to support package collection signing on **all** platforms. Originally swiftlang#3238. Depends on swiftlang#3259
This is part 1 of a series of PRs to support package collection signing on **all** platforms. Originally swiftlang#3238. Depends on swiftlang#3259
* [Collections] Signing (all, 1): certificate and key types This is part 1 of a series of PRs to support package collection signing on **all** platforms. Originally #3238. Depends on #3259 * [Collections] Signing (all, 2): signed collections This is part 2 of a series of PRs to support package collection signing on **all** platforms. Originally #3242. Depends on #3260, #3264 * [Collections] Signing (all, 3): certificate validations This is part 3 of a series of PRs to support package collection signing on **all** platforms. Originally #3245. Depends on #3265, #3269 * [Collections] Signing (all, 3.b): OCSP support for non-Apple platforms This is part 3.b of a series of PRs to support package collection signing on **all** platforms. Depends on #3270 Modifications: - Add `PackageCollectionsSigningLibc` module - Add OCSP support for non-Apple platforms through `PackageCollectionsSigningLibc` * Use shared callbackQueue and diagnosticsEngine in tests * Update platform check * Better OCSP error handling and cache OCSP results * Don't default to BoringSSL * OpenSSL license * fixup * Use ptr.count * Don't blindly drop X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION error * Add withUnsafeMutablePointer for accessing underlying X509 pointer * Fix leaks * Use withExtendedLifetime * OSCP response handling * Delete remove from cache call * OCSP should fail open * Verify OCSP response * Create new X509_STORE per invocation
This is part 1 of a series of PRs to support package collection signing on Apple platforms. Originally
#3238.
Modifications:
PackageCollectionsSigning
moduleCertificate
type