}
}
argc = opt_num_rest();
- if (argc != 0)
+ if (argc == 1) {
+ /* If there's a positional argument, it's the equivalent of
+ * OPT_CONNECT.
+ * Don't allow -connect and a separate argument.
+ */
+ if (connectstr != NULL) {
+ BIO_printf(bio_err,
+ "%s: must not provide both -connect option and target parameter\n",
+ prog);
+ goto opthelp;
+ }
+ connect_type = use_inet;
+ connectstr = *opt_rest();
+ } else if (argc != 0) {
goto opthelp;
+ }
#ifndef OPENSSL_NO_NEXTPROTONEG
if (min_version == TLS1_3_VERSION && next_proto_neg_in != NULL) {
int res;
char *tmp_host = host, *tmp_port = port;
if (connectstr == NULL) {
- BIO_printf(bio_err, "%s: -proxy requires use of -connect\n", prog);
+ BIO_printf(bio_err, "%s: -proxy requires use of -connect or target parameter\n", prog);
goto opthelp;
}
res = BIO_parse_hostserv(proxystr, &host, &port, BIO_PARSE_PRIO_HOST);
OPENSSL_free(tmp_port);
if (!res) {
BIO_printf(bio_err,
- "%s: -connect argument malformed or ambiguous\n",
+ "%s: -connect argument or target parameter malformed or ambiguous\n",
prog);
goto end;
}
[B<-ctlogfile>]
[B<-keylogfile file>]
[B<-early_data file>]
+[B<target>]
=head1 DESCRIPTION
=item B<-connect host:port>
-This specifies the host and optional port to connect to. If not specified
-then an attempt is made to connect to the local host on port 4433.
+This specifies the host and optional port to connect to. It is possible to
+select the host and port using the optional target positional argument instead.
+If neither this nor the target positonal argument are specified then an attempt
+is made to connect to the local host on port 4433.
=item B<-proxy host:port>
to the server. This will only work with resumed sessions that support early
data and when the server accepts the early data.
+=item B<[target]>
+
+Rather than providing B<-connect>, the target hostname and optional port may
+be provided as a single positional argument after all options. If neither this
+nor B<-connect> are provided, falls back to attempting to connect to localhost
+on port 4433.
+
=back
=head1 CONNECTED COMMANDS
L<SSL_CONF_cmd(3)>, L<sess_id(1)>, L<s_server(1)>, L<ciphers(1)>,
L<SSL_CTX_set_max_send_fragment(3)>, L<SSL_CTX_set_split_send_fragment(3)>
-L<SSL_CTX_set_max_pipelines(3)>
+L<SSL_CTX_set_max_pipelines(3)>
=head1 HISTORY