terminate config reading on EOT/Ctl-D instead of just on pipe close
[vpnc.git] / test / README.txt
blob5445cdcf456840cb227863fb17e6acc9d62fa54b
1 2013-12-04: Antonio Borneo <borneo.antonio@gmail.com>
3 VPNC includes a wrapper around openssl and gnutls to
4 offer single set of crypto-API.
5 The program test-crypto.c is used to verify the API.
7 This folder "test" provides a chain of certificates
8 and an encrypted binary.
9 test-crypto.c verifies the certificate chain, decrypts
10 the binary and compare it against expected result.
11 See below for more details on how to use test-crypto.
13 openSSL is required to rebuild the test files.
14 To avoid the dependence from openSSL during SW compile,
15 all required files are distribuited together with the
16 VPNC source code.
18 The Makefile in this folder is able to rebuild all the
19 certificates and the binary.
20         make clean_all
21 to cleanup the folder and
22         make rebuild
23 to re-build everything from scratch.
24 Since both cryptographic keys and binary are generated
25 through random functions, results are not replicable
26 across executions. Use
27         make clean_build
28 if you want to cleanup the folder but keep either keys
29 and binary file.
31 Files in the folder:
32 - readme.txt:
33         This file.
34 - Makefile:
35         To rebuild all following file.
36 - ca1.key ca2.key ca3.key:
37         Pairs of private and public keys, used for
38         certificate authorities.
39 - ca1.pem ca2.pem ca3.pem:
40         Self signed certificate of the certificate
41         authorities.
42 - ca_list.pem:
43         Single file containing all the certificates
44         of the three CA above.
45 - cert0.key cert1.key cert2.key cert3.key:
46         Pairs of private and public keys, used for
47         certificates.
48 - cert0.pem cert1.pem cert2.pem cert3.pem:
49         Certificates derived from ".key" files above.
50         Certificates are signed in chain:
51                 ca3.pem -> cert0.pem -> cert1.pem ->
52                  -> cert2.pem -> cert3.pem
53         Self signed certificate "ca3.pem" signs the
54         certificate "cert0.pem", that in turn signs
55         "cert1.pem", and so on.
56 - dec_data.bin:
57         Binary random data. File size equal to private
58         key size "cert0.key" (256 byte = 2048 bit).
59 - sig_data.bin:
60         Data from "dec_data.bin" RSA encrypted through
61         private key in "cert0.pem".
62 - openssl.cnf:
63         Temporarily config file for openSSL flags that
64         cannot be passed through command line.
66 The program test-crypto.c requires at least 5 arguments:
67         test-crypto <sig> <dec> <ca> <cert1> <server>
68 - <sig> is the encrypted binary;
69 - <dec> is the reference binary before encryption;
70 - <ca>  is a list of CA certificates, one of them
71         signs <server>;
72 - <cert1> ... <server> is the chain of certificates.