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

See notes ... #1232

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Lint GitHub Actions workflows
on:
push:
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: write
pull-requests: write

jobs:
actionlint:
uses: smallstep/workflows/.github/workflows/actionlint.yml@main
secrets: inherit
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,23 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

---

## [0.27.0] - 2024-07-11

### Changed

- Makefile: install to /usr/local/bin, not /usr/bin (smallstep/cli#1214)

### Fixed

- Set proper JOSE algorithm for Ed25519 keys (smallstep/cli#1208)
- Makefile: usage of install command line flags on MacOS (smallstep/cli#1212)
- Restore operation of '--bundle' flag in certificate inspect (smallstep/cli#1215)
- Fish completion (smallstep/cli#1222)
- Restore operation of inspect CSR from STDIN (smallstep/cli#1232)

### Security


## [0.26.2] - 2024-06-13

### Added
Expand Down
12 changes: 9 additions & 3 deletions command/certificate/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"github.com/pkg/errors"
"github.com/smallstep/certinfo"
"github.com/smallstep/cli/flags"
"github.com/smallstep/cli/utils"
zx509 "github.com/smallstep/zcrypto/x509"
"github.com/urfave/cli"
"go.step.sm/cli-utils/errs"
Expand Down Expand Up @@ -218,17 +219,22 @@
}
return inspectCertificates(ctx, peerCertificates[:1], os.Stdout)
default: // is not URL
b, err := utils.ReadFile(crtFile)
if err != nil {
return errors.Wrapf(err, "error reading file %s", crtFile)

Check warning on line 224 in command/certificate/inspect.go

View check run for this annotation

Codecov / codecov/patch

command/certificate/inspect.go#L222-L224

Added lines #L222 - L224 were not covered by tests
}

var pemError *pemutil.InvalidPEMError
crts, err := pemutil.ReadCertificateBundle(crtFile)
crts, err := pemutil.ParseCertificateBundle(b)

Check warning on line 228 in command/certificate/inspect.go

View check run for this annotation

Codecov / codecov/patch

command/certificate/inspect.go#L228

Added line #L228 was not covered by tests
switch {
case errors.As(err, &pemError) && pemError.Type == pemutil.PEMTypeCertificate:
csr, err := pemutil.ReadCertificateRequest(crtFile)
csr, err := pemutil.ParseCertificateRequest(b)

Check warning on line 231 in command/certificate/inspect.go

View check run for this annotation

Codecov / codecov/patch

command/certificate/inspect.go#L231

Added line #L231 was not covered by tests
if err != nil {
return errors.Errorf("file %s does not contain any valid CERTIFICATE or CERTIFICATE REQUEST blocks", crtFile)
}
return inspectCertificateRequest(ctx, csr, os.Stdout)
case err != nil:
return err
return fmt.Errorf("error parsing %s: %w", crtFile, err)

Check warning on line 237 in command/certificate/inspect.go

View check run for this annotation

Codecov / codecov/patch

command/certificate/inspect.go#L237

Added line #L237 was not covered by tests
default:
if bundle {
return inspectCertificates(ctx, crts, os.Stdout)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require (
github.com/urfave/cli v1.22.15
go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352
go.step.sm/cli-utils v0.9.0
go.step.sm/crypto v0.49.0
go.step.sm/crypto v0.50.0
go.step.sm/linkedca v0.22.1
golang.org/x/crypto v0.25.0
golang.org/x/sys v0.22.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,8 @@ go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y
go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=
go.step.sm/cli-utils v0.9.0 h1:55jYcsQbnArNqepZyAwcato6Zy2MoZDRkWW+jF+aPfQ=
go.step.sm/cli-utils v0.9.0/go.mod h1:Y/CRoWl1FVR9j+7PnAewufAwKmBOTzR6l9+7EYGAnp8=
go.step.sm/crypto v0.49.0 h1:J4qW5/ODYeHJFAM4PuNLSHKBMGWh4iwX6Tcrsp42r+U=
go.step.sm/crypto v0.49.0/go.mod h1:NCFMhLS6FJXQ9sD9PP282oHtsBWLrI6wXZY0eOkq7t8=
go.step.sm/crypto v0.50.0 h1:BqI9sEgocoHDLLHiZnFqdqXl5FjdMvOWKMm/fKL/lrw=
go.step.sm/crypto v0.50.0/go.mod h1:NCFMhLS6FJXQ9sD9PP282oHtsBWLrI6wXZY0eOkq7t8=
go.step.sm/linkedca v0.22.1 h1:GvprpH9P4Sv9U+eZ3bxDgRSSpW14cFDYpe1kS6yWLkw=
go.step.sm/linkedca v0.22.1/go.mod h1:dOKdF4HSn73YUEkfS5/FECngZmBtj2Il5DTKWXY4S6Y=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
Expand Down