Skip to content

Commit f3d1863

Browse files
committed
A few more linter errors
1 parent 6af9437 commit f3d1863

File tree

5 files changed

+2
-17
lines changed

5 files changed

+2
-17
lines changed

acme/challenge.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ func tlsalpn01Validate(ctx context.Context, ch *Challenge, db DB, jwk *jose.JSON
162162
// [RFC5246] or higher when connecting to clients for validation.
163163
MinVersion: tls.VersionTLS12,
164164
ServerName: serverName(ch),
165-
InsecureSkipVerify: true, // nolint:gosec // we expect a self-signed challenge certificate
165+
InsecureSkipVerify: true, //nolint:gosec // we expect a self-signed challenge certificate
166166
}
167167

168168
hostPort := net.JoinHostPort(ch.Value, "443")

acme/common.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,9 @@ type MockProvisioner struct {
112112
MauthorizeOrderIdentifier func(ctx context.Context, identifier provisioner.ACMEIdentifier) error
113113
MauthorizeSign func(ctx context.Context, ott string) ([]provisioner.SignOption, error)
114114
MauthorizeRevoke func(ctx context.Context, token string) error
115-
<<<<<<< HEAD
116115
MisChallengeEnabled func(ctx context.Context, challenge provisioner.ACMEChallenge) bool
117116
MisAttFormatEnabled func(ctx context.Context, format provisioner.ACMEAttestationFormat) bool
118117
MgetAttestationRoots func() (*x509.CertPool, bool)
119-
=======
120-
MauthorizeChallenge func(Ctx context.Context, challenge string) error
121-
>>>>>>> 0f84b333 (Add acme property to enable challenges)
122118
MdefaultTLSCertDuration func() time.Duration
123119
MgetOptions func() *provisioner.Options
124120
}
@@ -155,7 +151,6 @@ func (m *MockProvisioner) AuthorizeRevoke(ctx context.Context, token string) err
155151
return m.Merr
156152
}
157153

158-
<<<<<<< HEAD
159154
// IsChallengeEnabled mock
160155
func (m *MockProvisioner) IsChallengeEnabled(ctx context.Context, challenge provisioner.ACMEChallenge) bool {
161156
if m.MisChallengeEnabled != nil {
@@ -177,14 +172,6 @@ func (m *MockProvisioner) GetAttestationRoots() (*x509.CertPool, bool) {
177172
return m.MgetAttestationRoots()
178173
}
179174
return m.Mret1.(*x509.CertPool), m.Mret1 != nil
180-
=======
181-
// AuthorizeChallenge mock
182-
func (m *MockProvisioner) AuthorizeChallenge(ctx context.Context, challenge string) error {
183-
if m.MauthorizeChallenge != nil {
184-
return m.MauthorizeChallenge(ctx, challenge)
185-
}
186-
return m.Merr
187-
>>>>>>> 0f84b333 (Add acme property to enable challenges)
188175
}
189176

190177
// DefaultTLSCertDuration mock

acme/order.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,6 @@ func numberOfIdentifierType(typ IdentifierType, ids []Identifier) int {
324324
// addresses or DNS names slice, depending on whether it can be parsed as an IP
325325
// or not. This might result in an additional SAN in the final certificate.
326326
func canonicalize(csr *x509.CertificateRequest) (canonicalized *x509.CertificateRequest) {
327-
328327
// for clarity only; we're operating on the same object by pointer
329328
canonicalized = csr
330329

authority/provisioner/acme.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ type ACMEIdentifier struct {
217217
// AuthorizeOrderIdentifier verifies the provisioner is allowed to issue a
218218
// certificate for an ACME Order Identifier.
219219
func (p *ACME) AuthorizeOrderIdentifier(ctx context.Context, identifier ACMEIdentifier) error {
220-
221220
x509Policy := p.ctl.getPolicy().getX509()
222221

223222
// identifier is allowed if no policy is configured

authority/provisioners.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ func (a *Authority) generateProvisionerConfig(ctx context.Context) (provisioner.
145145
AuthorizeRenewFunc: a.authorizeRenewFunc,
146146
AuthorizeSSHRenewFunc: a.authorizeSSHRenewFunc,
147147
}, nil
148-
149148
}
150149

151150
// StoreProvisioner stores a provisioner to the authority.
@@ -530,6 +529,7 @@ func durationsToLinkedca(d *provisioner.Duration) string {
530529
// certifictes claims type.
531530
func claimsToCertificates(c *linkedca.Claims) (*provisioner.Claims, error) {
532531
if c == nil {
532+
//nolint:nilnil // nil claims do not pose an issue.
533533
return nil, nil
534534
}
535535

0 commit comments

Comments
 (0)