|
|
|
@ -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" |
|
|
|
|
" a message from the client with a weaker (SHA1) hash function then the server\n" |
|
|
|
|
" returns error code 426.\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" |
|
|
|
|
" After the initialization, the turnserver process\n" |
|
|
|
|
" will make an attempt to change the current user ID to that user.\n" |
|
|
|
@ -638,6 +639,7 @@ static char AdminUsage[] = "Usage: turnadmin [command] [options]\n" |
|
|
|
|
#endif |
|
|
|
|
" -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" |
|
|
|
|
" -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" |
|
|
|
|
" Setting to zero value means removal of the option.\n" |
|
|
|
|
" --total-quota Set value of realm's total-quota parameter.\n" |
|
|
|
@ -648,7 +650,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 ADMIN_OPTIONS "gGORIHlLkaADSdb:e:M:J:N:u:r:p:s:X:o:h" |
|
|
|
|
#define ADMIN_OPTIONS "gGORIHKlLkaADSdb:e:M:J:N:u:r:p:s:X:o:h" |
|
|
|
|
|
|
|
|
|
enum EXTRA_OPTS { |
|
|
|
|
NO_UDP_OPT=256, |
|
|
|
@ -688,6 +690,7 @@ enum EXTRA_OPTS { |
|
|
|
|
CA_FILE_OPT, |
|
|
|
|
DH_FILE_OPT, |
|
|
|
|
SHA256_OPT, |
|
|
|
|
SHA512_OPT, |
|
|
|
|
NO_STUN_OPT, |
|
|
|
|
PROC_USER_OPT, |
|
|
|
|
PROC_GROUP_OPT, |
|
|
|
@ -811,6 +814,7 @@ static const struct myoption long_options[] = { |
|
|
|
|
{ "CA-file", required_argument, NULL, CA_FILE_OPT }, |
|
|
|
|
{ "dh-file", required_argument, NULL, DH_FILE_OPT }, |
|
|
|
|
{ "sha256", optional_argument, NULL, SHA256_OPT }, |
|
|
|
|
{ "sha512", optional_argument, NULL, SHA512_OPT }, |
|
|
|
|
{ "proc-user", required_argument, NULL, PROC_USER_OPT }, |
|
|
|
|
{ "proc-group", required_argument, NULL, PROC_GROUP_OPT }, |
|
|
|
|
{ "mobility", optional_argument, NULL, MOBILITY_OPT }, |
|
|
|
@ -865,6 +869,7 @@ static const struct myoption admin_long_options[] = { |
|
|
|
|
{ "realm", required_argument, NULL, 'r' }, |
|
|
|
|
{ "password", required_argument, NULL, 'p' }, |
|
|
|
|
{ "sha256", no_argument, NULL, 'H' }, |
|
|
|
|
{ "sha512", no_argument, NULL, 'K' }, |
|
|
|
|
{ "add-origin", no_argument, NULL, 'O' }, |
|
|
|
|
{ "del-origin", no_argument, NULL, 'R' }, |
|
|
|
|
{ "list-origins", required_argument, NULL, 'I' }, |
|
|
|
@ -1031,8 +1036,10 @@ static void set_option(int c, char *value) |
|
|
|
|
case SHA256_OPT: |
|
|
|
|
if(get_bool_value(value)) |
|
|
|
|
turn_params.shatype = SHATYPE_SHA256; |
|
|
|
|
else |
|
|
|
|
turn_params.shatype = SHATYPE_SHA1; |
|
|
|
|
break; |
|
|
|
|
case SHA512_OPT: |
|
|
|
|
if(get_bool_value(value)) |
|
|
|
|
turn_params.shatype = SHATYPE_SHA512; |
|
|
|
|
break; |
|
|
|
|
case NO_MULTICAST_PEERS_OPT: |
|
|
|
|
turn_params.no_multicast_peers = get_bool_value(value); |
|
|
|
@ -1554,8 +1561,10 @@ static int adminmain(int argc, char **argv) |
|
|
|
|
case 'H': |
|
|
|
|
if(get_bool_value(optarg)) |
|
|
|
|
turn_params.shatype = SHATYPE_SHA256; |
|
|
|
|
else |
|
|
|
|
turn_params.shatype = SHATYPE_SHA1; |
|
|
|
|
break; |
|
|
|
|
case 'K': |
|
|
|
|
if(get_bool_value(optarg)) |
|
|
|
|
turn_params.shatype = SHATYPE_SHA512; |
|
|
|
|
break; |
|
|
|
|
case 'h': |
|
|
|
|
printf("\n%s\n", AdminUsage); |
|
|
|
|