-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
76 lines (53 loc) · 2.86 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
71
72
73
74
75
76
# The Make creates the self signed certificates using openssl.
server_certificate:client_certificate
@openssl genrsa -out server.key 2048
@echo --------------------------------------------------
@echo "Generating server Certificate"
@echo --------------------------------------------------
@openssl req -new -key server.key -out server.csr -subj "/C=US/ST=Illinois/L=Chicago/O=Sans Pareil Technologies, Inc./OU=OSS/CN=config-db/[email protected]/"
@openssl x509 -req -days 7300 -sha512 -extensions v3_req -CA ca.crt -CAkey ca.key -CAcreateserial -in server.csr -out server.crt
@make clean_temp
@echo --------------------------------------------------
@echo "Server Certificate generated Successfully"
@echo --------------------------------------------------
client_certificate:root_certificate
@openssl genrsa -out client.key 2048
@echo --------------------------------------------------
@echo "Generating client Certificate"
@echo --------------------------------------------------
@openssl req -new -key client.key -out client.csr -subj "/C=US/ST=Illinois/L=Chicago/O=Sans Pareil Technologies, Inc./OU=OSS/CN=config-db-client/[email protected]/"
@openssl x509 -req -days 7300 -sha512 -extensions v3_req -CA ca.crt -CAkey ca.key -CAcreateserial -in client.csr -out client.crt
@echo --------------------------------------------------
@echo "client Certificate generated Successfully"
@echo --------------------------------------------------
root_certificate:clean
@openssl genrsa -des3 -out ca.key 2048
@echo --------------------------------------------------
@echo "Generating root Certificate"
@echo --------------------------------------------------
@openssl req -new -key ca.key -out ca.csr -subj "/C=US/ST=Illinois/L=Chicago/O=Sans Pareil Technologies, Inc./OU=OSS/CN=sptci.com/[email protected]/"
@openssl x509 -req -days 7300 -sha512 -extensions v3_ca -signkey ca.key -in ca.csr -out ca.crt
@echo --------------------------------------------------
@echo "CA/root Certificate generated Successfully"
@echo --------------------------------------------------
clean:clean_temp
@echo --------------------------------------------------
@echo "Started cleaning of folders.... "
@echo --------------------------------------------------
@rm -rf root/
@rm -rf server/
@rm -rf client/
@echo --------------------------------------------------
@echo "Cleaning Completed. "
@echo --------------------------------------------------
clean_temp:
@echo --------------------------------------------------
@echo "Started cleaning of temp files.... "
@echo --------------------------------------------------
@rm -rf *.csr
#@rm -rf *.key
#@rm -rf *.crt
@rm -rf *.srl
@echo --------------------------------------------------
@echo "Cleaning Completed for temp Files. "
@echo --------------------------------------------------