From eeae2f0b97230630edea51e955790be4f77e63df Mon Sep 17 00:00:00 2001 From: andig Date: Fri, 30 Sep 2022 20:40:22 +0200 Subject: [PATCH] chore: fix ASN1 patch --- .github/workflows/default.yml | 5 +---- Makefile | 9 ++------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index e3d1e2b7a..2012fd459 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -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 diff --git a/Makefile b/Makefile index 0deeab0f9..3ef3baed4 100644 --- a/Makefile +++ b/Makefile @@ -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