diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-11-27 11:24:22 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-11-27 11:24:22 -0800 |
| commit | 8a72e00a6020db9ab93c68c80841757ce445ef9f (patch) | |
| tree | 5a1044fed5dc84c598e1041f2c4acdc434e5e64b /tests/tls.c | |
| parent | e00f01ef1e6d29817156649a3a0324df90650242 (diff) | |
| download | nng-8a72e00a6020db9ab93c68c80841757ce445ef9f.tar.gz nng-8a72e00a6020db9ab93c68c80841757ce445ef9f.tar.bz2 nng-8a72e00a6020db9ab93c68c80841757ce445ef9f.zip | |
fixes #160 Convert TLS url from tls:// to tls+tcp://
Diffstat (limited to 'tests/tls.c')
| -rw-r--r-- | tests/tls.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/tests/tls.c b/tests/tls.c index e4e430af..6ec249cf 100644 --- a/tests/tls.c +++ b/tests/tls.c @@ -1,6 +1,7 @@ // // Copyright 2017 Garrett D'Amore <garrett@damore.org> // Copyright 2017 Capitar IT Group BV <info@capitar.com> +// Copyright 2017 Staysail Systems, Inc. <info@staysail.tech> // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -126,7 +127,7 @@ TestMain("TLS Transport", { static trantest tt; tt.init = init_tls; - tt.tmpl = "tls://127.0.0.1:%u"; + tt.tmpl = "tls+tcp://127.0.0.1:%u"; trantest_test(&tt); @@ -140,7 +141,7 @@ TestMain("TLS Transport", { So(nng_tls_register() == 0); So(nng_pair_open(&s) == 0); Reset({ nng_close(s); }); - trantest_next_address(addr, "tls://*:%u"); + trantest_next_address(addr, "tls+tcp://*:%u"); So(nng_dial(s, addr, NULL, 0) == NNG_EADDRINVAL); }); @@ -156,10 +157,10 @@ TestMain("TLS Transport", { nng_close(s2); nng_close(s1); }); - trantest_next_address(addr, "tls://*:%u"); + trantest_next_address(addr, "tls+tcp://*:%u"); So(nng_listen(s1, addr, NULL, 0) == 0); // reset port back one - trantest_prev_address(addr, "tls://127.0.0.1:%u"); + trantest_prev_address(addr, "tls+tcp://127.0.0.1:%u"); So(nng_dial(s2, addr, NULL, 0) == 0); }); @@ -169,16 +170,16 @@ TestMain("TLS Transport", { So(nng_tls_register() == 0); So(nng_pair_open(&s1) == 0); Reset({ nng_close(s1); }); - So(nng_dial(s1, "tls://127.0.0.1", NULL, 0) == NNG_EADDRINVAL); - So(nng_dial(s1, "tls://127.0.0.1.32", NULL, 0) == + So(nng_dial(s1, "tls+tcp://127.0.0.1", NULL, 0) == NNG_EADDRINVAL); + So(nng_dial(s1, "tls+tcp://127.0.0.1.32", NULL, 0) == NNG_EADDRINVAL); - So(nng_dial(s1, "tls://127.0.x.1.32", NULL, 0) == + So(nng_dial(s1, "tls+tcp://127.0.x.1.32", NULL, 0) == NNG_EADDRINVAL); - So(nng_listen(s1, "tls://127.0.0.1", NULL, 0) == + So(nng_listen(s1, "tls+tcp://127.0.0.1", NULL, 0) == NNG_EADDRINVAL); - So(nng_listen(s1, "tls://127.0.0.1.32", NULL, 0) == + So(nng_listen(s1, "tls+tcp://127.0.0.1.32", NULL, 0) == NNG_EADDRINVAL); - So(nng_listen(s1, "tls://127.0.x.1.32", NULL, 0) == + So(nng_listen(s1, "tls+tcp://127.0.x.1.32", NULL, 0) == NNG_EADDRINVAL); }); |
