Skip to content

Conversation

@Juice805
Copy link

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:

  • Create CustomPrivateKey protocol
  • Create async initializers for Certificate and CertificateSigningRequest.
  • CustomPrivateKey can now back aCertificate.PrivateKey
  • Make Certificate.Signature initializer public

Result:

Developers can now sign a certificate with greater flexibility.

Alternatives Considered:

Implementations

Pass the CustomPrivateKey into Certificate and CertificateSigningRequest initializers directly.

There is concern this could add too duplication of api.

Various names for the protocol:

  • Certificate.PrivateKeyProtocol and Certificate.AsyncPrivateKeyProtocol
  • Certificate.Signer/Certificate.AsyncSigner
  • Certificate.SignatureProvider/Certificate.AsyncSignatureProvider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant