Skip to content

Tests fail with go1.19 #58

@anthonyfok

Description

@anthonyfok

Several tests fail with go1.19, but pass with go1.18:

$ go version
go version go1.19 linux/amd64
$ go test ./...
--- FAIL: TestGetKey (2.99s)
    gokey_test.go:161: keys with same invocation options do not match
FAIL
FAIL	github.com/cloudflare/gokey	3.153s
?   	github.com/cloudflare/gokey/cmd/gokey	[no test files]
--- FAIL: TestKnownKey (0.20s)
    keygen_test.go:129: generated RSA 2048 does not match the expected result
--- FAIL: TestStdKey (0.25s)
    keygen_test.go:149: mitigating crypto/internal/randutil.MaybeReadByte...
    keygen_test.go:149: mitigating crypto/internal/randutil.MaybeReadByte...
    keygen_test.go:194: RSA key generation algorithm from stdlib deviates from the one in gokey
FAIL
FAIL	github.com/cloudflare/gokey/rsa	0.454s
FAIL

See the Debian FTBFS (fail-to-build-from-source) bug at https://bugs.debian.org/1017300 where @lnussbaum routinely rebuilds packages with the latest tools and libraries, and in this case, go1.19. It probably has to do with changes made to go1.19 built-in crypto libraries, see https://go.dev/doc/go1.19#minor_library_changes

Many thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions