summaryrefslogtreecommitdiff
path: root/src/regress/lib/libssl/interop/Makefile.inc
diff options
context:
space:
mode:
authorcvs2svn <admin@example.com>2019-11-19 19:57:05 +0000
committercvs2svn <admin@example.com>2019-11-19 19:57:05 +0000
commite9f9eb6198f1757b7c0dfef043fadf1fa8243022 (patch)
treeb5a648f6ccaf6c1cd9915ddb45503d1fccfeba0e /src/regress/lib/libssl/interop/Makefile.inc
parentab72e3a6f7e8d5c71bbba034410468781d5923b6 (diff)
downloadopenbsd-bluhm_20191119.tar.gz
openbsd-bluhm_20191119.tar.bz2
openbsd-bluhm_20191119.zip
This commit was manufactured by cvs2git to create tag 'bluhm_20191119'.bluhm_20191119
Diffstat (limited to 'src/regress/lib/libssl/interop/Makefile.inc')
-rw-r--r--src/regress/lib/libssl/interop/Makefile.inc91
1 files changed, 0 insertions, 91 deletions
diff --git a/src/regress/lib/libssl/interop/Makefile.inc b/src/regress/lib/libssl/interop/Makefile.inc
deleted file mode 100644
index dfe1424949..0000000000
--- a/src/regress/lib/libssl/interop/Makefile.inc
+++ /dev/null
@@ -1,91 +0,0 @@
1# $OpenBSD: Makefile.inc,v 1.6 2019/02/21 23:06:33 bluhm Exp $
2
3.PATH: ${.CURDIR}/..
4
5SRCS_client = client.c util.c
6SRCS_server = server.c util.c
7WARNINGS = yes
8CLEANFILES += *.out *.fstat
9
10.for p in ${PROGS}
11ldd-$p.out: $p
12 # programs must be linked with correct libraries
13 LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ldd $p >$@
14.endfor
15
16client-self.out server-self.out: run-self-client-server
17
18run-self-client-server: client server 127.0.0.1.crt
19 @echo '\n======== $@ ========'
20 # check that tls client and server work together
21 LD_LIBRARY_PATH=${LD_LIBRARY_PATH} \
22 ./server >server-self.out \
23 127.0.0.1 0
24 LD_LIBRARY_PATH=${LD_LIBRARY_PATH} \
25 ./client >client-self.out \
26 `sed -n 's/listen sock: //p' server-self.out`
27 # check that the client run successfully to the end
28 grep -q '^success$$' client-self.out
29 # client must have read server greeting
30 grep -q '^<<< greeting$$' client-self.out
31 # check that the server child run successfully to the end
32 grep -q '^success$$' server-self.out
33 # server must have read client hello
34 grep -q '^<<< hello$$' server-self.out
35
36# create certificates for TLS
37
38CLEANFILES += 127.0.0.1.{crt,key} \
39 ca.{crt,key,srl} fake-ca.{crt,key} \
40 {client,server}.{req,crt,key} \
41 {dsa,ec,gost,rsa}.{key,req,crt} \
42 dh.param
43
44127.0.0.1.crt:
45 openssl req -batch -new \
46 -subj /L=OpenBSD/O=tls-regress/OU=server/CN=127.0.0.1/ \
47 -nodes -newkey rsa -keyout 127.0.0.1.key -x509 -out $@
48
49ca.crt fake-ca.crt:
50 openssl req -batch -new \
51 -subj /L=OpenBSD/O=tls-regress/OU=ca/CN=root/ \
52 -nodes -newkey rsa -keyout ${@:R}.key -x509 -out $@
53
54client.req server.req:
55 openssl req -batch -new \
56 -subj /L=OpenBSD/O=tls-regress/OU=${@:R}/CN=localhost/ \
57 -nodes -newkey rsa -keyout ${@:R}.key -out $@
58
59client.crt server.crt: ca.crt ${@:R}.req
60 openssl x509 -CAcreateserial -CAkey ca.key -CA ca.crt \
61 -req -in ${@:R}.req -out $@
62
63dh.param:
64 openssl dhparam -out $@ 1024
65
66dsa.key:
67 openssl dsaparam -genkey -out $@ 2048
68
69ec.key:
70 openssl ecparam -genkey -name secp256r1 -out $@
71
72gost.key:
73 openssl genpkey -algorithm gost2001 \
74 -pkeyopt paramset:A -pkeyopt dgst:md_gost94 -out $@
75
76rsa.key:
77 openssl genrsa -out $@ 2048
78
79dsa.req ec.req rsa.req: ${@:R}.key
80 openssl req -batch -new \
81 -subj /L=OpenBSD/O=tls-regress/OU=${@:R}/CN=localhost/ \
82 -nodes -key ${@:R}.key -out $@
83
84gost.req: ${@:R}.key
85 openssl req -batch -new -md_gost94 \
86 -subj /L=OpenBSD/O=tls-regress/OU=${@:R}/CN=localhost/ \
87 -nodes -key ${@:R}.key -out $@
88
89dsa.crt ec.crt gost.crt rsa.crt: ca.crt ${@:R}.req
90 openssl x509 -CAcreateserial -CAkey ca.key -CA ca.crt \
91 -req -in ${@:R}.req -out $@