-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
70 lines (47 loc) · 1.4 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
GOARCH = amd64
UNAME = $(shell uname -s)
ifndef OS
ifeq ($(UNAME), Linux)
OS = linux
else ifeq ($(UNAME), Darwin)
OS = darwin
endif
endif
.DEFAULT_GOAL := all
all: fmt build start
build:
GOOS=$(OS) GOARCH="$(GOARCH)" go build -o bin/plugins/vaultplugin-hsmpki cmd/vaultplugin-hsmpki/main.go
start:
vault server -dev -dev-root-token-id=root -dev-plugin-dir=./bin/plugins -log-level=debug
clean:
rm -f ./bin/plugins/vaultplugin-hsmpki
#enable:
# vault secrets enable -path=hsmpki vaultplugin-hsmpki
fmt:
go fmt $$(go list ./...)
test: hsmconnection
hsmconnection:
go test -v -run TestConnectPkcs11Connection ./pkg/hsmpki
pathrolecreate:
go test -v -run TestPathRoleCreate ./pkg/hsmpki
pathsetsignedintermediate:
go test -v -run TestPathSetSignedIntermediate ./pkg/hsmpki
pathsetcrlconfig:
go test -v -run TestPathSetCRLConfig ./pkg/hsmpki
pathfetchcrl:
go test -v -run TestPathFetchCRL ./pkg/hsmpki
pathrevokecrl:
go test -v -run TestPathRevokeCRL ./pkg/hsmpki
pathrotatecrl:
go test -v -run TestPathRotateCRL ./pkg/hsmpki
pathtidycrl:
go test -v -run TestPathTidyCRL ./pkg/hsmpki
pathgenerateroot:
go test -v -run TestPathGenerateRoot ./pkg/hsmpki
pathgenerateintermediate:
go test -v -run TestPathGenerateIntermediate ./pkg/hsmpki
pathissue:
go test -v -run TestPathIssue ./pkg/hsmpki
pathdeleteroot:
go test -v -run TestPathDeleteRoot ./pkg/hsmpki
.PHONY: build clean fmt start enable