comparison doc/DTLS.testbed.txt @ 1231:8608085d7b0d default tip

Add notice about running the DTLS tests
author Sebastien Decugis <sdecugis@freediameter.net>
date Thu, 20 Jun 2013 11:11:28 +0800
parents
children
comparison
equal deleted inserted replaced
1230:992437a90bda 1231:8608085d7b0d
1 # Provide the path to your GnuTLS 3.x implementation
2 GNUTLS_3_INC_PATH=/home/thedoc/sources/gnutls-latest/lib/includes
3 GNUTLS_3_LIB_PATH=/home/thedoc/sources/gnutls-latest/lib/.libs/
4
5
6 # (re)create the folder for the binaries
7 rm -rf test.build
8 mkdir test.build
9 cd test.build
10
11 # Generate certificates for the test.
12 bash ../doc/single_host/make_certs.sh
13
14
15 # Configure freeDiameter to use specific GNU TLS version (adapt path)
16 cmake .. -DGNUTLS_INCLUDE_DIR:PATH=$GNUTLS_3_INC_PATH \
17 -DGNUTLS_LIBRARY:FILEPATH=$GNUTLS_3_LIB_PATH/libgnutls.so \
18 -DBUILD_TEST_APP:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Debug
19
20 # Build freeDiameter
21 make
22
23
24 # Create the configuration files for the DTLS test
25
26
27 ## freeDiameter.conf for the first peer
28 cat > freeDiameter-1.conf << EOF
29 Identity = "peer1.localdomain";
30 Realm = "localdomain";
31 Port=0;
32 No_TCP;
33 TLS_Cred = "peer1.cert.pem",
34 "peer1.key.pem";
35 TLS_CA = "cacert.pem";
36 LoadExtension="extensions/test_app.fdx":"test_app.conf";
37 ConnectPeer = "peer2.localdomain" { ConnectTo = "127.0.0.1"; port = 50658; };
38 EOF
39
40 ## test_app extension configuration
41 cat > test_app.conf << EOF
42 long-avp-id=12345;
43 long-avp-len=20000;
44 mixedsizes;
45 EOF
46
47 ## freeDiameter.conf for the second peer
48 cat > freeDiameter-2.conf << EOF
49 Identity = "peer2.localdomain";
50 Realm = "localdomain";
51 Port=0;
52 SecPort=50658;
53 No_TCP;
54 TLS_Cred = "peer2.cert.pem",
55 "peer2.key.pem";
56 TLS_CA = "cacert.pem";
57 LoadExtension="extensions/test_app.fdx":"test_app.conf";
58 ConnectPeer = "peer1.localdomain" { ConnectTo = "127.0.0.1"; port = 5658; };
59 EOF
60
61
62
63 # Run the two instances with these configuration files (in two different terminals):
64 ./freeDiameterd/freeDiameterd -c freeDiameter-1.conf
65 ./freeDiameterd/freeDiameterd -c freeDiameter-2.conf
66
67 # once both instances are running, they will connect and exchange a few DWR/DWA messages periodically.
68 # You can trigger additional exchanges by sending signal 10 to one of those instances.
69 # You can adjust the length of the payload exchanged by editing the "long-avp-len" parameter in file test_app.conf.
70 kill -10 `ps --no-heading -C freeDiameterd -o '%p'`
71
72
73 # You can activate the GNUTLS traces using:
74 ./freeDiameterd/freeDiameterd -c freeDiameter-1.conf --dbg_gnutls 8
75
76 # You can also activate the libfdcore/sctp_dtls.c traces using:
77 ./freeDiameterd/freeDiameterd -dd -c freeDiameter-1.conf --dbg_file sctp_dtls.c --dbg_gnutls 8
78 ./freeDiameterd/freeDiameterd -dd -c freeDiameter-2.conf --dbg_file sctp_dtls.c --dbg_gnutls 8
79
"Welcome to our mercurial repository"