New upstream version 2.0.1
Sophie Brun
3 years ago
3932 | 3932 | |
3933 | 3933 | // SNI name |
3934 | 3934 | else if (strncmp("--sni-name=", argv[argLoop], 11) == 0) |
3935 | { | |
3935 | 3936 | strncpy(options.sniname, argv[argLoop]+11, strlen(argv[argLoop])-11); |
3937 | options.sni_set = 1; | |
3938 | } | |
3936 | 3939 | |
3937 | 3940 | |
3938 | 3941 | // Host (maybe port too)... |
3985 | 3988 | strncpy(options.host, hostString, sizeof(options.host) -1); |
3986 | 3989 | |
3987 | 3990 | // No SNI name passed on command line |
3988 | if (strlen(options.sniname) == 0) | |
3991 | if (!options.sni_set) | |
3989 | 3992 | { |
3990 | 3993 | strncpy(options.sniname, options.host, sizeof(options.host) -1); |
3991 | 3994 | } |
4190 | 4193 | tempInt++; |
4191 | 4194 | line[tempInt] = 0; |
4192 | 4195 | strncpy(options.host, line, sizeof(options.host) -1); |
4196 | ||
4197 | if (!options.sni_set) | |
4198 | { | |
4199 | strncpy(options.sniname, options.host, sizeof(options.host) -1); | |
4200 | } | |
4193 | 4201 | |
4194 | 4202 | // Get port (if it exists)... |
4195 | 4203 | tempInt++; |