Commit 7c976bf0 authored by johan's avatar johan

X3DH test server runs on sip5.linphone.org

add a way to use this for testing
parent 8eb87121
...@@ -26,6 +26,8 @@ Testing ...@@ -26,6 +26,8 @@ Testing
A nodejs version of UNSECURE X3DH server is provided in tester/server A nodejs version of UNSECURE X3DH server is provided in tester/server
See README from this directory for instructions. See README from this directory for instructions.
A test instance of X3DH server shall be running on sip5.linphone.org.
Options Options
------- -------
......
-----BEGIN CERTIFICATE-----
MIIFlTCCA32gAwIBAgIJAO9qiJ15oE/3MA0GCSqGSIb3DQEBBQUAMGExCzAJBgNV
BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX
aWRnaXRzIFB0eSBMdGQxGjAYBgNVBAMMEXNpcDUubGlucGhvbmUub3JnMB4XDTE3
MTExNDE1MjQ0M1oXDTI3MTExMjE1MjQ0M1owYTELMAkGA1UEBhMCQVUxEzARBgNV
BAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0
ZDEaMBgGA1UEAwwRc2lwNS5saW5waG9uZS5vcmcwggIiMA0GCSqGSIb3DQEBAQUA
A4ICDwAwggIKAoICAQCcMDH3b54Yy6TtWtLQM8Ta3fW2HCKkSX5LN70Mfrs+wQuK
h6t3nIm2Zt3rSi5xiHeIGttOg8gbPJAMvNbQ1EAt82Yv83j2zgTXi9aEhu5ysbny
gna0atr64oalpcgyc5SXGBj8nKUNDixDeWYU25NBSQtNST0oGMq1ZaEq+FFGwv7w
2LKDDvUAeKozlirhgd3EdtoDHp6iHsB4PTAiACBDawONGn8wREmanQQsEWEAPaP/
3A7ZVOt9eAJQmf664tCWB4915YZJAB8V6gI7SgDCDN/A/t/k1llF5gmOFOAMlnUG
pSZX8CWbkPU+l2wfYQ4wqu5wycA2Gqq6F70L0Ud4WYlAXE5yKhJKpTh2akW81H92
edwVgn5No2Dm/1PMNFysLaX2Q/SYjdxNZwbHHDjV+rqvqS8b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nbMPL1RjIgVHAvCWUMU2ZsU6dMzaqw=
-----END CERTIFICATE-----
...@@ -28,6 +28,12 @@ ...@@ -28,6 +28,12 @@
static FILE * log_file = NULL; static FILE * log_file = NULL;
static const char *log_domain = "lime"; static const char *log_domain = "lime";
// settings used in lime suite
extern std::string test_x3dh_server_url;
extern int wait_for_timeout;
extern std::string test_x3dh_c25519_server_port;
extern std::string test_x3dh_c448_server_port;
static void log_handler(int lev, const char *fmt, va_list args) { static void log_handler(int lev, const char *fmt, va_list args) {
#ifdef _WIN32 #ifdef _WIN32
/* We must use stdio to avoid log formatting (for autocompletion etc.) */ /* We must use stdio to avoid log formatting (for autocompletion etc.) */
...@@ -87,6 +93,15 @@ int lime_tester_set_log_file(const char *filename) { ...@@ -87,6 +93,15 @@ int lime_tester_set_log_file(const char *filename) {
static const char* lime_helper = static const char* lime_helper =
"\t\t\t--verbose\n" "\t\t\t--verbose\n"
"\t\t\t--silent\n" "\t\t\t--silent\n"
"\t\t\t--x3dh-server-url <url without protocol prefix nor port>, default : localhost\n\t\t\t a test instance shall be running on sip5.linphone.org\n"
#ifdef EC25519_ENABLED
"\t\t\t--c255-x3dh-server-port <port to use on x3dh server for instance running on curve25519>, default : 25519\n"
#endif
#ifdef EC448_ENABLED
"\t\t\t--c448-x3dh-server-port <port to use on x3dh server for instance running on curve448>, default : 25520\n"
#endif
"\t\t\t--operation-timeout <delay in ms to complete basic operations involving server>, default : 4000, you may want to increase this if you are not using a local X3DH server\n"
"\t\t\t--log-file <output log file path>\n"; "\t\t\t--log-file <output log file path>\n";
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
...@@ -114,6 +129,18 @@ int main(int argc, char *argv[]) { ...@@ -114,6 +129,18 @@ int main(int argc, char *argv[]) {
} else if (strcmp(argv[i],"--log-file")==0){ } else if (strcmp(argv[i],"--log-file")==0){
CHECK_ARG("--log-file", ++i, argc); CHECK_ARG("--log-file", ++i, argc);
if (lime_tester_set_log_file(argv[i]) < 0) return -2; if (lime_tester_set_log_file(argv[i]) < 0) return -2;
} else if (strcmp(argv[i],"--x3dh-server-url")==0){
CHECK_ARG("--x3dh-server-url", ++i, argc);
test_x3dh_server_url=std::string(argv[i]);
} else if (strcmp(argv[i],"--c255-x3dh-server-port")==0){
CHECK_ARG("--c255-x3dh-server-port", ++i, argc);
test_x3dh_c25519_server_port=std::string(argv[i]);
} else if (strcmp(argv[i],"--c448-x3dh-server-port")==0){
CHECK_ARG("--c448-x3dh-server-port", ++i, argc);
test_x3dh_c448_server_port=std::string(argv[i]);
} else if (strcmp(argv[i],"--operation-timeout")==0){
CHECK_ARG("--operation-timeout", ++i, argc);
wait_for_timeout=std::atoi(argv[i]);
}else { }else {
int ret = bc_tester_parse_args(argc, argv, i); int ret = bc_tester_parse_args(argc, argv, i);
if (ret>0) { if (ret>0) {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment