Skip to content

Commit

Permalink
Fixes to ensure go updates work
Browse files Browse the repository at this point in the history
- Move from using 'github.com/pavel-v-chernykh/keystore-go' to using 'github.com/pavlo-v-chernykh/keystore-go'
- Remove accidental usage of 'github.com/pavel-v-chernykh/keystore-go/v2'
- Update go to 1.18
- Update all dependencies

Signed-off-by: Daniel Mikusa <[email protected]>
  • Loading branch information
Daniel Mikusa committed Aug 10, 2022
1 parent 35fb403 commit b1989da
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 121 deletions.
2 changes: 1 addition & 1 deletion certificate_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"time"

"github.com/paketo-buildpacks/libpak/sherpa"
"github.com/pavel-v-chernykh/keystore-go/v4"
"github.com/pavlo-v-chernykh/keystore-go/v4"
"golang.org/x/sys/unix"
)

Expand Down
2 changes: 1 addition & 1 deletion certificate_loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"testing"

. "github.com/onsi/gomega"
"github.com/pavel-v-chernykh/keystore-go/v4"
"github.com/pavlo-v-chernykh/keystore-go/v4"
"github.com/sclevine/spec"

"github.com/paketo-buildpacks/libjvm"
Expand Down
16 changes: 7 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/paketo-buildpacks/libjvm

go 1.17
go 1.18

require (
github.com/Masterminds/semver/v3 v3.1.1
Expand All @@ -11,15 +11,14 @@ require (
github.com/miekg/dns v1.1.50
github.com/onsi/gomega v1.20.0
github.com/paketo-buildpacks/libpak v1.61.0
github.com/pavel-v-chernykh/keystore-go v2.1.0+incompatible
github.com/pavel-v-chernykh/keystore-go/v4 v4.3.0
github.com/pavlo-v-chernykh/keystore-go/v4 v4.4.0
github.com/sclevine/spec v1.4.0
github.com/stretchr/testify v1.8.0
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150
golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664
)

require (
github.com/BurntSushi/toml v1.1.0 // indirect
github.com/BurntSushi/toml v1.2.0 // indirect
github.com/creack/pty v1.1.18 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/google/go-cmp v0.5.8 // indirect
Expand All @@ -32,10 +31,9 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.4.0 // indirect
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
golang.org/x/mod v0.4.2 // indirect
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.0.0-20220809184613-07c6da5e1ced // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
golang.org/x/tools v0.1.12 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
115 changes: 13 additions & 102 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion helper/openssl_certificate_loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

. "github.com/onsi/gomega"
"github.com/paketo-buildpacks/libpak/bard"
"github.com/pavel-v-chernykh/keystore-go/v4"
"github.com/pavlo-v-chernykh/keystore-go/v4"
"github.com/sclevine/spec"

"github.com/paketo-buildpacks/libjvm"
Expand Down
2 changes: 1 addition & 1 deletion jdk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
. "github.com/onsi/gomega"
"github.com/paketo-buildpacks/libpak"
"github.com/paketo-buildpacks/libpak/bard"
"github.com/pavel-v-chernykh/keystore-go/v4"
"github.com/pavlo-v-chernykh/keystore-go/v4"
"github.com/sclevine/spec"

"github.com/paketo-buildpacks/libjvm"
Expand Down
2 changes: 1 addition & 1 deletion jre_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
. "github.com/onsi/gomega"
"github.com/paketo-buildpacks/libpak"
"github.com/paketo-buildpacks/libpak/bard"
"github.com/pavel-v-chernykh/keystore-go/v4"
"github.com/pavlo-v-chernykh/keystore-go/v4"
"github.com/sclevine/spec"

"github.com/paketo-buildpacks/libjvm"
Expand Down
12 changes: 7 additions & 5 deletions nik_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"github.com/paketo-buildpacks/libpak/bard"
"github.com/paketo-buildpacks/libpak/effect"
"github.com/paketo-buildpacks/libpak/effect/mocks"
"github.com/pavel-v-chernykh/keystore-go"
"github.com/pavlo-v-chernykh/keystore-go/v4"
"github.com/sclevine/spec"
"github.com/stretchr/testify/mock"
)
Expand Down Expand Up @@ -149,10 +149,11 @@ func testNIK(t *testing.T, context spec.G, it spec.S) {
Expect(err).NotTo(HaveOccurred())
defer in.Close()

ks, err := keystore.Decode(in, []byte("changeit"))
ks := keystore.New()
err = ks.Load(in, []byte("changeit"))
Expect(err).NotTo(HaveOccurred())

Expect(ks).To(HaveLen(3))
Expect(ks.Aliases()).To(HaveLen(3))
})

it("updates after Java 9 certificates", func() {
Expand All @@ -179,10 +180,11 @@ func testNIK(t *testing.T, context spec.G, it spec.S) {
Expect(err).NotTo(HaveOccurred())
defer in.Close()

ks, err := keystore.Decode(in, []byte("changeit"))
ks := keystore.New()
err = ks.Load(in, []byte("changeit"))
Expect(err).NotTo(HaveOccurred())

Expect(ks).To(HaveLen(3))
Expect(ks.Aliases()).To(HaveLen(3))
})

}

0 comments on commit b1989da

Please sign in to comment.