Lines Matching +full:v +full:- +full:pos +full:- +full:supply

2  * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
178 /* We default to SHA-256 */ in psk_use_session_cb()
230 if (SSL_get_servername_type(s) != -1) in ssl_servername_cb()
231 p->ack = !SSL_session_reused(s) && hn != NULL; in ssl_servername_cb()
267 ctx->status = in next_proto_cb()
268 SSL_select_next_proto(out, outlen, in, inlen, ctx->data, ctx->len); in next_proto_cb()
308 return -1; in hexdecode()
334 return cp - (*out = ret); in hexdecode()
346 long v; in checked_uint8() local
350 v = strtol(in, &endp, 10); in checked_uint8()
353 if (((v == LONG_MIN || v == LONG_MAX) && e == ERANGE) || in checked_uint8()
355 v != (*result = (uint8_t) v)) { in checked_uint8()
356 return -1; in checked_uint8()
373 /* Not necessary to re-init these values; the "parsers" do that. */ in tlsa_import_rr()
390 for (f = tlsa_fields; f->var; ++f) { in tlsa_import_rr()
392 if ((len = f->parser(&cp, f->var)) <= 0) { in tlsa_import_rr()
394 prog, f->name, rrdata); in tlsa_import_rr()
474 {OPT_HELP_STR, 1, '-', "Usage: %s [options] [host:port]\n"},
477 {"help", OPT_HELP, '-', "Display this summary"},
485 {"ct", OPT_CT, '-', "Request and parse SCTs (also enables OCSP stapling)"},
486 {"noct", OPT_NOCT, '-', "Do not request or parse SCTs (default)"},
491 {"host", OPT_HOST, 's', "Use -connect instead"},
492 {"port", OPT_PORT, 'p', "Use -connect instead"},
501 {"unix", OPT_UNIX, 's', "Connect over the specified Unix-domain socket"},
503 {"4", OPT_4, '-', "Use IPv4 only"},
505 {"6", OPT_6, '-', "Use IPv6 only"},
516 {"fallback_scsv", OPT_FALLBACKSCSV, '-', "Send the fallback SCSV"},
524 {"build_chain", OPT_BUILD_CHAIN, '-', "Build client certificate chain"},
525 {"key", OPT_KEY, 's', "Private key file to use; default: -cert file"},
533 {"no-CAfile", OPT_NOCAFILE, '-',
535 {"no-CApath", OPT_NOCAPATH, '-',
537 {"no-CAstore", OPT_NOCASTORE, '-',
544 {"dane_ee_no_namechecks", OPT_DANE_EE_NO_NAME, '-',
545 "Disable name checks when matching DANE-EE(3) TLSA records"},
550 "Hostname to use for \"-starttls lmtp\", \"-starttls smtp\" or \"-starttls xmpp[-server]\""},
553 {"reconnect", OPT_RECONNECT, '-',
554 "Drop and re-make the connection with the same Session-ID"},
559 {"crlf", OPT_CRLF, '-', "Convert LF from terminal into CRLF"},
560 {"quiet", OPT_QUIET, '-', "No s_client output"},
561 {"ign_eof", OPT_IGN_EOF, '-', "Ignore input eof (default when -quiet)"},
562 {"no_ign_eof", OPT_NO_IGN_EOF, '-', "Don't ignore input eof"},
566 "Alias of -name option for \"-starttls xmpp[-server]\""},
567 {"brief", OPT_BRIEF, '-',
569 {"prexit", OPT_PREXIT, '-',
573 {"showcerts", OPT_SHOWCERTS, '-',
575 {"debug", OPT_DEBUG, '-', "Extra output"},
576 {"msg", OPT_MSG, '-', "Show protocol messages"},
578 "File to send output of -msg or -trace, instead of stdout"},
579 {"nbio_test", OPT_NBIO_TEST, '-', "More ssl protocol testing"},
580 {"state", OPT_STATE, '-', "Print the ssl states"},
585 {"security_debug", OPT_SECURITY_DEBUG, '-',
587 {"security_debug_verbose", OPT_SECURITY_DEBUG_VERBOSE, '-',
590 {"trace", OPT_TRACE, '-', "Show trace output of protocol messages"},
593 {"wdebug", OPT_WDEBUG, '-', "WATT-32 tcp debugging"},
596 {"nocommands", OPT_NOCMDS, '-', "Do not use interactive command letters"},
599 {"noservername", OPT_NOSERVERNAME, '-',
601 {"tlsextdebug", OPT_TLSEXTDEBUG, '-',
603 {"ignore_unexpected_eof", OPT_IGNORE_UNEXPECTED_EOF, '-',
606 {"status", OPT_STATUS, '-', "Request certificate status from server"},
609 "types Send empty ClientHello extensions (comma-separated numbers)"},
611 "Enable ALPN extension, considering named protocols supported (comma-separated list)"},
612 {"async", OPT_ASYNC, '-', "Support asynchronous operation"},
613 {"nbio", OPT_NBIO, '-', "Use non-blocking IO"},
617 {"ssl3", OPT_SSL3, '-', "Just use SSLv3"},
620 {"tls1", OPT_TLS1, '-', "Just use TLSv1"},
623 {"tls1_1", OPT_TLS1_1, '-', "Just use TLSv1.1"},
626 {"tls1_2", OPT_TLS1_2, '-', "Just use TLSv1.2"},
629 {"tls1_3", OPT_TLS1_3, '-', "Just use TLSv1.3"},
632 {"dtls", OPT_DTLS, '-', "Use any version of DTLS"},
633 {"timeout", OPT_TIMEOUT, '-',
638 {"dtls1", OPT_DTLS1, '-', "Just use DTLSv1"},
641 {"dtls1_2", OPT_DTLS1_2, '-', "Just use DTLSv1.2"},
644 {"sctp", OPT_SCTP, '-', "Use SCTP"},
645 {"sctp_label_bug", OPT_SCTP_LABEL_BUG, '-', "Enable SCTP label length bug"},
649 "Enable NPN extension, considering named protocols supported (comma-separated list)"},
652 {"enable_pha", OPT_ENABLE_PHA, '-', "Enable post-handshake-authentication"},
655 "Offer SRTP key management with a colon-separated profile list"},
660 {"srp_lateuser", OPT_SRP_LATEUSER, '-',
662 {"srp_moregroups", OPT_SRP_MOREGROUPS, '-',
672 {"crl_download", OPT_CRL_DOWNLOAD, '-', "Download CRL from distribution points"},
674 {"verify_return_error", OPT_VERIFY_RET_ERROR, '-',
676 {"verify_quiet", OPT_VERIFY_QUIET, '-', "Restrict verify output to errors"},
693 {"host:port", 0, 0, "Where to connect; same as -connect option"},
721 {"xmpp-server", PROTO_XMPP_SERVER},
770 "---\nPost-Handshake New Session Ticket arrived:\n"); in new_session_cb()
772 BIO_printf(bio_c_out, "---\n"); in new_session_cb()
822 int ret = 1, in_init = 1, i, nbio_test = 0, sock = -1, k, width, state = 0; in s_client_main()
894 /* Known false-positive of MemorySanitizer. */ in s_client_main()
938 BIO_printf(bio_err, "Cannot supply multiple protocol flags\n"); in s_client_main()
945 "Cannot supply both a protocol flag and '-no_<prot>'\n"); in s_client_main()
953 BIO_printf(bio_err, "%s: Use -help for summary.\n", prog); in s_client_main()
1467 /* Optional argument is connect string if -connect not used. */ in s_client_main()
1470 /* Don't allow -connect and a separate argument. */ in s_client_main()
1473 "%s: cannot provide both -connect option and target parameter\n", in s_client_main()
1486 BIO_printf(bio_err, "%s: Can't use both -4 and -6\n", prog); in s_client_main()
1492 "%s: Can't use -servername and -noservername together\n", in s_client_main()
1498 "%s: Can't use -dane_tlsa_domain and -noservername together\n", in s_client_main()
1506 BIO_printf(bio_err, "Cannot supply -nextprotoneg with TLSv1.3\n"); in s_client_main()
1522 "%s: -connect argument or target parameter malformed or ambiguous\n", in s_client_main()
1533 BIO_printf(bio_err, "%s: -proxy requires use of -connect or target parameter\n", prog); in s_client_main()
1560 "%s: -proxy argument malformed or ambiguous\n", prog); in s_client_main()
1571 "%s: -bind argument parameter malformed or ambiguous\n", in s_client_main()
1588 BIO_printf(bio_err, "Can't use -sctp without DTLS\n"); in s_client_main()
1597 next_proto.status = -1; in s_client_main()
1602 BIO_printf(bio_err, "Error parsing -nextprotoneg argument\n"); in s_client_main()
1850 BIO_printf(bio_err, "Error parsing -alpn argument\n"); in s_client_main()
2000 "least one -dane_tlsa_rrdata option.\n", prog); in s_client_main()
2012 "-dane_tlsa_domain option.\n", prog); in s_client_main()
2173 * have to handle multi-line responses which may come in a single in s_client_main()
2187 /* Wait for multi-line response to end from LMTP or SMTP */ in s_client_main()
2190 } while (mbuf_len > 3 && mbuf[3] == '-'); in s_client_main()
2199 * Wait for multi-line response to end LHLO LMTP or EHLO SMTP in s_client_main()
2206 } while (mbuf_len > 3 && mbuf[3] == '-'); in s_client_main()
2243 /* wait for multi-line CAPABILITY response */ in s_client_main()
2270 /* wait for multi-line response to end from FTP */ in s_client_main()
2298 (mbuf, "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'") in s_client_main()
2300 "<starttls xmlns=\"urn:ietf:params:xml:ns:xmpp-tls\"")) in s_client_main()
2310 "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>"); in s_client_main()
2342 /* Agree to issue START_TLS and send the FOLLOWS sub-command */ in s_client_main()
2346 /* Telnet server also sent the FOLLOWS sub-command */ in s_client_main()
2427 /* max-packet size */ in s_client_main()
2438 int pos; in s_client_main() local
2462 pos = 5; in s_client_main()
2465 if (pos >= bytes) { in s_client_main()
2468 } else if (packet[pos++] == '\0') { in s_client_main()
2474 if (pos + 15 > bytes) { in s_client_main()
2480 pos += 12; /* skip over conn id[4] + SALT[8] */ in s_client_main()
2481 if (packet[pos++] != '\0') { /* verify filler */ in s_client_main()
2488 if (!((packet[pos] + (packet[pos + 1] << 8)) & ssl_flg)) { in s_client_main()
2533 /* wait for multi-line CAPABILITIES response */ in s_client_main()
2570 /* wait for multi-line response to end from Sieve */ in s_client_main()
2575 * is case-insensitive, make it uppercase in s_client_main()
2602 * According to RFC 5804 § 2.2, response codes are case- in s_client_main()
2621 long errline = -1; in s_client_main()
2623 int result = -1; in s_client_main()
2661 BIO_write(sbio, atyp->value.sequence->data, in s_client_main()
2662 atyp->value.sequence->length); in s_client_main()
2708 /* Just keep trying - busy waiting */ in s_client_main()
2746 full_log--; in s_client_main()
2756 reconnect--; in s_client_main()
2774 * and EOF satisfies that. To avoid a CPU-hogging loop, in s_client_main()
2844 cbuf_len -= k; in s_client_main()
2899 /* This shouldn't ever happen in s_client - treat as an error */ in s_client_main()
2923 sbuf_len -= i; in s_client_main()
3008 for (j = i - 1; j >= 0; j--) { in s_client_main()
3011 lf_num--; in s_client_main()
3062 * result in a TCP-RST being sent. On some platforms (notably in s_client_main()
3066 * and then closing the socket sends TCP-FIN first followed by in s_client_main()
3067 * TCP-RST. This seems to allow the peer to read the alert data. in s_client_main()
3076 timeout.tv_usec = 500000; /* some extreme round-trip */ in s_client_main()
3153 BIO_printf(bio, "---\nCertificate chain\n"); in print_stuff()
3169 BIO_printf(bio, " v:NotBefore: "); in print_stuff()
3179 BIO_printf(bio, "---\n"); in print_stuff()
3210 BIO_printf(bio, "---\nSCTs present (%i)\n", sct_count); in print_stuff()
3214 BIO_printf(bio, "---\n"); in print_stuff()
3221 if (i < sct_count - 1) in print_stuff()
3222 BIO_printf(bio, "\n---\n"); in print_stuff()
3230 "---\nSSL handshake has read %ju bytes " in print_stuff()
3236 BIO_printf(bio, (SSL_session_reused(s) ? "---\nReused, " : "---\nNew, ")); in print_stuff()
3279 if (next_proto.status != -1) { in print_stuff()
3307 srtp_profile->name); in print_stuff()
3359 BIO_printf(bio, "---\n"); in print_stuff()
3394 int tag, xclass, inf, ret = -1; in ldap_ExtendedResponse_parse()
3429 (rem = end - cur, len > rem)) { in ldap_ExtendedResponse_parse()
3439 (rem = end - cur, len > rem)) { in ldap_ExtendedResponse_parse()
3447 rem = end - cur; in ldap_ExtendedResponse_parse()
3456 rem = end - cur; in ldap_ExtendedResponse_parse()
3459 (rem = end - cur, len > rem)) { in ldap_ExtendedResponse_parse()
3489 * Check DNS name syntax, any '-' or '.' must be internal, in is_dNS_name()
3490 * and on either side of each '.' we can't have a '-' or '.'. in is_dNS_name()
3511 if (i > 0 && i < length - 1) { in is_dNS_name()
3512 if (c == '-') { in is_dNS_name()
3523 && host[i - 1] != '-' in is_dNS_name()
3524 && host[i + 1] != '-') { in is_dNS_name()