Custom private key#282
Merged
Merged
Conversation
aa451de to
8a254cd
Compare
Lukasa
reviewed
Dec 12, 2025
574eaa0 to
4d583ad
Compare
dnadoba
reviewed
Dec 12, 2025
Rename to CustomPrivateKey
Co-authored-by: Cory Benfield <cbenfield@apple.com>
Motivation: The new tests should be run Modifications: The new tests are missing the `@Test` macros Result: The new tests will have the `@Test` macros
Motivation: Code should be clean Modifications: Removed `@inlinable` from protocol definition Result: protocol will not have `@inlinable`
Motivation: Default implementation of signAsynchronously should be inlinable Modifications: adds `@inlinable` to default signAsynchronously implementation. Result: default signAsynchronously implementation will be `@inlinable`
Motivation: `signAsynchronously` should not it is not mandatory to implement Modifications: Updated documentation Result: `signAsynchronously` has better docs
9966a0c to
9b3c192
Compare
Lukasa
reviewed
Jan 19, 2026
Lukasa
left a comment
Contributor
There was a problem hiding this comment.
Just a couple of docs cleanups and then we can land this.
Based on `CustomCertificateStore` docs
Lukasa
approved these changes
Feb 6, 2026
auto-merge was automatically disabled
February 6, 2026 18:28
Head branch was pushed to by a user without write access
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation:
In some cases a developer may want to sign a certificate using a method other than a private key. For example: if a private key is protected by hardware which signs asynchronously.
Modifications:
CustomPrivateKeyprotocolasyncinitializers forCertificateandCertificateSigningRequest.CustomPrivateKeycan now back aCertificate.PrivateKeyCertificate.Signatureinitializer publicResult:
Developers can now sign a certificate with greater flexibility.
Alternatives Considered:
Implementations
Pass the
CustomPrivateKeyintoCertificateandCertificateSigningRequestinitializers directly.There is concern this could add too much duplication of api.
Various names for the protocol:
Certificate.PrivateKeyProtocolandCertificate.AsyncPrivateKeyProtocolCertificate.Signer/Certificate.AsyncSignerCertificate.SignatureProvider/Certificate.AsyncSignatureProvider