Codebase list sslscan / upstream/2.0.1
New upstream version 2.0.1 Sophie Brun 3 years ago
2 changed file(s) with 10 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
39323932
39333933 // SNI name
39343934 else if (strncmp("--sni-name=", argv[argLoop], 11) == 0)
3935 {
39353936 strncpy(options.sniname, argv[argLoop]+11, strlen(argv[argLoop])-11);
3937 options.sni_set = 1;
3938 }
39363939
39373940
39383941 // Host (maybe port too)...
39853988 strncpy(options.host, hostString, sizeof(options.host) -1);
39863989
39873990 // No SNI name passed on command line
3988 if (strlen(options.sniname) == 0)
3991 if (!options.sni_set)
39893992 {
39903993 strncpy(options.sniname, options.host, sizeof(options.host) -1);
39913994 }
41904193 tempInt++;
41914194 line[tempInt] = 0;
41924195 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 }
41934201
41944202 // Get port (if it exists)...
41954203 tempInt++;
143143 // Program Options...
144144 char host[512];
145145 char sniname[512];
146 int sni_set;
146147 char addrstr[INET6_ADDRSTRLEN];
147148 int port;
148149 int showCertificate;