xref: /netbsd-src/crypto/external/bsd/openssl/lib/libcrypto/man/SSL_CTX_set_ssl_version.3 (revision 7d9ffdb3e9da593a05c5e2169f72fc7bada08bc9)
$NetBSD: SSL_CTX_set_ssl_version.3,v 1.25 2024/09/08 13:08:33 christos Exp $

-*- mode: troff; coding: utf-8 -*-
Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)

Standard preamble:
========================================================================
..
..
.. \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
. ds C` "" . ds C' "" 'br\} . ds C` . ds C' 'br\}
Escape single quotes in literal strings from groff's Unicode transform.

If the F register is >0, we'll generate index entries on stderr for
titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
entries marked with X<> in POD. Of course, you'll have to process the
output yourself in some meaningful fashion.

Avoid warning from groff about undefined register 'F'.
.. .nr rF 0 . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF ========================================================================

Title "SSL_CTX_set_ssl_version 3"
SSL_CTX_set_ssl_version 3 2024-09-03 3.0.15 OpenSSL
For nroff, turn off justification. Always turn off hyphenation; it makes
way too many mistakes in technical documents.
NAME
SSL_CTX_set_ssl_version, SSL_CTX_get_ssl_method, SSL_set_ssl_method, SSL_get_ssl_method \- choose a new TLS/SSL method
SYNOPSIS
Header "SYNOPSIS" .Vb 1 #include <openssl/ssl.h> \& int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *method); const SSL_METHOD *SSL_CTX_get_ssl_method(const SSL_CTX *ctx); \& int SSL_set_ssl_method(SSL *s, const SSL_METHOD *method); const SSL_METHOD *SSL_get_ssl_method(const SSL *ssl); .Ve
DESCRIPTION
Header "DESCRIPTION" \fBSSL_CTX_set_ssl_version() sets a new default TLS/SSL method for SSL objects newly created from this ctx. Most of the configuration attached to the SSL_CTX object is retained, with the exception of the configured TLS ciphers, which are reset to the default values. SSL objects already created from this SSL_CTX with SSL_new\|(3) are not affected, except when SSL_clear\|(3) is being called, as described below.

\fBSSL_CTX_get_ssl_method() returns the SSL_METHOD which was used to construct the SSL_CTX.

\fBSSL_set_ssl_method() sets a new TLS/SSL method for a particular ssl object. It may be reset, when SSL_clear() is called.

\fBSSL_get_ssl_method() returns a pointer to the TLS/SSL method set in ssl.

NOTES
Header "NOTES" The available method choices are described in \fBSSL_CTX_new\|(3).

When SSL_clear\|(3) is called and no session is connected to an SSL object, the method of the SSL object is reset to the method currently set in the corresponding SSL_CTX object.

\fBSSL_CTX_set_version() has unusual semantics and no clear use case; it would usually be preferable to create a new SSL_CTX object than to try to reuse an existing one in this fashion. Its usage is considered deprecated.

"RETURN VALUES"
Header "RETURN VALUES" The following return values can occur for SSL_CTX_set_ssl_version() and SSL_set_ssl_method():
0 4
The new choice failed, check the error stack to find out the reason.
1 4
Item "1" The operation succeeded.

\fBSSL_CTX_get_ssl_method() and SSL_get_ssl_method() always return non-NULL pointers.

"SEE ALSO"
Header "SEE ALSO" \fBSSL_CTX_new\|(3), SSL_new\|(3), \fBSSL_clear\|(3), ssl\|(7), \fBSSL_set_connect_state\|(3)
HISTORY
Header "HISTORY" \fBSSL_CTX_set_ssl_version() was deprecated in OpenSSL 3.0.
COPYRIGHT
Header "COPYRIGHT" Copyright 2000-2022 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.