chore: fix ASN1 patch

This commit is contained in:
andig 2022-09-30 20:40:22 +02:00
parent 3b03621123
commit eeae2f0b97
2 changed files with 3 additions and 11 deletions

View file

@ -30,9 +30,6 @@ jobs:
- name: Porcelain
run: make porcelain
- name: Patch ASN1
run: sudo make patch-asn1
build:
name: Build
runs-on: ubuntu-latest
@ -47,7 +44,7 @@ jobs:
id: go
- name: Patch ASN1
run: sudo make patch-asn1
run: make patch-asn1
- name: Build
run: make build

View file

@ -29,12 +29,6 @@ IMAGE_OPTIONS := -hostname evcc -http_port 8080 github.com/gokrazy/serial-busybo
# deb
PACKAGES = ./release
# patch asn1.go
CURRENT_DIR := $(shell pwd)
GO_ROOT := $(shell go env GOROOT)
ASN1_PATH := $(GO_ROOT)/src/vendor/golang.org/x/crypto/cryptobyte
ASN1_FILE := $(ASN1_PATH)/asn1.go
default: build
all: clean install install-ui ui assets lint test-ui lint-ui test build
@ -138,4 +132,5 @@ soc:
# patch asn1.go to allow Elli buggy certificates to be accepted with EEBUS
patch-asn1:
test -e $(ASN1_FILE) && patch -N -t -d $(ASN1_PATH) -i $(CURRENT_DIR)/patch/asn1.diff || true
cat $$(go env GOROOT)/src/vendor/golang.org/x/crypto/cryptobyte/asn1.go | grep -C 1 "out = true"
patch -N -t -d $$(go env GOROOT)/src/vendor/golang.org/x/crypto/cryptobyte -i $$(pwd)/patch/asn1.diff