Skip to content

Commit

Permalink
Fix usage of deprecated Sign() method
Browse files Browse the repository at this point in the history
  • Loading branch information
hslatman committed Mar 4, 2024
1 parent d6626c8 commit 6c8661f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions command/ca/health.go
@@ -1,6 +1,7 @@
package ca

import (
"context"
"fmt"
"os"

Expand Down Expand Up @@ -73,11 +74,11 @@ func healthAction(ctx *cli.Context) error {
var options []ca.ClientOption
options = append(options, ca.WithRootFile(root))

client, err := ca.NewClient(caURL, options...)
caClient, err := ca.NewClient(caURL, options...)

Check warning on line 77 in command/ca/health.go

View check run for this annotation

Codecov / codecov/patch

command/ca/health.go#L77

Added line #L77 was not covered by tests
if err != nil {
return err
}
r, err := client.Health()
r, err := caClient.HealthWithContext(context.Background())

Check warning on line 81 in command/ca/health.go

View check run for this annotation

Codecov / codecov/patch

command/ca/health.go#L81

Added line #L81 was not covered by tests
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion utils/cautils/offline.go
Expand Up @@ -202,7 +202,7 @@ func (c *OfflineCA) Sign(req *api.SignRequest) (*api.SignResponse, error) {
NotAfter: req.NotAfter,
TemplateData: req.TemplateData,
}
certChain, err := c.authority.Sign(req.CsrPEM.CertificateRequest, signOpts, opts...)
certChain, err := c.authority.SignWithContext(ctx, req.CsrPEM.CertificateRequest, signOpts, opts...)

Check warning on line 205 in utils/cautils/offline.go

View check run for this annotation

Codecov / codecov/patch

utils/cautils/offline.go#L205

Added line #L205 was not covered by tests
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 6c8661f

Please sign in to comment.