Skip to content
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

Use swift-certificates to generate CSR #2

Merged

Conversation

florentmorin
Copy link
Contributor

X509 CSR generation has been replaced by swift-certificates implementation.

Some helpers have also been added.

New implementations:

extension AcmeSwift {

    public struct OrdersAPI {

        // Modified to use `swift-certificate` CSR format
        public func finalize(order: AcmeOrderInfo, withCsr: CertificateSigningRequest) async throws -> AcmeOrderInfo

        // Helper with ECDSA format
        public func finalizeWithEcdsa(order: AcmeOrderInfo, subject: String? = nil, domains: [String]) async throws -> (Certificate.PrivateKey, CertificateSigningRequest, AcmeOrderInfo)

        // Helper with RSA format
        public func finalizeWithRsa(order: AcmeOrderInfo, subject: String? = nil, domains: [String]) async throws -> (Certificate.PrivateKey, CertificateSigningRequest, AcmeOrderInfo)
    }
}

Resolves #1

@florentmorin florentmorin force-pushed the migrate-to-swift-certificates branch from 53012d8 to 43dd889 Compare September 10, 2023 15:49
@florentmorin florentmorin force-pushed the migrate-to-swift-certificates branch from 43dd889 to 252b656 Compare September 10, 2023 15:50
Copy link
Owner

@m-barthelemy m-barthelemy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a very nice contribution, really appreciate it!

@m-barthelemy m-barthelemy merged commit 6d36f86 into m-barthelemy:master Sep 24, 2023
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.

Use swift-certificates to generate CSR
2 participants