diff options
Diffstat (limited to 'src/regress/lib/libssl/interop/Makefile.inc')
| -rw-r--r-- | src/regress/lib/libssl/interop/Makefile.inc | 91 |
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 | |||
| 5 | SRCS_client = client.c util.c | ||
| 6 | SRCS_server = server.c util.c | ||
| 7 | WARNINGS = yes | ||
| 8 | CLEANFILES += *.out *.fstat | ||
| 9 | |||
| 10 | .for p in ${PROGS} | ||
| 11 | ldd-$p.out: $p | ||
| 12 | # programs must be linked with correct libraries | ||
| 13 | LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ldd $p >$@ | ||
| 14 | .endfor | ||
| 15 | |||
| 16 | client-self.out server-self.out: run-self-client-server | ||
| 17 | |||
| 18 | run-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 | |||
| 38 | CLEANFILES += 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 | |||
| 44 | 127.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 | |||
| 49 | ca.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 | |||
| 54 | client.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 | |||
| 59 | client.crt server.crt: ca.crt ${@:R}.req | ||
| 60 | openssl x509 -CAcreateserial -CAkey ca.key -CA ca.crt \ | ||
| 61 | -req -in ${@:R}.req -out $@ | ||
| 62 | |||
| 63 | dh.param: | ||
| 64 | openssl dhparam -out $@ 1024 | ||
| 65 | |||
| 66 | dsa.key: | ||
| 67 | openssl dsaparam -genkey -out $@ 2048 | ||
| 68 | |||
| 69 | ec.key: | ||
| 70 | openssl ecparam -genkey -name secp256r1 -out $@ | ||
| 71 | |||
| 72 | gost.key: | ||
| 73 | openssl genpkey -algorithm gost2001 \ | ||
| 74 | -pkeyopt paramset:A -pkeyopt dgst:md_gost94 -out $@ | ||
| 75 | |||
| 76 | rsa.key: | ||
| 77 | openssl genrsa -out $@ 2048 | ||
| 78 | |||
| 79 | dsa.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 | |||
| 84 | gost.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 | |||
| 89 | dsa.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 $@ | ||
