Skip to content

Commit

Permalink
Merge pull request #272 from mattfarina/bump-versions
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Farina <matt@mattfarina.com>
  • Loading branch information
mattfarina committed Dec 11, 2020
2 parents 39e4d5d + cbe818b commit 868e751
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.12.x, 1.13.x, 1.14.x]
go-version: [1.13.x, 1.14.x, 1.15.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
Expand Down
6 changes: 3 additions & 3 deletions crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"crypto/cipher"
"crypto/dsa"
"crypto/ecdsa"
"crypto/ed25519"
"crypto/elliptic"
"crypto/hmac"
"crypto/rand"
Expand Down Expand Up @@ -161,9 +162,8 @@ func generatePrivateKey(typ string) string {
case "ecdsa":
// again, good enough for government work
priv, err = ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
// TODO: uncomment once go1.12 support is dropped.
//case "ed25519":
// _, priv, err = ed25519.GenerateKey(rand.Reader)
case "ed25519":
_, priv, err = ed25519.GenerateKey(rand.Reader)
default:
return "Unknown type " + typ
}
Expand Down
20 changes: 9 additions & 11 deletions crypto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ var (
// are fast to generate.
fastCertKeyAlgos = []string{
"ecdsa",
// TODO: Uncomment once go1.12 support is dropped.
// "ed25519",
"ed25519",
}
)

Expand Down Expand Up @@ -144,15 +143,14 @@ func TestGenPrivateKey(t *testing.T) {
if !strings.Contains(out, "EC PRIVATE KEY") {
t.Error("Expected EC PRIVATE KEY")
}
// TODO: uncomment once go1.12 support is dropped
//tpl = `{{genPrivateKey "ed25519"}}`
//out, err = runRaw(tpl, nil)
//if err != nil {
// t.Error(err)
//}
//if !strings.Contains(out, "PRIVATE KEY") {
// t.Error("Expected PRIVATE KEY")
//}
tpl = `{{genPrivateKey "ed25519"}}`
out, err = runRaw(tpl, nil)
if err != nil {
t.Error(err)
}
if !strings.Contains(out, "PRIVATE KEY") {
t.Error("Expected PRIVATE KEY")
}
// test bad
tpl = `{{genPrivateKey "bad"}}`
out, err = runRaw(tpl, nil)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.13

require (
github.com/Masterminds/goutils v1.1.0
github.com/Masterminds/semver/v3 v3.1.0
github.com/Masterminds/semver/v3 v3.1.1
github.com/google/uuid v1.1.1
github.com/huandu/xstrings v1.3.1
github.com/imdario/mergo v0.3.8
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RP
github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
github.com/Masterminds/semver/v3 v3.1.0 h1:Y2lUDsFKVRSYGojLJ1yLxSXdMmMYTYls0rCvoqmMUQk=
github.com/Masterminds/semver/v3 v3.1.0/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
Expand Down
2 changes: 1 addition & 1 deletion network.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ import (

func getHostByName(name string) string {
addrs, _ := net.LookupHost(name)
//TODO: add error handing when release v3 cames out
//TODO: add error handing when release v3 comes out
return addrs[rand.Intn(len(addrs))]
}

0 comments on commit 868e751

Please sign in to comment.