chore: add patch check
This commit is contained in:
parent
78156fcbb3
commit
f9bb02155d
1 changed files with 9 additions and 0 deletions
9
main.go
9
main.go
|
|
@ -2,6 +2,7 @@ package main
|
|||
|
||||
import (
|
||||
"embed"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/fs"
|
||||
"log"
|
||||
|
|
@ -9,6 +10,7 @@ import (
|
|||
"github.com/evcc-io/evcc/cmd"
|
||||
"github.com/evcc-io/evcc/server"
|
||||
_ "github.com/evcc-io/evcc/util/goversion" // require minimum go version
|
||||
"golang.org/x/crypto/cryptobyte"
|
||||
)
|
||||
|
||||
//go:embed dist
|
||||
|
|
@ -30,5 +32,12 @@ func main() {
|
|||
// see https://github.com/golang/oauth2/issues/487
|
||||
log.SetOutput(io.Discard)
|
||||
|
||||
// Test if go is patched for accepting the buggy Elli certificate
|
||||
var res bool
|
||||
b := cryptobyte.String([]byte{0x01, 0x01, 0x01})
|
||||
if ok := b.ReadASN1Boolean(&res); !ok || !res {
|
||||
panic(fmt.Sprintf("Crypto patch missing. Run `make patch-asn1` before compiling. Debug: %v/%v (want: true/true).", ok, res))
|
||||
}
|
||||
|
||||
cmd.Execute()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue