|
@@ -569,6 +569,7 @@ static char Usage[] = "Usage: turnserver [options]\n"
|
|
" support SHA256 hash function if this option is used. If the server obtains\n"
|
|
" support SHA256 hash function if this option is used. If the server obtains\n"
|
|
" a message from the client with a weaker (SHA1) hash function then the server\n"
|
|
" a message from the client with a weaker (SHA1) hash function then the server\n"
|
|
" returns error code 426.\n"
|
|
" returns error code 426.\n"
|
|
|
|
+" --sha384 Require SHA384 digest function to be used for the message integrity.\n"
|
|
" --sha512 Require SHA512 digest function to be used for the message integrity.\n"
|
|
" --sha512 Require SHA512 digest function to be used for the message integrity.\n"
|
|
" --proc-user <user-name> User name to run the turnserver process.\n"
|
|
" --proc-user <user-name> User name to run the turnserver process.\n"
|
|
" After the initialization, the turnserver process\n"
|
|
" After the initialization, the turnserver process\n"
|
|
@@ -639,6 +640,7 @@ static char AdminUsage[] = "Usage: turnadmin [command] [options]\n"
|
|
#endif
|
|
#endif
|
|
" -H, --sha256 Use SHA256 digest function to be used for the message integrity.\n"
|
|
" -H, --sha256 Use SHA256 digest function to be used for the message integrity.\n"
|
|
" By default, the server SHA1 (as per TURN standard specs).\n"
|
|
" By default, the server SHA1 (as per TURN standard specs).\n"
|
|
|
|
+ " -Y, --sha384 Use SHA384 digest function to be used for the message integrity.\n"
|
|
" -K, --sha512 Use SHA512 digest function to be used for the message integrity.\n"
|
|
" -K, --sha512 Use SHA512 digest function to be used for the message integrity.\n"
|
|
" --max-bps Set value of realm's max-bps parameter.\n"
|
|
" --max-bps Set value of realm's max-bps parameter.\n"
|
|
" Setting to zero value means removal of the option.\n"
|
|
" Setting to zero value means removal of the option.\n"
|
|
@@ -650,7 +652,7 @@ static char AdminUsage[] = "Usage: turnadmin [command] [options]\n"
|
|
|
|
|
|
#define OPTIONS "c:d:p:L:E:X:i:m:l:r:u:b:B:e:M:J:N:O:q:Q:s:C:vVofhznaAS"
|
|
#define OPTIONS "c:d:p:L:E:X:i:m:l:r:u:b:B:e:M:J:N:O:q:Q:s:C:vVofhznaAS"
|
|
|
|
|
|
-#define ADMIN_OPTIONS "gGORIHKlLkaADSdb:e:M:J:N:u:r:p:s:X:o:h"
|
|
|
|
|
|
+#define ADMIN_OPTIONS "gGORIHKYlLkaADSdb:e:M:J:N:u:r:p:s:X:o:h"
|
|
|
|
|
|
enum EXTRA_OPTS {
|
|
enum EXTRA_OPTS {
|
|
NO_UDP_OPT=256,
|
|
NO_UDP_OPT=256,
|
|
@@ -690,6 +692,7 @@ enum EXTRA_OPTS {
|
|
CA_FILE_OPT,
|
|
CA_FILE_OPT,
|
|
DH_FILE_OPT,
|
|
DH_FILE_OPT,
|
|
SHA256_OPT,
|
|
SHA256_OPT,
|
|
|
|
+ SHA384_OPT,
|
|
SHA512_OPT,
|
|
SHA512_OPT,
|
|
NO_STUN_OPT,
|
|
NO_STUN_OPT,
|
|
PROC_USER_OPT,
|
|
PROC_USER_OPT,
|
|
@@ -814,6 +817,7 @@ static const struct myoption long_options[] = {
|
|
{ "CA-file", required_argument, NULL, CA_FILE_OPT },
|
|
{ "CA-file", required_argument, NULL, CA_FILE_OPT },
|
|
{ "dh-file", required_argument, NULL, DH_FILE_OPT },
|
|
{ "dh-file", required_argument, NULL, DH_FILE_OPT },
|
|
{ "sha256", optional_argument, NULL, SHA256_OPT },
|
|
{ "sha256", optional_argument, NULL, SHA256_OPT },
|
|
|
|
+ { "sha384", optional_argument, NULL, SHA384_OPT },
|
|
{ "sha512", optional_argument, NULL, SHA512_OPT },
|
|
{ "sha512", optional_argument, NULL, SHA512_OPT },
|
|
{ "proc-user", required_argument, NULL, PROC_USER_OPT },
|
|
{ "proc-user", required_argument, NULL, PROC_USER_OPT },
|
|
{ "proc-group", required_argument, NULL, PROC_GROUP_OPT },
|
|
{ "proc-group", required_argument, NULL, PROC_GROUP_OPT },
|
|
@@ -869,6 +873,7 @@ static const struct myoption admin_long_options[] = {
|
|
{ "realm", required_argument, NULL, 'r' },
|
|
{ "realm", required_argument, NULL, 'r' },
|
|
{ "password", required_argument, NULL, 'p' },
|
|
{ "password", required_argument, NULL, 'p' },
|
|
{ "sha256", no_argument, NULL, 'H' },
|
|
{ "sha256", no_argument, NULL, 'H' },
|
|
|
|
+ { "sha384", no_argument, NULL, 'Y' },
|
|
{ "sha512", no_argument, NULL, 'K' },
|
|
{ "sha512", no_argument, NULL, 'K' },
|
|
{ "add-origin", no_argument, NULL, 'O' },
|
|
{ "add-origin", no_argument, NULL, 'O' },
|
|
{ "del-origin", no_argument, NULL, 'R' },
|
|
{ "del-origin", no_argument, NULL, 'R' },
|
|
@@ -1037,6 +1042,10 @@ static void set_option(int c, char *value)
|
|
if(get_bool_value(value))
|
|
if(get_bool_value(value))
|
|
turn_params.shatype = SHATYPE_SHA256;
|
|
turn_params.shatype = SHATYPE_SHA256;
|
|
break;
|
|
break;
|
|
|
|
+ case SHA384_OPT:
|
|
|
|
+ if(get_bool_value(value))
|
|
|
|
+ turn_params.shatype = SHATYPE_SHA384;
|
|
|
|
+ break;
|
|
case SHA512_OPT:
|
|
case SHA512_OPT:
|
|
if(get_bool_value(value))
|
|
if(get_bool_value(value))
|
|
turn_params.shatype = SHATYPE_SHA512;
|
|
turn_params.shatype = SHATYPE_SHA512;
|
|
@@ -1562,6 +1571,10 @@ static int adminmain(int argc, char **argv)
|
|
if(get_bool_value(optarg))
|
|
if(get_bool_value(optarg))
|
|
turn_params.shatype = SHATYPE_SHA256;
|
|
turn_params.shatype = SHATYPE_SHA256;
|
|
break;
|
|
break;
|
|
|
|
+ case 'Y':
|
|
|
|
+ if(get_bool_value(optarg))
|
|
|
|
+ turn_params.shatype = SHATYPE_SHA384;
|
|
|
|
+ break;
|
|
case 'K':
|
|
case 'K':
|
|
if(get_bool_value(optarg))
|
|
if(get_bool_value(optarg))
|
|
turn_params.shatype = SHATYPE_SHA512;
|
|
turn_params.shatype = SHATYPE_SHA512;
|