From bccbd2dfe0689a4ceef038293a116c6e7345e34c Mon Sep 17 00:00:00 2001 From: Andrew Mitchell Date: Thu, 13 Feb 2025 20:59:15 -0500 Subject: [PATCH] Update repository to reflect required min go version of 1.20 Resolves #1414 --- .github/workflows/go.yml | 9 +++++---- Dockerfile.alpine | 2 +- README.md | 29 +++-------------------------- go.mod | 2 +- 4 files changed, 10 insertions(+), 32 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 491ad397f..33f3b3363 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -10,10 +10,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - # starting with go 1.24 the GODEBUG=x509sha1=1 flag has been removed. + # starting with go 1.24 the GODEBUG=x509sha1=1 flag has been removed. # many tests rely on sha1 certificates. After resolving #1413 we can - # run these on stable and old stable again. - go: ['1.23', '1.22'] + # run these on stable and oldstable again. Min version (1.20) can + # always be run. + go: ['1.23', '1.22', '1.20'] services: # Label used to access the service container postgres: @@ -76,7 +77,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: 1.18 + go-version: 1.20 - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 76bf0afac..590166780 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -1,4 +1,4 @@ -FROM golang:1.16.15-alpine3.15@sha256:9743f230f26d1e300545f0330fd4a514f554c535d967563ee77bf634906502b6 as builder +FROM golang:1.20-alpine AS builder WORKDIR /workdir COPY . /workdir diff --git a/README.md b/README.md index eedbf072b..8bd8e4502 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ CFSSL is CloudFlare's PKI/TLS swiss army knife. It is both a command line tool and an HTTP API server for signing, verifying, and bundling TLS -certificates. It requires Go 1.16+ to build. +certificates. It requires Go 1.20+ to build. Note that certain linux distributions have certain algorithms removed (RHEL-based distributions in particular), so the golang from the @@ -30,7 +30,7 @@ CFSSL consists of: ### Building Building cfssl requires a -[working Go 1.16+ installation](http://golang.org/doc/install). +[working Go 1.20+ installation](http://golang.org/doc/install). ``` $ git clone git@github.com:cloudflare/cfssl.git @@ -61,32 +61,9 @@ You can set the `GOOS` and `GOARCH` environment variables to have Go cross compi ### Installation -Installation requires a [working Go 1.16+ installation](http://golang.org/doc/install). +Installation requires a [working Go 1.20+ installation](http://golang.org/doc/install). Alternatively, [prebuilt binaries are available](https://github.com/cloudflare/cfssl/releases) -``` -$ go get github.com/cloudflare/cfssl/cmd/cfssl -``` - -will download, build, and install the CFSSL tool. - -To install any of the other utility programs that are -in this repo (for instance `cfssljson` in this case): - -``` -$ go get github.com/cloudflare/cfssl/cmd/cfssljson -``` - -This will download, build, and install the CFSSLJSON tool. - -And to simply install __all__ of the programs in this repo: - -``` -$ go get github.com/cloudflare/cfssl/cmd/... -``` - -if you are above go 1.18: - ``` $ go install github.com/cloudflare/cfssl/cmd/...@latest ``` diff --git a/go.mod b/go.mod index db76ddb5f..a7c8e3441 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/cloudflare/cfssl -go 1.18 +go 1.20 require ( bitbucket.org/liamstask/goose v0.0.0-20150115234039-8488cc47d90c