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

Always return CSR as part of Resource #1593

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions certificate/certificates.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ func (c *Certifier) getForCSR(domains []string, order acme.ExtendedOrder, bundle
Domain: commonName,
CertURL: respOrder.Certificate,
PrivateKey: privateKeyPem,
CSR: csr,
}

if respOrder.Status == acme.StatusValid {
Expand Down
4 changes: 2 additions & 2 deletions e2e/challenges_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func TestChallengeHTTP_Client_Obtain(t *testing.T) {
assert.Regexp(t, `https://localhost:14000/certZ/[\w\d]{14,}`, resource.CertStableURL)
assert.NotEmpty(t, resource.Certificate)
assert.NotEmpty(t, resource.IssuerCertificate)
assert.Empty(t, resource.CSR)
assert.NotEmpty(t, resource.CSR)
}

func TestChallengeHTTP_Client_Registration_QueryRegistration(t *testing.T) {
Expand Down Expand Up @@ -307,7 +307,7 @@ func TestChallengeTLS_Client_Obtain(t *testing.T) {
assert.Regexp(t, `https://localhost:14000/certZ/[\w\d]{14,}`, resource.CertStableURL)
assert.NotEmpty(t, resource.Certificate)
assert.NotEmpty(t, resource.IssuerCertificate)
assert.Empty(t, resource.CSR)
assert.NotEmpty(t, resource.CSR)
}

func TestChallengeTLS_Client_ObtainForCSR(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion e2e/dnschallenge/dns_challenges_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func TestChallengeDNS_Client_Obtain(t *testing.T) {
assert.Regexp(t, `https://localhost:15000/certZ/[\w\d]{14,}`, resource.CertStableURL)
assert.NotEmpty(t, resource.Certificate)
assert.NotEmpty(t, resource.IssuerCertificate)
assert.Empty(t, resource.CSR)
assert.NotEmpty(t, resource.CSR)
}

type fakeUser struct {
Expand Down