xref: /netbsd-src/crypto/external/bsd/openssl/lib/libcrypto/man/OpenSSL_version.3 (revision 7d9ffdb3e9da593a05c5e2169f72fc7bada08bc9)
$NetBSD: OpenSSL_version.3,v 1.5 2024/09/08 13:08:27 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 "OpenSSL_version 3"
OpenSSL_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
OPENSSL_VERSION_MAJOR, OPENSSL_VERSION_MINOR, OPENSSL_VERSION_PATCH, OPENSSL_VERSION_PRE_RELEASE, OPENSSL_VERSION_BUILD_METADATA, OPENSSL_VERSION_TEXT, OPENSSL_VERSION_PREREQ, OPENSSL_version_major, OPENSSL_version_minor, OPENSSL_version_patch, OPENSSL_version_pre_release, OPENSSL_version_build_metadata, OpenSSL_version, OPENSSL_VERSION_NUMBER, OpenSSL_version_num, OPENSSL_info \- get OpenSSL version number and other information
SYNOPSIS
Header "SYNOPSIS" .Vb 1 #include <openssl/opensslv.h> \& #define OPENSSL_VERSION_MAJOR x #define OPENSSL_VERSION_MINOR y #define OPENSSL_VERSION_PATCH z \& /* The definitions here are typical release values */ #define OPENSSL_VERSION_PRE_RELEASE "" #define OPENSSL_VERSION_BUILD_METADATA "" \& #define OPENSSL_VERSION_TEXT "OpenSSL x.y.z xx XXX xxxx" \& #define OPENSSL_VERSION_PREREQ(maj,min) \& #include <openssl/crypto.h> \& unsigned int OPENSSL_version_major(void); unsigned int OPENSSL_version_minor(void); unsigned int OPENSSL_version_patch(void); const char *OPENSSL_version_pre_release(void); const char *OPENSSL_version_build_metadata(void); \& const char *OpenSSL_version(int t); \& const char *OPENSSL_info(int t); \& /* from openssl/opensslv.h */ #define OPENSSL_VERSION_NUMBER 0xnnnnnnnnL \& /* from openssl/crypto.h */ unsigned long OpenSSL_version_num(); .Ve
DESCRIPTION
Header "DESCRIPTION"
Macros
Subsection "Macros" The three macros OPENSSL_VERSION_MAJOR, OPENSSL_VERSION_MINOR and \fBOPENSSL_VERSION_PATCH represent the three parts of a version identifier, \f(BIMAJOR.\f(BIMINOR.\f(BIPATCH.

The macro OPENSSL_VERSION_PRE_RELEASE is an added bit of text that indicates that this is a pre-release version, such as "-dev" for an ongoing development snapshot or "-alpha3" for an alpha release. The value must be a string.

The macro OPENSSL_VERSION_BUILD_METADATA is extra information, reserved for other parties, such as "+fips", or "+vendor.1"). The OpenSSL project will not touch this macro (will leave it an empty string). The value must be a string.

\fBOPENSSL_VERSION_STR is a convenience macro to get the short version identifier string, "\f(CIMAJOR.\f(CIMINOR.\f(CIPATCH".

\fBOPENSSL_FULL_VERSION_STR is a convenience macro to get the longer version identifier string, which combines OPENSSL_VERSION_STR, \fBOPENSSL_VERSION_PRE_RELEASE and OPENSSL_VERSION_BUILD_METADATA.

\fBOPENSSL_VERSION_TEXT is a convenience macro to get a full descriptive version text, which includes OPENSSL_FULL_VERSION_STR and the release date.

\fBOPENSSL_VERSION_PREREQ is a useful macro for checking whether the OpenSSL version for the headers in use is at least at the given pre-requisite major (maj) and minor (min) number or not. It will evaluate to true if the header version number (OPENSSL_VERSION_MAJOR.OPENSSL_VERSION_MINOR) is greater than or equal to maj.min.

\fBOPENSSL_VERSION_NUMBER is a combination of the major, minor and patch version into a single integer 0xMNN00PP0L, where:

M 4
Item "M" is the number from OPENSSL_VERSION_MAJOR, in hexadecimal notation
NN 4
Item "NN" is the number from OPENSSL_VERSION_MINOR, in hexadecimal notation
PP 4
Item "PP" is the number from OPENSSL_VERSION_PATCH, in hexadecimal notation
Functions
Subsection "Functions" \fBOPENSSL_version_major(), OPENSSL_version_minor(), OPENSSL_version_patch(), \fBOPENSSL_version_pre_release(), and OPENSSL_version_build_metadata() return the values of the macros above for the build of the library, respectively.

\fBOpenSSL_version() returns different strings depending on t:

OPENSSL_VERSION 4
Item "OPENSSL_VERSION" The value of OPENSSL_VERSION_TEXT
OPENSSL_VERSION_STRING 4
Item "OPENSSL_VERSION_STRING" The value of OPENSSL_VERSION_STR
OPENSSL_FULL_VERSION_STRING 4
Item "OPENSSL_FULL_VERSION_STRING" The value of OPENSSL_FULL_VERSION_STR
OPENSSL_CFLAGS 4
Item "OPENSSL_CFLAGS" The compiler flags set for the compilation process in the form \f(CW\*(C`compiler: ...\*(C' if available, or \*(C`compiler: information not available\*(C' otherwise.
OPENSSL_BUILT_ON 4
Item "OPENSSL_BUILT_ON" The date of the build process in the form \*(C`built on: ...\*(C' if available or \*(C`built on: date not available\*(C' otherwise. The date would not be available in a reproducible build, for example.
OPENSSL_PLATFORM 4
Item "OPENSSL_PLATFORM" The "Configure" target of the library build in the form \*(C`platform: ...\*(C' if available, or \*(C`platform: information not available\*(C' otherwise.
OPENSSL_DIR 4
Item "OPENSSL_DIR" The OPENSSLDIR setting of the library build in the form \*(C`OPENSSLDIR: "..."\*(C' if available, or \*(C`OPENSSLDIR: N/A\*(C' otherwise.
OPENSSL_ENGINES_DIR 4
Item "OPENSSL_ENGINES_DIR" The ENGINESDIR setting of the library build in the form \*(C`ENGINESDIR: "..."\*(C' if available, or \*(C`ENGINESDIR: N/A\*(C' otherwise. This option is deprecated in OpenSSL 3.0.
OPENSSL_MODULES_DIR 4
Item "OPENSSL_MODULES_DIR" The MODULESDIR setting of the library build in the form \*(C`MODULESDIR: "..."\*(C' if available, or \*(C`MODULESDIR: N/A\*(C' otherwise.
OPENSSL_CPU_INFO 4
Item "OPENSSL_CPU_INFO" The current OpenSSL cpu settings. This is the current setting of the cpu capability flags. It is usually automatically configured but may be set via an environment variable. The value has the same syntax as the environment variable. For x86 the string looks like \*(C`CPUINFO: OPENSSL_ia32cap=0x123:0x456\*(C' or \*(C`CPUINFO: N/A\*(C' if not available.

For an unknown t, the text \*(C`not available\*(C' is returned.

\fBOPENSSL_info() also returns different strings depending on t:

OPENSSL_INFO_CONFIG_DIR 4
Item "OPENSSL_INFO_CONFIG_DIR" The configured \*(C`OPENSSLDIR\*(C', which is the default location for OpenSSL configuration files.
OPENSSL_INFO_ENGINES_DIR 4
Item "OPENSSL_INFO_ENGINES_DIR" The configured \*(C`ENGINESDIR\*(C', which is the default location for OpenSSL engines.
OPENSSL_INFO_MODULES_DIR 4
Item "OPENSSL_INFO_MODULES_DIR" The configured \*(C`MODULESDIR\*(C', which is the default location for dynamically loadable OpenSSL modules other than engines.
OPENSSL_INFO_DSO_EXTENSION 4
Item "OPENSSL_INFO_DSO_EXTENSION" The configured dynamically loadable module extension.
OPENSSL_INFO_DIR_FILENAME_SEPARATOR 4
Item "OPENSSL_INFO_DIR_FILENAME_SEPARATOR" The separator between a directory specification and a filename. Note that on some operating systems, this is not the same as the separator between directory elements.
OPENSSL_INFO_LIST_SEPARATOR 4
Item "OPENSSL_INFO_LIST_SEPARATOR" The OpenSSL list separator. This is typically used in strings that are lists of items, such as the value of the environment variable $PATH on Unix (where the separator is \*(C`:\*(C') or \*(C`%PATH%\*(C' on Windows (where the separator is \f(CW\*(C`;\*(C').
OPENSSL_INFO_CPU_SETTINGS 4
Item "OPENSSL_INFO_CPU_SETTINGS" The current OpenSSL cpu settings. This is the current setting of the cpu capability flags. It is usually automatically configured but may be set via an environment variable. The value has the same syntax as the environment variable. For x86 the string looks like \*(C`OPENSSL_ia32cap=0x123:0x456\*(C'.

For an unknown t, NULL is returned.

\fBOpenSSL_version_num() returns the value of OPENSSL_VERSION_NUMBER.

"RETURN VALUES"
Header "RETURN VALUES" \fBOPENSSL_version_major(), OPENSSL_version_minor() and OPENSSL_version_patch() return the version number parts as integers.

\fBOPENSSL_version_pre_release() and OPENSSL_version_build_metadata() return the values of OPENSSL_VERSION_PRE_RELEASE and \fBOPENSSL_VERSION_BUILD_METADATA respectively as constant strings. For any of them that is undefined, the empty string is returned.

\fBOpenSSL_version() returns constant strings.

"SEE ALSO"
Header "SEE ALSO" \fBcrypto\|(7)
HISTORY
Header "HISTORY" The macros and functions described here were added in OpenSSL 3.0, except for OPENSSL_VERSION_NUMBER and OpenSSL_version_num().
COPYRIGHT
Header "COPYRIGHT" Copyright 2018-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>.