Skip to content

Commit 497dc71

Browse files
committed
fixed
1 parent 606842d commit 497dc71

2 files changed

Lines changed: 7 additions & 22 deletions

File tree

.github/workflows/test.yml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
fail-fast: false
18-
matrix:
19-
goVer: ['1.21', '1.24']
2018

2119
steps:
2220
- name: Checkout
@@ -30,33 +28,20 @@ jobs:
3028
- name: Set up Go
3129
uses: actions/setup-go@v4
3230
with:
33-
go-version: ${{ matrix.goVer }}
31+
go-version: 1.21
3432

3533
- name: Go mod tidy
3634
run: go mod tidy
3735

38-
- name: Test with Coverage
39-
if: ${{ matrix.goVer == '1.24' }}
40-
run: go test -coverpkg=./... -v -short -race -coverprofile=cover.out -covermode=atomic ./...
41-
env:
42-
GODEBUG: x509sha1=1
36+
- name: Unit tests
37+
run: go test -short -covermode=atomic -coverprofile=cover.out ./...
38+
39+
- name: Test Generic
40+
run: go test -short -tags=purego -covermode=atomic ./...
4341

4442
- name: Upload coverage reports to Codecov
45-
if: ${{ matrix.goVer == '1.24' }}
4643
uses: codecov/codecov-action@v3
4744
env:
4845
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4946
with:
5047
files: cover.out
51-
52-
- name: Test only
53-
if: ${{ matrix.goVer != '1.24' }}
54-
run: go test -short ./...
55-
env:
56-
GODEBUG: x509sha1=1
57-
58-
- name: Test Generic only
59-
if: ${{ matrix.goVer != '1.24' }}
60-
run: go test -short -tags purego ./...
61-
env:
62-
GODEBUG: x509sha1=1

x509/csr_enveloped_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func Test_ParseEnvelopedPrivateKey(t *testing.T) {
8585
}
8686

8787
invalidOID, _ := hex.DecodeString("3081ef300c06082a811ccf55016802050030780220760c5d4eb80f7ec4bb12026586e4badcd41c293b416618575894d9278214aa6c02203fea869801f94f1cf3839e9b666482703c86cef160af8a540daf9c6b9adff5b20420685f05616055daf4948e44d76c366b16745f7a487614c0542d16871baa34be8704104abfcab6cea65caf2c130b222ebe519903420004944a5887f6fad9808516755e81c62f41566dab0f56ca55ad7909880acc051ce157694b11557eba725291166508868e6988c596a30472bef32e03a3dcef6866270321003ec6b59fece00ca37336c12f6d529aa84be07597e315eda1b7b58b0bef2fead9")
88-
if _, err := x509.ParseSM2EnvelopedPrivateKey(sm2Key, invalidOID); err.Error() != "pkcs/cipher: invalid iv parameters" {
88+
if _, err := x509.ParseSM2EnvelopedPrivateKey(sm2Key, invalidOID); err.Error() != "go-cryptobin/pkcs: invalid iv parameters" {
8989
t.Errorf("expected invalid oid error, got %s", err)
9090
}
9191

0 commit comments

Comments
 (0)