diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2010-10-29 12:43:28 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2010-10-29 12:43:28 +0000 |
commit | 38286be4353cbb76a6d1ead3ff3601b294d46c89 (patch) | |
tree | 2ebc4880b338cbf7a208ed4d2d768b3dbb7a7c4e | |
parent | 3c96ac35df35d267713bd89a0bc9cd8df99215bc (diff) | |
download | gnunet-38286be4353cbb76a6d1ead3ff3601b294d46c89.tar.gz gnunet-38286be4353cbb76a6d1ead3ff3601b294d46c89.zip |
quota compliance testing for https
-rw-r--r-- | src/transport/Makefile.am | 16 | ||||
-rw-r--r-- | src/transport/test_quota_compliance.c | 7 | ||||
-rw-r--r-- | src/transport/test_quota_compliance_https_peer1.conf | 114 | ||||
-rw-r--r-- | src/transport/test_quota_compliance_https_peer2.conf | 114 |
4 files changed, 246 insertions, 5 deletions
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index 067e882a2..fbda1c614 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am | |||
@@ -202,7 +202,8 @@ check_PROGRAMS = \ | |||
202 | $(HTTP_REL_TEST) \ | 202 | $(HTTP_REL_TEST) \ |
203 | $(HTTPS_REL_TEST) \ | 203 | $(HTTPS_REL_TEST) \ |
204 | test_quota_compliance_tcp \ | 204 | test_quota_compliance_tcp \ |
205 | test_quota_compliance_http | 205 | test_quota_compliance_http \ |
206 | test_quota_compliance_https | ||
206 | # TODO: add tests for nat, etc. | 207 | # TODO: add tests for nat, etc. |
207 | 208 | ||
208 | if !DISABLE_TEST_RUN | 209 | if !DISABLE_TEST_RUN |
@@ -220,7 +221,8 @@ TESTS = \ | |||
220 | $(HTTP_REL_TEST) \ | 221 | $(HTTP_REL_TEST) \ |
221 | $(HTTPS_REL_TEST) \ | 222 | $(HTTPS_REL_TEST) \ |
222 | test_quota_compliance_tcp \ | 223 | test_quota_compliance_tcp \ |
223 | test_quota_compliance_http | 224 | test_quota_compliance_http \ |
225 | test_quota_compliance_https | ||
224 | endif | 226 | endif |
225 | 227 | ||
226 | test_transport_api_tcp_SOURCES = \ | 228 | test_transport_api_tcp_SOURCES = \ |
@@ -319,6 +321,12 @@ test_quota_compliance_http_LDADD = \ | |||
319 | $(top_builddir)/src/transport/libgnunettransport.la \ | 321 | $(top_builddir)/src/transport/libgnunettransport.la \ |
320 | $(top_builddir)/src/util/libgnunetutil.la | 322 | $(top_builddir)/src/util/libgnunetutil.la |
321 | 323 | ||
324 | test_quota_compliance_https_SOURCES = \ | ||
325 | test_quota_compliance.c | ||
326 | test_quota_compliance_https_LDADD = \ | ||
327 | $(top_builddir)/src/transport/libgnunettransport.la \ | ||
328 | $(top_builddir)/src/util/libgnunetutil.la | ||
329 | |||
322 | endif | 330 | endif |
323 | 331 | ||
324 | EXTRA_DIST = \ | 332 | EXTRA_DIST = \ |
@@ -346,4 +354,6 @@ EXTRA_DIST = \ | |||
346 | test_quota_compliance_tcp_peer1.conf \ | 354 | test_quota_compliance_tcp_peer1.conf \ |
347 | test_quota_compliance_tcp_peer2.conf \ | 355 | test_quota_compliance_tcp_peer2.conf \ |
348 | test_quota_compliance_http_peer1.conf \ | 356 | test_quota_compliance_http_peer1.conf \ |
349 | test_quota_compliance_http_peer2.conf \ No newline at end of file | 357 | test_quota_compliance_http_peer2.conf \ |
358 | test_quota_compliance_https_peer1.conf \ | ||
359 | test_quota_compliance_https_peer2.conf \ No newline at end of file | ||
diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c index 0c5acbdc3..2a4a97265 100644 --- a/src/transport/test_quota_compliance.c +++ b/src/transport/test_quota_compliance.c | |||
@@ -593,8 +593,11 @@ run (void *cls, | |||
593 | } | 593 | } |
594 | else if (is_https) | 594 | else if (is_https) |
595 | { | 595 | { |
596 | setup_peer (&p1, "test_quota_compliance_tcp_peer1.conf"); | 596 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
597 | setup_peer (&p2, "test_quota_compliance_tcp_peer2.conf"); | 597 | "is_https: %u \n", |
598 | is_https); | ||
599 | setup_peer (&p1, "test_quota_compliance_https_peer1.conf"); | ||
600 | setup_peer (&p2, "test_quota_compliance_https_peer2.conf"); | ||
598 | } | 601 | } |
599 | else if (is_udp) | 602 | else if (is_udp) |
600 | { | 603 | { |
diff --git a/src/transport/test_quota_compliance_https_peer1.conf b/src/transport/test_quota_compliance_https_peer1.conf new file mode 100644 index 000000000..b2c4ea9f2 --- /dev/null +++ b/src/transport/test_quota_compliance_https_peer1.conf | |||
@@ -0,0 +1,114 @@ | |||
1 | [PATHS] | ||
2 | SERVICEHOME = /tmp/test_quota_compliance_peer1/ | ||
3 | DEFAULTCONFIG = test_quota_compliance_https_peer1.conf | ||
4 | |||
5 | [fs] | ||
6 | AUTOSTART = NO | ||
7 | |||
8 | [datastore] | ||
9 | AUTOSTART = NO | ||
10 | |||
11 | [hostlist] | ||
12 | HTTP-PROXY = | ||
13 | SERVERS = http://gnunet.org:8080/ | ||
14 | OPTIONS = -b | ||
15 | BINARY = gnunet-daemon-hostlist | ||
16 | CONFIG = $DEFAULTCONFIG | ||
17 | HOME = $SERVICEHOME | ||
18 | HOSTNAME = localhost | ||
19 | HTTPPORT = 8080 | ||
20 | |||
21 | [topology] | ||
22 | BINARY = gnunet-daemon-topology | ||
23 | CONFIG = $DEFAULTCONFIG | ||
24 | FRIENDS = $SERVICEHOME/friends | ||
25 | TARGET-CONNECTION-COUNT = 16 | ||
26 | AUTOCONNECT = YES | ||
27 | FRIENDS-ONLY = NO | ||
28 | MINIMUM-FRIENDS = 0 | ||
29 | |||
30 | [core] | ||
31 | AUTOSTART = NO | ||
32 | |||
33 | [transport-https] | ||
34 | PORT = 4001 | ||
35 | #DEBUG = YES | ||
36 | USE_IPv4 = YES | ||
37 | USE_IPv6 = NO | ||
38 | BINDTO4 = 127.0.0.1 | ||
39 | #BINDTO6 = ::1 | ||
40 | KEY_FILE = https_key_p1.key | ||
41 | CERT_FILE = https_cert_p1.crt | ||
42 | CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL | ||
43 | #CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+MD5:+RSA:+COMP-NULL | ||
44 | #CRYPTO_INIT = PERFORMANCE | ||
45 | |||
46 | |||
47 | [transport] | ||
48 | plugins = https | ||
49 | #DEBUG = YES | ||
50 | PREFIX = | ||
51 | ACCEPT_FROM6 = ::1; | ||
52 | ACCEPT_FROM = 127.0.0.1; | ||
53 | NEIGHBOUR_LIMIT = 50 | ||
54 | BINARY = gnunet-service-transport | ||
55 | CONFIG = $DEFAULTCONFIG | ||
56 | HOME = $SERVICEHOME | ||
57 | HOSTNAME = localhost | ||
58 | PORT = 4091 | ||
59 | UNIXPATH = /tmp/test_quota_compliance_peer1/test_quota_compliance_transport_peer1.sock | ||
60 | |||
61 | [peerinfo] | ||
62 | TRUST = $SERVICEHOME/data/credit/ | ||
63 | HOSTS = $SERVICEHOME/data/hosts/ | ||
64 | ACCEPT_FROM6 = ::1; | ||
65 | ACCEPT_FROM = 127.0.0.1; | ||
66 | BINARY = gnunet-service-peerinfo | ||
67 | CONFIG = $DEFAULTCONFIG | ||
68 | HOME = $SERVICEHOME | ||
69 | HOSTNAME = localhost | ||
70 | PORT = 4090 | ||
71 | UNIXPATH = /tmp/test_quota_compliance_peer1/test_quota_compliance_peerinfo_peer1.sock | ||
72 | |||
73 | [resolver] | ||
74 | ACCEPT_FROM6 = ::1; | ||
75 | ACCEPT_FROM = 127.0.0.1; | ||
76 | BINARY = gnunet-service-resolver | ||
77 | CONFIG = $DEFAULTCONFIG | ||
78 | HOME = $SERVICEHOME | ||
79 | HOSTNAME = localhost | ||
80 | PORT = 4089 | ||
81 | UNIXPATH = /tmp/test_quota_compliance_peer1/test_quota_compliance_resolver_peer1.sock | ||
82 | |||
83 | [statistics] | ||
84 | ACCEPT_FROM6 = ::1; | ||
85 | ACCEPT_FROM = 127.0.0.1; | ||
86 | BINARY = gnunet-service-statistics | ||
87 | CONFIG = $DEFAULTCONFIG | ||
88 | HOME = $SERVICEHOME | ||
89 | HOSTNAME = localhost | ||
90 | PORT = 4088 | ||
91 | UNIXPATH = /tmp/test_quota_compliance_peer1/test_quota_compliance_statistics_peer1.sock | ||
92 | |||
93 | [arm] | ||
94 | DEFAULTSERVICES = | ||
95 | ACCEPT_FROM6 = ::1; | ||
96 | ACCEPT_FROM = 127.0.0.1; | ||
97 | BINARY = gnunet-service-arm | ||
98 | CONFIG = $DEFAULTCONFIG | ||
99 | HOME = $SERVICEHOME | ||
100 | HOSTNAME = localhost | ||
101 | PORT = 4087 | ||
102 | UNIXPATH = /tmp/test_quota_compliance_peer1/test_quota_compliance_arm_peer1.sock | ||
103 | |||
104 | [TESTING] | ||
105 | WEAKRANDOM = YES | ||
106 | |||
107 | [gnunetd] | ||
108 | HOSTKEY = $SERVICEHOME/.hostkey | ||
109 | |||
110 | |||
111 | [dht] | ||
112 | AUTOSTART = NO | ||
113 | |||
114 | |||
diff --git a/src/transport/test_quota_compliance_https_peer2.conf b/src/transport/test_quota_compliance_https_peer2.conf new file mode 100644 index 000000000..bf9debcf0 --- /dev/null +++ b/src/transport/test_quota_compliance_https_peer2.conf | |||
@@ -0,0 +1,114 @@ | |||
1 | [PATHS] | ||
2 | SERVICEHOME = /tmp/test_quota_compliance_peer2 | ||
3 | DEFAULTCONFIG = test_quota_compliance_https_peer2.conf | ||
4 | |||
5 | [transport-https] | ||
6 | PORT = 3001 | ||
7 | #DEBUG = YES | ||
8 | USE_IPv4 = YES | ||
9 | USE_IPv6 = NO | ||
10 | BINDTO4 = 127.0.0.1 | ||
11 | #BINDTO6 = ::1 | ||
12 | KEY_FILE = https_key_p1.key | ||
13 | CERT_FILE = https_cert_p1.crt | ||
14 | CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL | ||
15 | #CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+MD5:+RSA:+COMP-NULL | ||
16 | #CRYPTO_INIT = PERFORMANCE | ||
17 | |||
18 | |||
19 | [fs] | ||
20 | AUTOSTART = NO | ||
21 | |||
22 | [datastore] | ||
23 | AUTOSTART = NO | ||
24 | |||
25 | [hostlist] | ||
26 | HTTP-PROXY = | ||
27 | SERVERS = http://gnunet.org:8080/ | ||
28 | OPTIONS = -b | ||
29 | BINARY = gnunet-daemon-hostlist | ||
30 | CONFIG = $DEFAULTCONFIG | ||
31 | HOME = $SERVICEHOME | ||
32 | HOSTNAME = localhost | ||
33 | HTTPPORT = 8080 | ||
34 | |||
35 | [topology] | ||
36 | BINARY = gnunet-daemon-topology | ||
37 | CONFIG = $DEFAULTCONFIG | ||
38 | FRIENDS = $SERVICEHOME/friends | ||
39 | TARGET-CONNECTION-COUNT = 16 | ||
40 | AUTOCONNECT = YES | ||
41 | FRIENDS-ONLY = NO | ||
42 | MINIMUM-FRIENDS = 0 | ||
43 | |||
44 | [core] | ||
45 | AUTOSTART = NO | ||
46 | |||
47 | [transport] | ||
48 | plugins = https | ||
49 | #DEBUG = YES | ||
50 | PREFIX = | ||
51 | ACCEPT_FROM6 = ::1; | ||
52 | ACCEPT_FROM = 127.0.0.1; | ||
53 | NEIGHBOUR_LIMIT = 50 | ||
54 | BINARY = gnunet-service-transport | ||
55 | CONFIG = $DEFAULTCONFIG | ||
56 | HOME = $SERVICEHOME | ||
57 | HOSTNAME = localhost | ||
58 | PORT = 3091 | ||
59 | UNIXPATH = /tmp/test_quota_compliance_peer2/test_quota_compliance_transport_peer2.sock | ||
60 | |||
61 | [peerinfo] | ||
62 | TRUST = $SERVICEHOME/data/credit/ | ||
63 | HOSTS = $SERVICEHOME/data/hosts/ | ||
64 | ACCEPT_FROM6 = ::1; | ||
65 | ACCEPT_FROM = 127.0.0.1; | ||
66 | BINARY = gnunet-service-peerinfo | ||
67 | CONFIG = $DEFAULTCONFIG | ||
68 | HOME = $SERVICEHOME | ||
69 | HOSTNAME = localhost | ||
70 | PORT = 3090 | ||
71 | UNIXPATH = /tmp/test_quota_compliance_peer2/test_quota_compliance_peerinfo_peer2.sock | ||
72 | |||
73 | [resolver] | ||
74 | ACCEPT_FROM6 = ::1; | ||
75 | ACCEPT_FROM = 127.0.0.1; | ||
76 | BINARY = gnunet-service-resolver | ||
77 | CONFIG = $DEFAULTCONFIG | ||
78 | HOME = $SERVICEHOME | ||
79 | HOSTNAME = localhost | ||
80 | PORT = 3089 | ||
81 | UNIXPATH = /tmp/test_quota_compliance_peer2/test_quota_compliance_resolver_peer2.sock | ||
82 | |||
83 | [statistics] | ||
84 | ACCEPT_FROM6 = ::1; | ||
85 | ACCEPT_FROM = 127.0.0.1; | ||
86 | BINARY = gnunet-service-statistics | ||
87 | CONFIG = $DEFAULTCONFIG | ||
88 | HOME = $SERVICEHOME | ||
89 | HOSTNAME = localhost | ||
90 | PORT = 3088 | ||
91 | UNIXPATH = /tmp/test_quota_compliance_peer2/test_quota_compliance_statistics_peer2.sock | ||
92 | |||
93 | [arm] | ||
94 | DEFAULTSERVICES = | ||
95 | ACCEPT_FROM6 = ::1; | ||
96 | ACCEPT_FROM = 127.0.0.1; | ||
97 | BINARY = gnunet-service-arm | ||
98 | CONFIG = $DEFAULTCONFIG | ||
99 | HOME = $SERVICEHOME | ||
100 | HOSTNAME = localhost | ||
101 | PORT = 3087 | ||
102 | UNIXPATH = /tmp/test_quota_compliance_peer2/test_quota_compliance_arm_peer2.sock | ||
103 | |||
104 | [TESTING] | ||
105 | WEAKRANDOM = YES | ||
106 | |||
107 | [gnunetd] | ||
108 | HOSTKEY = $SERVICEHOME/.hostkey | ||
109 | |||
110 | |||
111 | [dht] | ||
112 | AUTOSTART = NO | ||
113 | |||
114 | |||