Commit 3db935a9 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

add SSL_CONF functions and documentation

parent 63d103ea
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4,6 +4,10 @@

 Changes between 1.0.x and 1.1.0  [xx XXX xxxx]

  *) New experimental SSL_CONF* functions. These provide a common framework
     for application configuration using configuration files or command lines.
     [Steve Henson]

  *) New functions to check a hostname email or IP address against a
     certificate. Add options to s_client, s_server and x509 utilities
     to print results of checks against a certificate.
+39 −0
Original line number Diff line number Diff line
=pod

=head1 NAME

SSL_CONF_CTX_new, SSL_CONF_CTX_free - SSL configuration allocation functions

=head1 SYNOPSIS

 #include <openssl/ssl.h>

 SSL_CONF_CTX *SSL_CONF_CTX_new(void);
 void SSL_CONF_CTX_free(SSL_CONF_CTX *cctx);

=head1 DESCRIPTION

The function SSL_CONF_CTX_new() allocates and initialised an B<SSL_CONF_CTX>
structure for use with the SSL_CONF functions.

The function SSL_CONF_CTX_free() frees up the context B<cctx>.

=head1 RETURN VALUES

SSL_CONF_CTX_new() returns either the newly allocated B<SSL_CONF_CTX> structure
or B<NULL> if an error occurs.

SSL_CONF_CTX_free() does not return a value.

=head1 SEE ALSO

L<SSL_CONF_CTX_set_flags(3)|SSL_CONF_CTX_set_flags(3)>,
L<SSL_CONF_CTX_set_ssl_ctx(3)|SSL_CONF_CTX_set_ssl_ctx(3)>,
L<SSL_CONF_cmd(3)|SSL_CONF_cmd(3)>,
L<SSL_CONF_cmd_argv(3)|SSL_CONF_cmd_argv(3)>

=head1 HISTORY

These functions were first added to OpenSSL 1.1.0

=cut
+48 −0
Original line number Diff line number Diff line
=pod

=head1 NAME

SSL_CONF_CTX_set1_prefix - Set configuration context command prefix

=head1 SYNOPSIS

 #include <openssl/ssl.h>

 unsigned int SSL_CONF_CTX_set1_prefix(SSL_CONF_CTX *cctx, const char *prefix);

=head1 DESCRIPTION

The function SSL_CONF_CTX_set1_prefix() sets the command prefix of B<cctx>
to B<prefix>. If B<prefix> is B<NULL> it is restored to the default value.

=head1 NOTES

Command prefixes alter the commands recognised by subsequent SSL_CTX_cmd()
calls. For example for files if the prefix "SSL" is set then command names
such as "SSLProtocol", "SSLOptions" etc are recognised instead of "Protocol"
and "Options". Similarly for command lines if the prefix is "--ssl-" then 
"--ssl-no_tls1_2" is recognised instead of "-no_tls1_2".

If the B<SSL_CONF_FLAG_CMDLINE> flag is set then prefix checks are case
sensitive and "-" is the default. In the unlikely even an application
explicitly wants to set no prefix it must be explicitly set to "".

If the B<SSL_CONF_FLAG_FILE> flag is set then prefix checks are case
insensitive and no prefix is the default.

=head1 RETURN VALUES

SSL_CONF_CTX_set1_prefix() returns 1 for success and 0 for failure.

=head1 SEE ALSO

L<SSL_CONF_CTX_new(3)|SSL_CONF_CTX_new(3)>,
L<SSL_CONF_CTX_set_ssl_ctx(3)|SSL_CONF_CTX_set_ssl_ctx(3)>,
L<SSL_CONF_cmd(3)|SSL_CONF_cmd(3)>,
L<SSL_CONF_cmd_argv(3)|SSL_CONF_cmd_argv(3)>

=head1 HISTORY

These functions were first added to OpenSSL 1.1.0

=cut
+61 −0
Original line number Diff line number Diff line
=pod

=head1 NAME

SSL_CONF_CTX_set_flags, SSL_CONF_CTX_clear_flags - Set of clear SSL configuration context flags

=head1 SYNOPSIS

 #include <openssl/ssl.h>

 unsigned int SSL_CONF_CTX_set_flags(SSL_CONF_CTX *cctx, unsigned int flags);
 unsigned int SSL_CONF_CTX_clear_flags(SSL_CONF_CTX *cctx, unsigned int flags);

=head1 DESCRIPTION

The function SSL_CONF_CTX_set_flags() sets B<flags> in the context B<cctx>.

The function SSL_CONF_CTX_clear_flags() clears B<flags> in the context B<cctx>.

=head1 NOTES

The flags how subsequent calls to SSL_CONF_set_cmd() or SSL_CONF_set_argv()
behave.

Currently the following B<flags> values are recognised:

=over 4

=item SSL_CONF_FLAG_FLAG_CMDLINE, SSL_CONF_FLAG_FLAG_FILE

recognise options intended for command line or configuration file use. At
least one of these flags must be set.

=item SSL_CONF_FLAG_CLIENT, SSL_CONF_FLAG_SERVER

recognise options intended for use in SSL/TLS clients or servers. One or
both of these flags must be set.

=item SSL_CONF_FLAG_SHOW_ERRORS

indicate errors relating to unrecognised options or missing arguments in
the error queue. If this option isn't set such errors are only reflected
in the return values of SSL_CONF_set_cmd() or SSL_CONF_set_argv()

=head1 RETURN VALUES

SSL_CONF_CTX_set_flags() and SSL_CONF_CTX_clear_flags() returns the new flags
value after setting or clearing flags.

=head1 SEE ALSO

L<SSL_CONF_CTX_new(3)|SSL_CONF_CTX_new(3)>,
L<SSL_CONF_CTX_set_ssl_ctx(3)|SSL_CONF_CTX_set_ssl_ctx(3)>,
L<SSL_CONF_cmd(3)|SSL_CONF_cmd(3)>,
L<SSL_CONF_cmd_argv(3)|SSL_CONF_cmd_argv(3)>

=head1 HISTORY

These functions were first added to OpenSSL 1.1.0

=cut
+47 −0
Original line number Diff line number Diff line
=pod

=head1 NAME

SSL_CONF_CTX_set_ssl_ctx, SSL_CONF_CTX_set_ssl - set context to configure

=head1 SYNOPSIS

 #include <openssl/ssl.h>

 void SSL_CONF_CTX_set_ssl_ctx(SSL_CONF_CTX *cctx, SSL_CTX *ctx);
 void SSL_CONF_CTX_set_ssl(SSL_CONF_CTX *cctx, SSL *ssl);

=head1 DESCRIPTION

SSL_CONF_CTX_set_ssl_ctx() sets the context associated with B<cctx> to the
B<SSL_CTX> structure B<ctx>. Any previos B<SSL> or B<SSL_CTX> associated with
B<cctx> is cleared. Subsequent calls to SSL_CONF_cmd() will be sent to
B<ctx>.

SSL_CONF_CTX_set_ssl() sets the context associated with B<cctx> to the
B<SSL> structure B<ssl>. Any previos B<SSL> or B<SSL_CTX> associated with
B<cctx> is cleared. Subsequent calls to SSL_CONF_cmd() will be sent to
B<ssl>.

=head1 NOTES

The context need not be set or it can be set to B<NULL> in which case only
syntax checking of commands is performed, where possible.

=head1 RETURN VALUES

SSL_CONF_CTX_set_ssl_ctx() and SSL_CTX_set_ssl() do not return a value.

=head1 SEE ALSO

L<SSL_CONF_CTX_new(3)|SSL_CONF_CTX_new(3)>,
L<SSL_CONF_CTX_set_flags(3)|SSL_CONF_CTX_set_flags(3)>,
L<SSL_CONF_CTX_set1_prefix(3)|SSL_CONF_CTX_set1_prefix(3)>,
L<SSL_CONF_cmd(3)|SSL_CONF_cmd(3)>,
L<SSL_CONF_cmd_argv(3)|SSL_CONF_cmd_argv(3)>

=head1 HISTORY

These functions were first added to OpenSSL 1.1.0

=cut
Loading