diff --git a/attestation/Makefile b/attestation/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..38ba13b5d859237bb8caa788d66df561b3c0e901 --- /dev/null +++ b/attestation/Makefile @@ -0,0 +1,9 @@ + +subdir = ras rac + +.PHONY: all build test clean install check +all build test clean install check: + for name in $(subdir); do \ + make -C $$name $@;\ + done + diff --git a/attestation/quick-scripts/prepare-build-env.sh b/attestation/quick-scripts/prepare-build-env.sh new file mode 100644 index 0000000000000000000000000000000000000000..6029d6f3a3f094df94d408407a4c5af207cc299a --- /dev/null +++ b/attestation/quick-scripts/prepare-build-env.sh @@ -0,0 +1,6 @@ +#/bin/sh + +sudo dnf install -y make golang +go env -w GOPROXY="https://goproxy.cn,direct" +go env -w GO111MODULE="on" +go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.41.1 diff --git a/attestation/rac/.golangci.yml b/attestation/rac/.golangci.yml new file mode 100644 index 0000000000000000000000000000000000000000..ac469f7ae7e84137a41f7f38877faaaed3ad33cd --- /dev/null +++ b/attestation/rac/.golangci.yml @@ -0,0 +1,3 @@ +linters-settings: + gocyclo: + min-complexity: 15 diff --git a/attestation/rac/Makefile b/attestation/rac/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..bba0f67d84c3a7d546dd88709cb625aec61cbcaf --- /dev/null +++ b/attestation/rac/Makefile @@ -0,0 +1,22 @@ + +all: build + +test: + @echo "to be completed" + +build: + go build -mod=vendor -o pkg/raagent raagent/*.go + go build -mod=vendor -o pkg/ractools ractools/*.go + go build -mod=vendor -o pkg/tbprovisioner tbprovisioner/*.go + go build -mod=vendor -o pkg/rahub rahub/*.go + +clean: + @rm -rf pkg + +install: + @echo "to be completed" + +check: + $(shell go env GOPATH)/bin/golangci-lint run -e gofmt -e gocyclo -e errorlint -e gosec + +.PHONY: all build test clean install check diff --git a/attestation/rac/go.mod b/attestation/rac/go.mod new file mode 100644 index 0000000000000000000000000000000000000000..5e82f0be1390688fa3d6000597e73d753ae1243a --- /dev/null +++ b/attestation/rac/go.mod @@ -0,0 +1,3 @@ +module gitee.com/openeuler/kunpengsecl/attestation/rac + +go 1.15 diff --git a/attestation/rac/raagent/main.go b/attestation/rac/raagent/main.go new file mode 100644 index 0000000000000000000000000000000000000000..ba1d22301a700c3f6c43bff5f1d6a2f916d2cabe --- /dev/null +++ b/attestation/rac/raagent/main.go @@ -0,0 +1,9 @@ +package main + +import ( + "fmt" +) + +func main() { + fmt.Println("hello, this is raagent!") +} diff --git a/attestation/rac/ractools/main.go b/attestation/rac/ractools/main.go new file mode 100644 index 0000000000000000000000000000000000000000..fb7eb80ebd125577c85fcd400c9c66ecf0e77ecb --- /dev/null +++ b/attestation/rac/ractools/main.go @@ -0,0 +1,9 @@ +package main + +import ( + "fmt" +) + +func main() { + fmt.Println("hello, this is ractools!") +} diff --git a/attestation/rac/rahub/main.go b/attestation/rac/rahub/main.go new file mode 100644 index 0000000000000000000000000000000000000000..40a0f0e59f74e42c3584c0535f4fdcee0d6eebea --- /dev/null +++ b/attestation/rac/rahub/main.go @@ -0,0 +1,9 @@ +package main + +import ( + "fmt" +) + +func main() { + fmt.Println("hello, this is rahub!") +} diff --git a/attestation/rac/tbprovisioner/main.go b/attestation/rac/tbprovisioner/main.go new file mode 100644 index 0000000000000000000000000000000000000000..654293169c76e359dceecb4696bc77f59127ace2 --- /dev/null +++ b/attestation/rac/tbprovisioner/main.go @@ -0,0 +1,9 @@ +package main + +import ( + "fmt" +) + +func main() { + fmt.Println("hello, this is tbprovisioner!") +} diff --git a/attestation/ras/.golangci.yml b/attestation/ras/.golangci.yml new file mode 100644 index 0000000000000000000000000000000000000000..ac469f7ae7e84137a41f7f38877faaaed3ad33cd --- /dev/null +++ b/attestation/ras/.golangci.yml @@ -0,0 +1,3 @@ +linters-settings: + gocyclo: + min-complexity: 15 diff --git a/attestation/ras/Makefile b/attestation/ras/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..93553766d07ff2aeb72fcde93070671c9b6592d5 --- /dev/null +++ b/attestation/ras/Makefile @@ -0,0 +1,19 @@ + +all: build + +test: + @echo "to be completed" + +build: + go build -mod=vendor -o pkg/ras cmd/ras/*.go + +clean: + @rm -rf pkg + +install: + @echo "to be completed" + +check: + $(shell go env GOPATH)/bin/golangci-lint run -E gofmt -E gocyclo -E errorlint -E gosec + +.PHONY: all build test clean install check diff --git a/attestation/ras/cache/cache.go b/attestation/ras/cache/cache.go new file mode 100644 index 0000000000000000000000000000000000000000..b337e488852895fcdc829a6f9ba00c3ce15d8b6d --- /dev/null +++ b/attestation/ras/cache/cache.go @@ -0,0 +1,7 @@ +package cache + +import "fmt" + +func Test() { + fmt.Println("hello, this is cache!") +} diff --git a/attestation/ras/clientapi/clientapi.go b/attestation/ras/clientapi/clientapi.go new file mode 100644 index 0000000000000000000000000000000000000000..6d6fab6ef491c9b9676291baa77e9cfc4c157ee8 --- /dev/null +++ b/attestation/ras/clientapi/clientapi.go @@ -0,0 +1,7 @@ +package clientapi + +import "fmt" + +func Test() { + fmt.Println("hello, this is clientapi!") +} diff --git a/attestation/ras/cmd/ras/main.go b/attestation/ras/cmd/ras/main.go new file mode 100644 index 0000000000000000000000000000000000000000..5854eb821d85d37e65055da667135920a463c86d --- /dev/null +++ b/attestation/ras/cmd/ras/main.go @@ -0,0 +1,23 @@ +package main + +import ( + "fmt" + "gitee.com/openeuler/kunpengsecl/attestation/ras/cache" + "gitee.com/openeuler/kunpengsecl/attestation/ras/clientapi" + "gitee.com/openeuler/kunpengsecl/attestation/ras/config" + "gitee.com/openeuler/kunpengsecl/attestation/ras/pca" + "gitee.com/openeuler/kunpengsecl/attestation/ras/restapi" + "gitee.com/openeuler/kunpengsecl/attestation/ras/trustmgr" + "gitee.com/openeuler/kunpengsecl/attestation/ras/verifier" +) + +func main() { + fmt.Println("hello, this is ras!") + cache.Test() + clientapi.Test() + config.Test() + pca.Test() + restapi.Test() + trustmgr.Test() + verifier.Test() +} diff --git a/attestation/ras/config/config.go b/attestation/ras/config/config.go new file mode 100644 index 0000000000000000000000000000000000000000..76d6c88e2ba394128355aaab9db7a37771f26689 --- /dev/null +++ b/attestation/ras/config/config.go @@ -0,0 +1,7 @@ +package config + +import "fmt" + +func Test() { + fmt.Println("hello, this is config!") +} diff --git a/attestation/ras/go.mod b/attestation/ras/go.mod new file mode 100644 index 0000000000000000000000000000000000000000..f4ead823c10d814f163db38676b63007b7516229 --- /dev/null +++ b/attestation/ras/go.mod @@ -0,0 +1,3 @@ +module gitee.com/openeuler/kunpengsecl/attestation/ras + +go 1.15 diff --git a/attestation/ras/go.sum b/attestation/ras/go.sum new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/attestation/ras/pca/pca.go b/attestation/ras/pca/pca.go new file mode 100644 index 0000000000000000000000000000000000000000..29195aedd136c3398a12ee1cb7d110cc8ff78a73 --- /dev/null +++ b/attestation/ras/pca/pca.go @@ -0,0 +1,7 @@ +package pca + +import "fmt" + +func Test() { + fmt.Println("hello, this is pca!") +} diff --git a/attestation/ras/restapi/restapi.go b/attestation/ras/restapi/restapi.go new file mode 100644 index 0000000000000000000000000000000000000000..39784b679fd117da5c4fc64e9c47ed59892babd6 --- /dev/null +++ b/attestation/ras/restapi/restapi.go @@ -0,0 +1,7 @@ +package restapi + +import "fmt" + +func Test() { + fmt.Println("hello, this is restapi!") +} diff --git a/attestation/ras/trustmgr/trustmgr.go b/attestation/ras/trustmgr/trustmgr.go new file mode 100644 index 0000000000000000000000000000000000000000..6cf5041bb6fd70852f2feac139a0c61acf3968cc --- /dev/null +++ b/attestation/ras/trustmgr/trustmgr.go @@ -0,0 +1,7 @@ +package trustmgr + +import "fmt" + +func Test() { + fmt.Println("hello, this is trustmgr!") +} diff --git a/attestation/ras/verifier/verifier.go b/attestation/ras/verifier/verifier.go new file mode 100644 index 0000000000000000000000000000000000000000..2ba3a7e17edfec168fee15e8697f5d9d6719d450 --- /dev/null +++ b/attestation/ras/verifier/verifier.go @@ -0,0 +1,7 @@ +package verifier + +import "fmt" + +func Test() { + fmt.Println("hello, this is verifier!") +}