ossl-guide-libraries-introduction.7ossl 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450
  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 "OSSL-GUIDE-LIBRARIES-INTRODUCTION 7ossl"
  136. .TH OSSL-GUIDE-LIBRARIES-INTRODUCTION 7ossl "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. ossl\-guide\-libraries\-introduction
  143. \&\- OpenSSL Guide: An introduction to the OpenSSL libraries
  144. .SH "INTRODUCTION"
  145. .IX Header "INTRODUCTION"
  146. OpenSSL supplies two libraries that can be used by applications known as
  147. \&\f(CW\*(C`libcrypto\*(C'\fR and \f(CW\*(C`libssl\*(C'\fR.
  148. .PP
  149. The \f(CW\*(C`libcrypto\*(C'\fR library provides APIs for general purpose cryptography such as
  150. encryption, digital signatures, hash functions, etc. It additionally supplies
  151. supporting APIs for cryptography related standards, e.g. for reading and writing
  152. digital certificates (also known as X.509 certificates). Finally it also
  153. supplies various additional supporting APIs that are not directly cryptography
  154. related but are nonetheless useful and depended upon by other APIs. For
  155. example the \*(L"\s-1BIO\*(R"\s0 functions provide capabilities for abstracting I/O, e.g. via a
  156. file or over a network.
  157. .PP
  158. The \f(CW\*(C`libssl\*(C'\fR library provides functions to perform secure communication between
  159. two peers across a network. Most significantly it implements support for the
  160. \&\s-1SSL/TLS, DTLS\s0 and \s-1QUIC\s0 standards.
  161. .PP
  162. The \f(CW\*(C`libssl\*(C'\fR library depends on and uses many of the capabilities supplied by
  163. \&\f(CW\*(C`libcrypto\*(C'\fR. Any application linked against \f(CW\*(C`libssl\*(C'\fR will also link against
  164. \&\f(CW\*(C`libcrypto\*(C'\fR, and most applications that do this will directly use \s-1API\s0 functions
  165. supplied by both libraries.
  166. .PP
  167. Applications may be written that only use \f(CW\*(C`libcrypto\*(C'\fR capabilities and do not
  168. link against \f(CW\*(C`libssl\*(C'\fR at all.
  169. .SH "PROVIDERS"
  170. .IX Header "PROVIDERS"
  171. As well as the two main libraries, OpenSSL also comes with a set of providers.
  172. .PP
  173. A provider in OpenSSL is a component that collects together algorithm
  174. implementations (for example an implementation of the symmetric encryption
  175. algorithm \s-1AES\s0). In order to use an algorithm you must have at least one
  176. provider loaded that contains an implementation of it. OpenSSL comes with a
  177. number of providers and they may also be obtained from third parties.
  178. .PP
  179. Providers may either be \*(L"built-in\*(R" or in the form of a separate loadable module
  180. file (typically one ending in \*(L".so\*(R" or \*(L".dll\*(R" dependent on the platform). A
  181. built-in provider is one that is either already present in \f(CW\*(C`libcrypto\*(C'\fR or one
  182. that the application has supplied itself directly. Third parties can also supply
  183. providers in the form of loadable modules.
  184. .PP
  185. If you don't load a provider explicitly (either in program code or via config)
  186. then the OpenSSL built-in \*(L"default\*(R" provider will be automatically loaded.
  187. .PP
  188. See \*(L"\s-1OPENSSL PROVIDERS\*(R"\s0 below for a description of the providers that OpenSSL
  189. itself supplies.
  190. .PP
  191. Loading and unloading providers is quite an expensive operation. It is normally
  192. done once, early on in the application lifecycle and those providers are kept
  193. loaded for the duration of the application execution.
  194. .SH "LIBRARY CONTEXTS"
  195. .IX Header "LIBRARY CONTEXTS"
  196. Many OpenSSL \s-1API\s0 functions make use of a library context. A library context can
  197. be thought of as a \*(L"scope\*(R" within which configuration options take effect. When
  198. a provider is loaded, it is only loaded within the scope of a given library
  199. context. In this way it is possible for different components of a complex
  200. application to each use a different library context and have different providers
  201. loaded with different configuration settings.
  202. .PP
  203. If an application does not explicitly create a library context then the
  204. \&\*(L"default\*(R" library context will be used.
  205. .PP
  206. Library contexts are represented by the \fB\s-1OSSL_LIB_CTX\s0\fR type. Many OpenSSL \s-1API\s0
  207. functions take a library context as a parameter. Applications can always pass
  208. \&\fB\s-1NULL\s0\fR for this parameter to just use the default library context.
  209. .PP
  210. The default library context is automatically created the first time it is
  211. needed. This will automatically load any available configuration file and will
  212. initialise OpenSSL for use. Unlike in earlier versions of OpenSSL (prior to
  213. 1.1.0) no explicit initialisation steps need to be taken.
  214. .PP
  215. Similarly when the application exits, the default library context is
  216. automatically destroyed. No explicit de-initialisation steps need to be taken.
  217. .PP
  218. See \s-1\fBOSSL_LIB_CTX\s0\fR\|(3) for more information about library contexts.
  219. See also \*(L"\s-1ALGORITHM FETCHING\*(R"\s0 in \fBossl\-guide\-libcrypto\-introduction\fR\|(7).
  220. .SH "PROPERTY QUERY STRINGS"
  221. .IX Header "PROPERTY QUERY STRINGS"
  222. In some cases the available providers may mean that more than one implementation
  223. of any given algorithm might be available. For example the OpenSSL \s-1FIPS\s0 provider
  224. supplies alternative implementations of many of the same algorithms that are
  225. available in the OpenSSL default provider.
  226. .PP
  227. The process of selecting an algorithm implementation is known as \*(L"fetching\*(R".
  228. When OpenSSL fetches an algorithm to use it is possible to specify a \*(L"property
  229. query string\*(R" to guide the selection process. For example a property query
  230. string of \*(L"provider=default\*(R" could be used to force the selection to only
  231. consider algorithm implementations in the default provider.
  232. .PP
  233. Property query strings can be specified explicitly as an argument to a function.
  234. It is also possible to specify a default property query string for the whole
  235. library context using the \fBEVP_set_default_properties\fR\|(3) or
  236. \&\fBEVP_default_properties_enable_fips\fR\|(3) functions. Where both
  237. default properties and function specific properties are specified then they are
  238. combined. Function specific properties will override default properties where
  239. there is a conflict.
  240. .PP
  241. See \*(L"\s-1ALGORITHM FETCHING\*(R"\s0 in \fBossl\-guide\-libcrypto\-introduction\fR\|(7) for more
  242. information about fetching. See \fBproperty\fR\|(7) for more information about
  243. properties.
  244. .SH "MULTI-THREADED APPLICATIONS"
  245. .IX Header "MULTI-THREADED APPLICATIONS"
  246. As long as OpenSSL has been built with support for threads (the default case
  247. on most platforms) then most OpenSSL \fIfunctions\fR are thread-safe in the sense
  248. that it is safe to call the same function from multiple threads at the same
  249. time. However most OpenSSL \fIdata structures\fR are not thread-safe. For example
  250. the \fBBIO_write\fR\|(3) and \fBBIO_read\fR\|(3) functions are thread safe. However it
  251. would not be thread safe to call \fBBIO_write()\fR from one thread while calling
  252. \&\fBBIO_read()\fR in another where both functions are passed the same \fB\s-1BIO\s0\fR object
  253. since both of them may attempt to make changes to the same \fB\s-1BIO\s0\fR object.
  254. .PP
  255. There are exceptions to these rules. A small number of functions are not thread
  256. safe at all. Where this is the case this restriction should be noted in the
  257. documentation for the function. Similarly some data structures may be partially
  258. or fully thread safe. For example it is always safe to use an \fB\s-1OSSL_LIB_CTX\s0\fR in
  259. multiple threads.
  260. .PP
  261. See \fBopenssl\-threads\fR\|(7) for a more detailed discussion on OpenSSL threading
  262. support.
  263. .SH "ERROR HANDLING"
  264. .IX Header "ERROR HANDLING"
  265. Most OpenSSL functions will provide a return value indicating whether the
  266. function has been successful or not. It is considered best practice to always
  267. check the return value from OpenSSL functions (where one is available).
  268. .PP
  269. Most functions that return a pointer value will return \s-1NULL\s0 in the event of a
  270. failure.
  271. .PP
  272. Most functions that return an integer value will return a positive integer for
  273. success. Some of these functions will return 0 to indicate failure. Others may
  274. return 0 or a negative value for failure.
  275. .PP
  276. Some functions cannot fail and have a \fBvoid\fR return type. There are also a
  277. small number of functions that do not conform to the above conventions (e.g.
  278. they may return 0 to indicate success).
  279. .PP
  280. Due to the above variations in behaviour it is important to check the
  281. documentation for each function for information about how to interpret the
  282. return value for it.
  283. .PP
  284. It is sometimes necessary to get further information about the cause of a
  285. failure (e.g. for debugging or logging purposes). Many (but not all) functions
  286. will add further information about a failure to the OpenSSL error stack. By
  287. using the error stack you can find out information such as a reason code/string
  288. for the error as well as the exact file and source line within OpenSSL that
  289. emitted the error.
  290. .PP
  291. OpenSSL supplies a set of error handling functions to query the error stack. See
  292. \&\fBERR_get_error\fR\|(3) for information about the functions available for querying
  293. error data. Also see \fBERR_print_errors\fR\|(3) for information on some simple
  294. helper functions for printing error data. Finally look at \fBERR_clear_error\fR\|(3)
  295. for how to clear old errors from the error stack.
  296. .SH "OPENSSL PROVIDERS"
  297. .IX Header "OPENSSL PROVIDERS"
  298. OpenSSL comes with a set of providers.
  299. .PP
  300. The algorithms available in each of these providers may vary due to build time
  301. configuration options. The \fBopenssl\-list\fR\|(1) command can be used to list the
  302. currently available algorithms.
  303. .PP
  304. The names of the algorithms shown from \fBopenssl\-list\fR\|(1) can be used as an
  305. algorithm identifier to the appropriate fetching function. Also see the provider
  306. specific manual pages linked below for further details about using the
  307. algorithms available in each of the providers.
  308. .PP
  309. As well as the OpenSSL providers third parties can also implement providers.
  310. For information on writing a provider see \fBprovider\fR\|(7).
  311. .SS "Default provider"
  312. .IX Subsection "Default provider"
  313. The default provider is built-in as part of the \fIlibcrypto\fR library and
  314. contains all of the most commonly used algorithm implementations. Should it be
  315. needed (if other providers are loaded and offer implementations of the same
  316. algorithms), the property query string \*(L"provider=default\*(R" can be used as a
  317. search criterion for these implementations. The default provider includes all
  318. of the functionality in the base provider below.
  319. .PP
  320. If you don't load any providers at all then the \*(L"default\*(R" provider will be
  321. automatically loaded. If you explicitly load any provider then the \*(L"default\*(R"
  322. provider would also need to be explicitly loaded if it is required.
  323. .PP
  324. See \fBOSSL_PROVIDER\-default\fR\|(7).
  325. .SS "Base provider"
  326. .IX Subsection "Base provider"
  327. The base provider is built in as part of the \fIlibcrypto\fR library and contains
  328. algorithm implementations for encoding and decoding of OpenSSL keys.
  329. Should it be needed (if other providers are loaded and offer
  330. implementations of the same algorithms), the property query string
  331. \&\*(L"provider=base\*(R" can be used as a search criterion for these implementations.
  332. Some encoding and decoding algorithm implementations are not \s-1FIPS\s0 algorithm
  333. implementations in themselves but support algorithms from the \s-1FIPS\s0 provider and
  334. are allowed for use in \*(L"\s-1FIPS\s0 mode\*(R". The property query string \*(L"fips=yes\*(R" can be
  335. used to select such algorithms.
  336. .PP
  337. See \fBOSSL_PROVIDER\-base\fR\|(7).
  338. .SS "\s-1FIPS\s0 provider"
  339. .IX Subsection "FIPS provider"
  340. The \s-1FIPS\s0 provider is a dynamically loadable module, and must therefore
  341. be loaded explicitly, either in code or through OpenSSL configuration
  342. (see \fBconfig\fR\|(5)). It contains algorithm implementations that have been
  343. validated according to \s-1FIPS\s0 standards. Should it be needed (if other
  344. providers are loaded and offer implementations of the same algorithms), the
  345. property query string \*(L"provider=fips\*(R" can be used as a search criterion for
  346. these implementations. All approved algorithm implementations in the \s-1FIPS\s0
  347. provider can also be selected with the property \*(L"fips=yes\*(R". The \s-1FIPS\s0 provider
  348. may also contain non-approved algorithm implementations and these can be
  349. selected with the property \*(L"fips=no\*(R".
  350. .PP
  351. Typically the \*(L"Base provider\*(R" will also need to be loaded because the \s-1FIPS\s0
  352. provider does not support the encoding or decoding of keys.
  353. .PP
  354. See \s-1\fBOSSL_PROVIDER\-FIPS\s0\fR\|(7) and \fBfips_module\fR\|(7).
  355. .SS "Legacy provider"
  356. .IX Subsection "Legacy provider"
  357. The legacy provider is a dynamically loadable module, and must therefore
  358. be loaded explicitly, either in code or through OpenSSL configuration
  359. (see \fBconfig\fR\|(5)). It contains algorithm implementations that are considered
  360. insecure, or are no longer in common use such as \s-1MD2\s0 or \s-1RC4.\s0 Should it be needed
  361. (if other providers are loaded and offer implementations of the same algorithms),
  362. the property \*(L"provider=legacy\*(R" can be used as a search criterion for these
  363. implementations.
  364. .PP
  365. See \fBOSSL_PROVIDER\-legacy\fR\|(7).
  366. .SS "Null provider"
  367. .IX Subsection "Null provider"
  368. The null provider is built in as part of the \fIlibcrypto\fR library. It contains
  369. no algorithms in it at all. When fetching algorithms the default provider will
  370. be automatically loaded if no other provider has been explicitly loaded. To
  371. prevent that from happening you can explicitly load the null provider.
  372. .PP
  373. You can use this if you create your own library context and want to ensure that
  374. all \s-1API\s0 calls have correctly passed the created library context and are not
  375. accidentally using the default library context. Load the null provider into the
  376. default library context so that the default library context has no algorithm
  377. implementations available.
  378. .PP
  379. See \fBOSSL_PROVIDER\-null\fR\|(7).
  380. .SH "CONFIGURATION"
  381. .IX Header "CONFIGURATION"
  382. By default OpenSSL will load a configuration file when it is first used. This
  383. will set up various configuration settings within the default library context.
  384. Applications that create their own library contexts may optionally configure
  385. them with a config file using the \fBOSSL_LIB_CTX_load_config\fR\|(3) function.
  386. .PP
  387. The configuration file can be used to automatically load providers and set up
  388. default property query strings.
  389. .PP
  390. For information on the OpenSSL configuration file format see \fBconfig\fR\|(5).
  391. .SH "LIBRARY CONVENTIONS"
  392. .IX Header "LIBRARY CONVENTIONS"
  393. Many OpenSSL functions that \*(L"get\*(R" or \*(L"set\*(R" a value follow a naming convention
  394. using the numbers \fB0\fR and \fB1\fR, i.e. \*(L"get0\*(R", \*(L"get1\*(R", \*(L"set0\*(R" and \*(L"set1\*(R". This
  395. can also apply to some functions that \*(L"add\*(R" a value to an existing set, i.e.
  396. \&\*(L"add0\*(R" and \*(L"add1\*(R".
  397. .PP
  398. For example the functions:
  399. .PP
  400. .Vb 2
  401. \& int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
  402. \& int X509_add1_trust_object(X509 *x, const ASN1_OBJECT *obj);
  403. .Ve
  404. .PP
  405. In the \fB0\fR version the ownership of the object is passed to (for an add or set)
  406. or retained by (for a get) the parent object. For example after calling the
  407. \&\fBX509_CRL_add0_revoked()\fR function above, ownership of the \fIrev\fR object is passed
  408. to the \fIcrl\fR object. Therefore, after calling this function \fIrev\fR should not
  409. be freed directly. It will be freed implicitly when \fIcrl\fR is freed.
  410. .PP
  411. In the \fB1\fR version the ownership of the object is not passed to or retained by
  412. the parent object. Instead a copy or \*(L"up ref\*(R" of the object is performed. So
  413. after calling the \fBX509_add1_trust_object()\fR function above the application will
  414. still be responsible for freeing the \fIobj\fR value where appropriate.
  415. .PP
  416. Many OpenSSL functions conform to a naming convention of the form
  417. \&\fB\fBCLASSNAME_func_name()\fB\fR. In this naming convention the \fB\s-1CLASSNAME\s0\fR is the name
  418. of an OpenSSL data structure (given in capital letters) that the function is
  419. primarily operating on. The \fBfunc_name\fR portion of the name is usually in
  420. lowercase letters and indicates the purpose of the function.
  421. .SH "DEMO APPLICATIONS"
  422. .IX Header "DEMO APPLICATIONS"
  423. OpenSSL is distributed with a set of demo applications which provide some
  424. examples of how to use the various \s-1API\s0 functions. To look at them download the
  425. OpenSSL source code from the OpenSSL website
  426. (<https://www.openssl.org/source/>). Extract the downloaded \fB.tar.gz\fR file for
  427. the version of OpenSSL that you are using and look at the various files in the
  428. \&\fBdemos\fR sub-directory.
  429. .PP
  430. The Makefiles in the subdirectories give instructions on how to build and run
  431. the demo applications.
  432. .SH "FURTHER READING"
  433. .IX Header "FURTHER READING"
  434. See \fBossl\-guide\-libcrypto\-introduction\fR\|(7) for a more detailed introduction to
  435. using \f(CW\*(C`libcrypto\*(C'\fR and \fBossl\-guide\-libssl\-introduction\fR\|(7) for more information
  436. on \f(CW\*(C`libssl\*(C'\fR.
  437. .SH "SEE ALSO"
  438. .IX Header "SEE ALSO"
  439. \&\fBopenssl\fR\|(1), \fBssl\fR\|(7), \fBevp\fR\|(7), \s-1\fBOSSL_LIB_CTX\s0\fR\|(3), \fBopenssl\-threads\fR\|(7),
  440. \&\fBproperty\fR\|(7), \fBOSSL_PROVIDER\-default\fR\|(7), \fBOSSL_PROVIDER\-base\fR\|(7),
  441. \&\s-1\fBOSSL_PROVIDER\-FIPS\s0\fR\|(7), \fBOSSL_PROVIDER\-legacy\fR\|(7), \fBOSSL_PROVIDER\-null\fR\|(7),
  442. \&\fBopenssl\-glossary\fR\|(7), \fBprovider\fR\|(7)
  443. .SH "COPYRIGHT"
  444. .IX Header "COPYRIGHT"
  445. Copyright 2000\-2023 The OpenSSL Project Authors. All Rights Reserved.
  446. .PP
  447. Licensed under the Apache License 2.0 (the \*(L"License\*(R"). You may not use
  448. this file except in compliance with the License. You can obtain a copy
  449. in the file \s-1LICENSE\s0 in the source distribution or at
  450. <https://www.openssl.org/source/license.html>.