OpenSSL_version.3ossl 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. .\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
  2. .\"
  3. .\" Standard preamble:
  4. .\" ========================================================================
  5. .de Sp \" Vertical space (when we can't use .PP)
  6. .if t .sp .5v
  7. .if n .sp
  8. ..
  9. .de Vb \" Begin verbatim text
  10. .ft CW
  11. .nf
  12. .ne \\$1
  13. ..
  14. .de Ve \" End verbatim text
  15. .ft R
  16. .fi
  17. ..
  18. .\" Set up some character translations and predefined strings. \*(-- will
  19. .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
  20. .\" double quote, and \*(R" will give a right double quote. \*(C+ will
  21. .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
  22. .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
  23. .\" nothing in troff, for use with C<>.
  24. .tr \(*W-
  25. .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
  26. .ie n \{\
  27. . ds -- \(*W-
  28. . ds PI pi
  29. . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
  30. . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
  31. . ds L" ""
  32. . ds R" ""
  33. . ds C` ""
  34. . ds C' ""
  35. 'br\}
  36. .el\{\
  37. . ds -- \|\(em\|
  38. . ds PI \(*p
  39. . ds L" ``
  40. . ds R" ''
  41. . ds C`
  42. . ds C'
  43. 'br\}
  44. .\"
  45. .\" Escape single quotes in literal strings from groff's Unicode transform.
  46. .ie \n(.g .ds Aq \(aq
  47. .el .ds Aq '
  48. .\"
  49. .\" If the F register is >0, we'll generate index entries on stderr for
  50. .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
  51. .\" entries marked with X<> in POD. Of course, you'll have to process the
  52. .\" output yourself in some meaningful fashion.
  53. .\"
  54. .\" Avoid warning from groff about undefined register 'F'.
  55. .de IX
  56. ..
  57. .nr rF 0
  58. .if \n(.g .if rF .nr rF 1
  59. .if (\n(rF:(\n(.g==0)) \{\
  60. . if \nF \{\
  61. . de IX
  62. . tm Index:\\$1\t\\n%\t"\\$2"
  63. ..
  64. . if !\nF==2 \{\
  65. . nr % 0
  66. . nr F 2
  67. . \}
  68. . \}
  69. .\}
  70. .rr rF
  71. .\"
  72. .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
  73. .\" Fear. Run. Save yourself. No user-serviceable parts.
  74. . \" fudge factors for nroff and troff
  75. .if n \{\
  76. . ds #H 0
  77. . ds #V .8m
  78. . ds #F .3m
  79. . ds #[ \f1
  80. . ds #] \fP
  81. .\}
  82. .if t \{\
  83. . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
  84. . ds #V .6m
  85. . ds #F 0
  86. . ds #[ \&
  87. . ds #] \&
  88. .\}
  89. . \" simple accents for nroff and troff
  90. .if n \{\
  91. . ds ' \&
  92. . ds ` \&
  93. . ds ^ \&
  94. . ds , \&
  95. . ds ~ ~
  96. . ds /
  97. .\}
  98. .if t \{\
  99. . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
  100. . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
  101. . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
  102. . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
  103. . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
  104. . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
  105. .\}
  106. . \" troff and (daisy-wheel) nroff accents
  107. .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
  108. .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
  109. .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
  110. .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
  111. .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
  112. .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
  113. .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
  114. .ds ae a\h'-(\w'a'u*4/10)'e
  115. .ds Ae A\h'-(\w'A'u*4/10)'E
  116. . \" corrections for vroff
  117. .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
  118. .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
  119. . \" for low resolution devices (crt and lpr)
  120. .if \n(.H>23 .if \n(.V>19 \
  121. \{\
  122. . ds : e
  123. . ds 8 ss
  124. . ds o a
  125. . ds d- d\h'-1'\(ga
  126. . ds D- D\h'-1'\(hy
  127. . ds th \o'bp'
  128. . ds Th \o'LP'
  129. . ds ae ae
  130. . ds Ae AE
  131. .\}
  132. .rm #[ #] #H #V #F C
  133. .\" ========================================================================
  134. .\"
  135. .IX Title "OPENSSL_VERSION 3ossl"
  136. .TH OPENSSL_VERSION 3ossl "2024-09-03" "3.3.2" "OpenSSL"
  137. .\" For nroff, turn off justification. Always turn off hyphenation; it makes
  138. .\" way too many mistakes in technical documents.
  139. .if n .ad l
  140. .nh
  141. .SH "NAME"
  142. OPENSSL_VERSION_MAJOR, OPENSSL_VERSION_MINOR, OPENSSL_VERSION_PATCH,
  143. OPENSSL_VERSION_PRE_RELEASE, OPENSSL_VERSION_BUILD_METADATA,
  144. OPENSSL_VERSION_TEXT, OPENSSL_VERSION_PREREQ, OPENSSL_version_major,
  145. OPENSSL_version_minor, OPENSSL_version_patch, OPENSSL_version_pre_release,
  146. OPENSSL_version_build_metadata, OpenSSL_version, OPENSSL_VERSION_NUMBER,
  147. OpenSSL_version_num, OPENSSL_info
  148. \&\- get OpenSSL version number and other information
  149. .SH "SYNOPSIS"
  150. .IX Header "SYNOPSIS"
  151. .Vb 1
  152. \& #include <openssl/opensslv.h>
  153. \&
  154. \& #define OPENSSL_VERSION_MAJOR x
  155. \& #define OPENSSL_VERSION_MINOR y
  156. \& #define OPENSSL_VERSION_PATCH z
  157. \&
  158. \& /* The definitions here are typical release values */
  159. \& #define OPENSSL_VERSION_PRE_RELEASE ""
  160. \& #define OPENSSL_VERSION_BUILD_METADATA ""
  161. \&
  162. \& #define OPENSSL_VERSION_TEXT "OpenSSL x.y.z xx XXX xxxx"
  163. \&
  164. \& #define OPENSSL_VERSION_PREREQ(maj,min)
  165. \&
  166. \& #include <openssl/crypto.h>
  167. \&
  168. \& unsigned int OPENSSL_version_major(void);
  169. \& unsigned int OPENSSL_version_minor(void);
  170. \& unsigned int OPENSSL_version_patch(void);
  171. \& const char *OPENSSL_version_pre_release(void);
  172. \& const char *OPENSSL_version_build_metadata(void);
  173. \&
  174. \& const char *OpenSSL_version(int t);
  175. \&
  176. \& const char *OPENSSL_info(int t);
  177. \&
  178. \& /* from openssl/opensslv.h */
  179. \& #define OPENSSL_VERSION_NUMBER 0xnnnnnnnnL
  180. \&
  181. \& /* from openssl/crypto.h */
  182. \& unsigned long OpenSSL_version_num();
  183. .Ve
  184. .SH "DESCRIPTION"
  185. .IX Header "DESCRIPTION"
  186. .SS "Macros"
  187. .IX Subsection "Macros"
  188. The three macros \fB\s-1OPENSSL_VERSION_MAJOR\s0\fR, \fB\s-1OPENSSL_VERSION_MINOR\s0\fR and
  189. \&\fB\s-1OPENSSL_VERSION_PATCH\s0\fR represent the three parts of a version
  190. identifier, \fB\f(BI\s-1MAJOR\s0\fB.\f(BI\s-1MINOR\s0\fB.\f(BI\s-1PATCH\s0\fB\fR.
  191. .PP
  192. The macro \fB\s-1OPENSSL_VERSION_PRE_RELEASE\s0\fR is an added bit of text that
  193. indicates that this is a pre-release version, such as \f(CW"\-dev"\fR for an
  194. ongoing development snapshot or \f(CW"\-alpha3"\fR for an alpha release.
  195. The value must be a string.
  196. .PP
  197. The macro \fB\s-1OPENSSL_VERSION_BUILD_METADATA\s0\fR is extra information, reserved
  198. for other parties, such as \f(CW"+fips"\fR, or \f(CW"+vendor.1"\fR).
  199. The OpenSSL project will not touch this macro (will leave it an empty string).
  200. The value must be a string.
  201. .PP
  202. \&\fB\s-1OPENSSL_VERSION_STR\s0\fR is a convenience macro to get the short version
  203. identifier string, \f(CW"\f(CIMAJOR\f(CW.\f(CIMINOR\f(CW.\f(CIPATCH\f(CW"\fR.
  204. .PP
  205. \&\fB\s-1OPENSSL_FULL_VERSION_STR\s0\fR is a convenience macro to get the longer
  206. version identifier string, which combines \fB\s-1OPENSSL_VERSION_STR\s0\fR,
  207. \&\fB\s-1OPENSSL_VERSION_PRE_RELEASE\s0\fR and \fB\s-1OPENSSL_VERSION_BUILD_METADATA\s0\fR.
  208. .PP
  209. \&\fB\s-1OPENSSL_VERSION_TEXT\s0\fR is a convenience macro to get a full descriptive
  210. version text, which includes \fB\s-1OPENSSL_FULL_VERSION_STR\s0\fR and the release
  211. date.
  212. .PP
  213. \&\fB\s-1OPENSSL_VERSION_PREREQ\s0\fR is a useful macro for checking whether the OpenSSL
  214. version for the headers in use is at least at the given pre-requisite major
  215. (\fBmaj\fR) and minor (\fBmin\fR) number or not. It will evaluate to true if the
  216. header version number (\fB\s-1OPENSSL_VERSION_MAJOR\s0\fR.\fB\s-1OPENSSL_VERSION_MINOR\s0\fR) is
  217. greater than or equal to \fBmaj\fR.\fBmin\fR.
  218. .PP
  219. \&\fB\s-1OPENSSL_VERSION_NUMBER\s0\fR is a combination of the major, minor and
  220. patch version into a single integer 0xMNN00PP0L, where:
  221. .IP "M" 4
  222. .IX Item "M"
  223. is the number from \fB\s-1OPENSSL_VERSION_MAJOR\s0\fR, in hexadecimal notation
  224. .IP "\s-1NN\s0" 4
  225. .IX Item "NN"
  226. is the number from \fB\s-1OPENSSL_VERSION_MINOR\s0\fR, in hexadecimal notation
  227. .IP "\s-1PP\s0" 4
  228. .IX Item "PP"
  229. is the number from \fB\s-1OPENSSL_VERSION_PATCH\s0\fR, in hexadecimal notation
  230. .SS "Functions"
  231. .IX Subsection "Functions"
  232. \&\fBOPENSSL_version_major()\fR, \fBOPENSSL_version_minor()\fR, \fBOPENSSL_version_patch()\fR,
  233. \&\fBOPENSSL_version_pre_release()\fR, and \fBOPENSSL_version_build_metadata()\fR return
  234. the values of the macros above for the build of the library, respectively.
  235. .PP
  236. \&\fBOpenSSL_version()\fR returns different strings depending on \fIt\fR:
  237. .IP "\s-1OPENSSL_VERSION\s0" 4
  238. .IX Item "OPENSSL_VERSION"
  239. The value of \fB\s-1OPENSSL_VERSION_TEXT\s0\fR
  240. .IP "\s-1OPENSSL_VERSION_STRING\s0" 4
  241. .IX Item "OPENSSL_VERSION_STRING"
  242. The value of \fB\s-1OPENSSL_VERSION_STR\s0\fR
  243. .IP "\s-1OPENSSL_FULL_VERSION_STRING\s0" 4
  244. .IX Item "OPENSSL_FULL_VERSION_STRING"
  245. The value of \fB\s-1OPENSSL_FULL_VERSION_STR\s0\fR
  246. .IP "\s-1OPENSSL_CFLAGS\s0" 4
  247. .IX Item "OPENSSL_CFLAGS"
  248. The compiler flags set for the compilation process in the form
  249. \&\f(CW\*(C`compiler: ...\*(C'\fR if available, or \f(CW\*(C`compiler: information not available\*(C'\fR
  250. otherwise.
  251. .IP "\s-1OPENSSL_BUILT_ON\s0" 4
  252. .IX Item "OPENSSL_BUILT_ON"
  253. The date of the build process in the form \f(CW\*(C`built on: ...\*(C'\fR if available
  254. or \f(CW\*(C`built on: date not available\*(C'\fR otherwise.
  255. The date would not be available in a reproducible build, for example.
  256. .IP "\s-1OPENSSL_PLATFORM\s0" 4
  257. .IX Item "OPENSSL_PLATFORM"
  258. The \*(L"Configure\*(R" target of the library build in the form \f(CW\*(C`platform: ...\*(C'\fR
  259. if available, or \f(CW\*(C`platform: information not available\*(C'\fR otherwise.
  260. .IP "\s-1OPENSSL_DIR\s0" 4
  261. .IX Item "OPENSSL_DIR"
  262. The \fB\s-1OPENSSLDIR\s0\fR setting of the library build in the form \f(CW\*(C`OPENSSLDIR: "..."\*(C'\fR
  263. if available, or \f(CW\*(C`OPENSSLDIR: N/A\*(C'\fR otherwise.
  264. .IP "\s-1OPENSSL_ENGINES_DIR\s0" 4
  265. .IX Item "OPENSSL_ENGINES_DIR"
  266. The \fB\s-1ENGINESDIR\s0\fR setting of the library build in the form \f(CW\*(C`ENGINESDIR: "..."\*(C'\fR
  267. if available, or \f(CW\*(C`ENGINESDIR: N/A\*(C'\fR otherwise. This option is deprecated in
  268. OpenSSL 3.0.
  269. .IP "\s-1OPENSSL_MODULES_DIR\s0" 4
  270. .IX Item "OPENSSL_MODULES_DIR"
  271. The \fB\s-1MODULESDIR\s0\fR setting of the library build in the form \f(CW\*(C`MODULESDIR: "..."\*(C'\fR
  272. if available, or \f(CW\*(C`MODULESDIR: N/A\*(C'\fR otherwise.
  273. .IP "\s-1OPENSSL_CPU_INFO\s0" 4
  274. .IX Item "OPENSSL_CPU_INFO"
  275. The current OpenSSL cpu settings.
  276. This is the current setting of the cpu capability flags. It is usually
  277. automatically configured but may be set via an environment variable.
  278. The value has the same syntax as the environment variable.
  279. For x86 the string looks like \f(CW\*(C`CPUINFO: OPENSSL_ia32cap=0x123:0x456\*(C'\fR
  280. or \f(CW\*(C`CPUINFO: N/A\*(C'\fR if not available.
  281. .PP
  282. For an unknown \fIt\fR, the text \f(CW\*(C`not available\*(C'\fR is returned.
  283. .PP
  284. \&\fBOPENSSL_info()\fR also returns different strings depending on \fIt\fR:
  285. .IP "\s-1OPENSSL_INFO_CONFIG_DIR\s0" 4
  286. .IX Item "OPENSSL_INFO_CONFIG_DIR"
  287. The configured \f(CW\*(C`OPENSSLDIR\*(C'\fR, which is the default location for
  288. OpenSSL configuration files.
  289. .IP "\s-1OPENSSL_INFO_ENGINES_DIR\s0" 4
  290. .IX Item "OPENSSL_INFO_ENGINES_DIR"
  291. The configured \f(CW\*(C`ENGINESDIR\*(C'\fR, which is the default location for
  292. OpenSSL engines.
  293. .IP "\s-1OPENSSL_INFO_MODULES_DIR\s0" 4
  294. .IX Item "OPENSSL_INFO_MODULES_DIR"
  295. The configured \f(CW\*(C`MODULESDIR\*(C'\fR, which is the default location for
  296. dynamically loadable OpenSSL modules other than engines.
  297. .IP "\s-1OPENSSL_INFO_DSO_EXTENSION\s0" 4
  298. .IX Item "OPENSSL_INFO_DSO_EXTENSION"
  299. The configured dynamically loadable module extension.
  300. .IP "\s-1OPENSSL_INFO_DIR_FILENAME_SEPARATOR\s0" 4
  301. .IX Item "OPENSSL_INFO_DIR_FILENAME_SEPARATOR"
  302. The separator between a directory specification and a filename.
  303. Note that on some operating systems, this is not the same as the
  304. separator between directory elements.
  305. .IP "\s-1OPENSSL_INFO_LIST_SEPARATOR\s0" 4
  306. .IX Item "OPENSSL_INFO_LIST_SEPARATOR"
  307. The OpenSSL list separator.
  308. This is typically used in strings that are lists of items, such as the
  309. value of the environment variable \f(CW$PATH\fR on Unix (where the
  310. separator is \f(CW\*(C`:\*(C'\fR) or \f(CW\*(C`%PATH%\*(C'\fR on Windows (where the separator is
  311. \&\f(CW\*(C`;\*(C'\fR).
  312. .IP "\s-1OPENSSL_INFO_CPU_SETTINGS\s0" 4
  313. .IX Item "OPENSSL_INFO_CPU_SETTINGS"
  314. The current OpenSSL cpu settings.
  315. This is the current setting of the cpu capability flags. It is usually
  316. automatically configured but may be set via an environment variable.
  317. The value has the same syntax as the environment variable.
  318. For x86 the string looks like \f(CW\*(C`OPENSSL_ia32cap=0x123:0x456\*(C'\fR.
  319. .PP
  320. For an unknown \fIt\fR, \s-1NULL\s0 is returned.
  321. .PP
  322. \&\fBOpenSSL_version_num()\fR returns the value of \fB\s-1OPENSSL_VERSION_NUMBER\s0\fR.
  323. .SH "RETURN VALUES"
  324. .IX Header "RETURN VALUES"
  325. \&\fBOPENSSL_version_major()\fR, \fBOPENSSL_version_minor()\fR and \fBOPENSSL_version_patch()\fR
  326. return the version number parts as integers.
  327. .PP
  328. \&\fBOPENSSL_version_pre_release()\fR and \fBOPENSSL_version_build_metadata()\fR return
  329. the values of \fB\s-1OPENSSL_VERSION_PRE_RELEASE\s0\fR and
  330. \&\fB\s-1OPENSSL_VERSION_BUILD_METADATA\s0\fR respectively as constant strings.
  331. For any of them that is undefined, the empty string is returned.
  332. .PP
  333. \&\fBOpenSSL_version()\fR returns constant strings.
  334. .SH "SEE ALSO"
  335. .IX Header "SEE ALSO"
  336. \&\fBcrypto\fR\|(7)
  337. .SH "HISTORY"
  338. .IX Header "HISTORY"
  339. The macros and functions described here were added in OpenSSL 3.0,
  340. except for \s-1OPENSSL_VERSION_NUMBER\s0 and \fBOpenSSL_version_num()\fR.
  341. .SH "COPYRIGHT"
  342. .IX Header "COPYRIGHT"
  343. Copyright 2018\-2022 The OpenSSL Project Authors. All Rights Reserved.
  344. .PP
  345. Licensed under the Apache License 2.0 (the \*(L"License\*(R"). You may not use
  346. this file except in compliance with the License. You can obtain a copy
  347. in the file \s-1LICENSE\s0 in the source distribution or at
  348. <https://www.openssl.org/source/license.html>.