GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SSL_GET_VERSION(3) FreeBSD Library Functions Manual SSL_GET_VERSION(3)

SSL_get_version, SSL_is_dtls, SSL_versionget the protocol information of a connection

#include <openssl/ssl.h>

const char *
SSL_get_version(const SSL *ssl);

int
SSL_is_dtls(const SSL *ssl);

int
SSL_version(const SSL *ssl);

() returns the name of the protocol used for the connection ssl.

() returns 1 if the connection is using DTLS, 0 if not.

() returns an integer constant representing that protocol.

These functions only return reliable results after the initial handshake has been completed.

The following strings or integers can be returned by SSL_get_version() and SSL_version():

"TLSv1" or TLS1_VERSION
The connection uses the TLSv1.0 protocol.
"TLSv1.1" or TLS1_1_VERSION
The connection uses the TLSv1.1 protocol.
"TLSv1.2" or TLS1_2_VERSION
The connection uses the TLSv1.2 protocol.
"TLSv1.3" or TLS1_3_VERSION
The connection uses the TLSv1.3 protocol.
"DTLSv1" or DTLS1_VERSION
The connection uses the Datagram Transport Layer Security 1.0 protocol.
"DTLSv1.2" or DTLS1_2_VERSION
The connection uses the Datagram Transport Layer Security 1.2 protocol.
"unknown"
This indicates an unknown protocol version; it cannot currently happen with LibreSSL.

SSL_is_dtls() returns 1 if the connection uses DTLS, 0 if not.

ssl(3)

SSL_get_version() and SSL_version() first appeared in SSLeay 0.8.0 and have been available since OpenBSD 2.4.

SSL_is_dtls() first appeared in OpenSSL 1.1.0 and has been available since OpenBSD 6.9.

April 15, 2021 FreeBSD 14.3-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.