2024-02-23 14:28:59 +01:00
|
|
|
def: server client
|
|
|
|
@
|
|
|
|
|
|
|
|
all: rm def
|
|
|
|
@
|
|
|
|
|
|
|
|
rm:
|
|
|
|
rm ./bin/* 2>/dev/null || true
|
|
|
|
|
2024-02-25 02:45:52 +01:00
|
|
|
server:
|
2024-02-23 14:28:59 +01:00
|
|
|
go build -o ./bin/$@ ./cmd/$@
|
|
|
|
|
2024-02-25 02:45:52 +01:00
|
|
|
client:
|
2024-02-23 14:28:59 +01:00
|
|
|
go build -o ./bin/$@ ./cmd/$@
|
|
|
|
|
2024-03-13 23:04:05 +01:00
|
|
|
testinp:
|
|
|
|
go build -o ./bin/$@ ./cmd/$@
|
|
|
|
|
2024-03-13 23:06:20 +01:00
|
|
|
ctui:
|
|
|
|
go build -o ./bin/$@ ./cmd/$@
|
|
|
|
|
2024-06-07 08:47:47 +02:00
|
|
|
cgui:
|
|
|
|
go build -o ./bin/$@ ./cmd/$@
|
|
|
|
|
2024-07-12 19:33:27 +02:00
|
|
|
cfyne:
|
2024-07-20 11:02:18 +02:00
|
|
|
go build -o ./bin/$@ ./cmd/$@
|
|
|
|
|
|
|
|
cfyne-win:
|
|
|
|
CGO_ENABLED=1 \
|
|
|
|
CC=x86_64-w64-mingw32-gcc \
|
|
|
|
CXX=x86_64-w64-mingw32-g++ \
|
|
|
|
GOOS=windows \
|
|
|
|
GOARCH=amd64 \
|
|
|
|
go build -v -o ./bin/$@ ./cmd/cfyne
|
|
|
|
|
2024-07-12 19:33:27 +02:00
|
|
|
|
2024-02-23 18:23:31 +01:00
|
|
|
gen_test_certs:
|
|
|
|
openssl ecparam -genkey -name prime256v1 -out server.key
|
|
|
|
openssl req -new -x509 -key server.key -out server.pem -days 3650
|
|
|
|
|
2024-02-23 14:28:59 +01:00
|
|
|
gen_certs:
|
|
|
|
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt -config san.cnf
|
|
|
|
#openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365
|
|
|
|
|
2024-02-23 15:32:08 +01:00
|
|
|
all: ca.crt server.crt client.crt
|
|
|
|
|
|
|
|
ca.key:
|
|
|
|
openssl genrsa -out ca.key 4096
|
|
|
|
|
|
|
|
ca.crt: ca.key
|
|
|
|
openssl req -new -x509 -days 365 -key ca.key -out ca.crt -subj "/C=US/ST=YourState/L=YourCity/O=YourOrganization/CN=YourCA"
|
|
|
|
|
|
|
|
server.key:
|
|
|
|
openssl genrsa -out server.key 4096
|
|
|
|
|
|
|
|
server.csr: server.key
|
|
|
|
openssl req -new -key server.key -out server.csr -subj "/C=US/ST=YourState/L=YourCity/O=YourOrganization/CN=server.yourdomain.com"
|
|
|
|
|
|
|
|
server.crt: server.csr ca.crt ca.key
|
|
|
|
openssl x509 -req -days 365 -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt
|
|
|
|
|
|
|
|
client.key:
|
|
|
|
openssl genrsa -out client.key 4096
|
|
|
|
|
|
|
|
client.csr: client.key
|
|
|
|
openssl req -new -key client.key -out client.csr -subj "/C=US/ST=YourState/L=YourCity/O=YourOrganization/CN=client.yourdomain.com"
|
|
|
|
|
|
|
|
client.crt: client.csr ca.crt ca.key
|
|
|
|
openssl x509 -req -days 365 -in client.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out client.crt
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f ca.key ca.crt server.key server.csr server.crt client.key client.csr client.crt
|
|
|
|
|