Skip to content

Commit 3563288

Browse files
committed
add other halg
Signed-off-by: sal rashid <salrashid123@gmail.com>
1 parent 9b98c75 commit 3563288

File tree

15 files changed

+426
-232
lines changed

15 files changed

+426
-232
lines changed

.github/workflows/release.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
permissions:
9+
contents: write # needed to write releases
10+
id-token: write # needed for keyless signing
11+
packages: write # needed for ghcr access
12+
attestations: write # needed for provenance
13+
14+
jobs:
15+
test:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check out code
19+
uses: actions/checkout@v4
20+
21+
- uses: actions/setup-go@v5
22+
with:
23+
go-version-file: 'go.mod'
24+
25+
- name: Run tests
26+
run: go test -v ./...
27+
28+
29+
release:
30+
runs-on: ubuntu-latest
31+
needs: test
32+
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
with:
37+
fetch-depth: 0
38+
- name: Set Versions
39+
uses: actions/github-script@v4
40+
id: set_version
41+
with:
42+
script: |
43+
const tag = context.ref.substring(10)
44+
const no_v = tag.replace('v', '')
45+
const dash_index = no_v.lastIndexOf('-')
46+
const no_dash = (dash_index > -1) ? no_v.substring(0, dash_index) : no_v
47+
core.setOutput('tag', tag)
48+
core.setOutput('no-v', no_v)
49+
core.setOutput('no-dash', no_dash)
50+
- name: Set up Go
51+
uses: actions/setup-go@v5
52+
53+
- name: Import GPG key
54+
uses: crazy-max/ghaction-import-gpg@v6
55+
with:
56+
gpg_private_key: ${{ secrets.GPG_SIGNING_KEY }}
57+
passphrase: ${{ secrets.PASSPHRASE }}
58+
git_user_signingkey: true
59+
git_commit_gpgsign: true
60+
- uses: sigstore/cosign-installer@v3.8.0 # installs cosign
61+
- uses: anchore/sbom-action/download-syft@v0.18.0 # installs syft
62+
- name: Run GoReleaser
63+
uses: goreleaser/goreleaser-action@v6
64+
with:
65+
version: '~> v2'
66+
args: release --clean
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
GPG_FINGERPRINT: ${{ secrets.GPG_FINGERPRINT }}

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@ For other references, see:
2222
* [golang-jwt for Trusted Platform Module TPM](https://github.com/salrashid123/golang-jwt-tpm)
2323
* [golang-jwt for Yubikey](https://github.com/salrashid123/golang-jwt-yubikey)
2424
* [golang-jwt for PKCS11](https://github.com/salrashid123/golang-jwt-pkcs11)
25-
* [golang-jwt for TPM](https://github.com/salrashid123/golang-jwt-tpm)
2625
* [crypto.Signer, implementations for Google Cloud KMS and Trusted Platform Modules](https://github.com/salrashid123/signer)
2726
* [go-tpm-tools Signer](https://pkg.go.dev/github.com/google/go-tpm-tools/client#Key.GetSigner)
2827

2928
### Supported Algorithms
3029

31-
* `RS256`
32-
* `PS256`
33-
* `ES256`
30+
* `RS256` `RS384` `RS512`
31+
32+
* `PS256` `PS384` `PS512`
33+
34+
* `ES256` `ES384` `ES512`
3435

3536
### Usage
3637

@@ -47,10 +48,10 @@ import (
4748
jwt "github.com/golang-jwt/jwt/v5"
4849
jwtsigner "github.com/salrashid123/golang-jwt-signer"
4950

50-
// salkms "github.com/salrashid123/signer/kms"
51-
// saltpm "github.com/salrashid123/signer/tpm"
52-
// "github.com/ThalesIgnite/crypto11"
53-
// salpkcs "github.com/salrashid123/mtls_pkcs11/signer/pkcs"
51+
// salkms "github.com/salrashid123/kms_golang_signer"
52+
// saltpm "github.com/salrashid123/tpmsigner"
53+
// "github.com/ThalesGroup/crypto11"
54+
// salpkcs "github.com/salrashid123/pkcssigner"
5455
)
5556

5657
var ()

example/certs/client_ec_385.key

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-----BEGIN EC PRIVATE KEY-----
2+
MIGkAgEBBDB9TlirDKMJOWDHu4zNafqfxwXSq6B8xrlSI4t8RRnx8dE4cX/PdNs1
3+
2/dvkjuslkugBwYFK4EEACKhZANiAASKdyDAQOnh8v9v8URsXgIeH1YQfl8rTH5u
4+
f8c63dH4Bz9XBu7EcjMVAWuj3y5ZkMQ4vwpkNfKWi2UDZX8n1qCFwvsMYsXe4wM/
5+
po6KScBALGs5vfWtC76Hf7LTxwmnyAM=
6+
-----END EC PRIVATE KEY-----

example/certs/client_ec_512.key

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-----BEGIN EC PRIVATE KEY-----
2+
MIHcAgEBBEIA+HJUKjgzIi+QnW5q98jDtpROFV3bq+MGcmbu3OAZKonB0+yePtc+
3+
zbdsbyBJR6zemaYCoqW/+7PEyz7h0yh/POWgBwYFK4EEACOhgYkDgYYABAAY9A1d
4+
UrQhhdCP4k/zdmOchQdJckZWtgY4xg5BNWNP7O2ewd9o1YovDW40f/9shwUoDUUo
5+
nlRpX5AymWFverXLKwCIJ1XC3DRIr7LU5UEi7P7i77RCbnh4z1t8fjmeEEQP2BJK
6+
jXRqnHef6adygkXba3DQZ2/gl9AObgaf6L3P+LXkPA==
7+
-----END EC PRIVATE KEY-----

example/ecc/main.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,8 @@ import (
99
"os"
1010
"time"
1111

12-
//"github.com/go-piv/piv-go/piv"
1312
jwt "github.com/golang-jwt/jwt/v5"
1413
jwtsigner "github.com/salrashid123/golang-jwt-signer"
15-
// salkms "github.com/salrashid123/signer/kms"
16-
// saltpm "github.com/salrashid123/signer/tpm"
17-
// "github.com/ThalesIgnite/crypto11"
18-
// salpkcs "github.com/salrashid123/mtls_pkcs11/signer/pkcs"
1914
)
2015

2116
var ()

example/go.mod

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
module main
22

3-
go 1.22
4-
5-
toolchain go1.22.2
3+
go 1.24.0
64

75
require (
8-
github.com/ThalesIgnite/crypto11 v1.2.5
6+
github.com/ThalesGroup/crypto11 v1.4.1
97
github.com/golang-jwt/jwt/v5 v5.2.1
108
github.com/google/go-tpm v0.9.1
119
github.com/google/go-tpm-tools v0.4.4
1210
github.com/salrashid123/golang-jwt-signer v0.0.0
13-
github.com/salrashid123/mtls_pkcs11/signer/pkcs v0.0.0-20240607212947-825eb0de11bc
14-
github.com/salrashid123/signer/kms v0.0.0-20240506142117-142e7dba6e3a
11+
github.com/salrashid123/kms_golang_signer v0.0.1
12+
github.com/salrashid123/pkcssigner v0.0.1
13+
1514
)
1615

1716
require (
18-
cloud.google.com/go/compute v1.25.1 // indirect
19-
cloud.google.com/go/compute/metadata v0.2.3 // indirect
20-
cloud.google.com/go/iam v1.1.7 // indirect
21-
cloud.google.com/go/kms v1.15.8 // indirect
17+
cloud.google.com/go v0.114.0 // indirect
18+
cloud.google.com/go/auth v0.5.1 // indirect
19+
cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect
20+
cloud.google.com/go/compute/metadata v0.3.0 // indirect
21+
cloud.google.com/go/iam v1.1.8 // indirect
22+
cloud.google.com/go/kms v1.17.1 // indirect
23+
cloud.google.com/go/longrunning v0.5.7 // indirect
2224
github.com/felixge/httpsnoop v1.0.4 // indirect
23-
github.com/go-logr/logr v1.4.1 // indirect
25+
github.com/go-logr/logr v1.4.2 // indirect
2426
github.com/go-logr/stdr v1.2.2 // indirect
2527
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
2628
github.com/golang/protobuf v1.5.4 // indirect
@@ -31,32 +33,31 @@ require (
3133
github.com/google/s2a-go v0.1.7 // indirect
3234
github.com/google/uuid v1.6.0 // indirect
3335
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
34-
github.com/googleapis/gax-go/v2 v2.12.3 // indirect
35-
github.com/miekg/pkcs11 v1.0.3-0.20190429190417-a667d056470f // indirect
36+
github.com/googleapis/gax-go/v2 v2.12.4 // indirect
37+
github.com/miekg/pkcs11 v1.1.1 // indirect
3638
github.com/pborman/uuid v1.2.1 // indirect
3739
github.com/pkg/errors v0.9.1 // indirect
3840
github.com/thales-e-security/pool v0.0.2 // indirect
3941
go.opencensus.io v0.24.0 // indirect
40-
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
41-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
42-
go.opentelemetry.io/otel v1.24.0 // indirect
43-
go.opentelemetry.io/otel/metric v1.24.0 // indirect
44-
go.opentelemetry.io/otel/trace v1.24.0 // indirect
42+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect
43+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect
44+
go.opentelemetry.io/otel v1.27.0 // indirect
45+
go.opentelemetry.io/otel/metric v1.27.0 // indirect
46+
go.opentelemetry.io/otel/trace v1.27.0 // indirect
4547
go.uber.org/multierr v1.11.0 // indirect
46-
golang.org/x/crypto v0.21.0 // indirect
47-
golang.org/x/net v0.23.0 // indirect
48-
golang.org/x/oauth2 v0.18.0 // indirect
49-
golang.org/x/sync v0.6.0 // indirect
50-
golang.org/x/sys v0.18.0 // indirect
51-
golang.org/x/text v0.14.0 // indirect
48+
golang.org/x/crypto v0.24.0 // indirect
49+
golang.org/x/net v0.26.0 // indirect
50+
golang.org/x/oauth2 v0.21.0 // indirect
51+
golang.org/x/sync v0.7.0 // indirect
52+
golang.org/x/sys v0.21.0 // indirect
53+
golang.org/x/text v0.16.0 // indirect
5254
golang.org/x/time v0.5.0 // indirect
53-
google.golang.org/api v0.172.0 // indirect
54-
google.golang.org/appengine v1.6.8 // indirect
55-
google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda // indirect
56-
google.golang.org/genproto/googleapis/api v0.0.0-20240401170217-c3f982113cda // indirect
57-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect
58-
google.golang.org/grpc v1.63.0 // indirect
59-
google.golang.org/protobuf v1.33.0 // indirect
55+
google.golang.org/api v0.183.0 // indirect
56+
google.golang.org/genproto v0.0.0-20240604185151-ef581f913117 // indirect
57+
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 // indirect
58+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect
59+
google.golang.org/grpc v1.64.0 // indirect
60+
google.golang.org/protobuf v1.34.1 // indirect
6061
)
6162

6263
replace github.com/salrashid123/golang-jwt-signer => ../

0 commit comments

Comments
 (0)