Name Date Size #Lines LOC

..--

Configurations/H--10,8399,239

VMS/H--452400

apps/H--64,10654,221

crypto/H--622,858495,579

demos/H--17,62611,458

doc/H--177,892128,218

engines/H--10,8328,399

exporters/H--399357

external/perl/H--5,0282,210

freebsd/H--8954

fuzz/H--9,6107,030

include/H--86,55859,060

ms/H--608434

os-dep/H--122

providers/H--88,03067,167

ssl/H--107,78375,350

test/H--519,145435,630

tools/H--513406

util/H--31,83525,798

ACKNOWLEDGEMENTS.mdH A D07-Aug-2025159 74

AUTHORS.mdH A D07-Aug-20251,022 5448

BSDmakefileH A D01-Aug-20252.5 KiB10079

CHANGES.mdH A D07-Aug-2025786.8 KiB21,42814,871

CODE-OF-CONDUCT.mdH A D07-Aug-2025169 74

CONTRIBUTING.mdH A D07-Aug-20254.5 KiB10579

ConfigureH A D07-Aug-2025138.7 KiB3,7632,790

FREEBSD-upgradeH A D08-Sep-20244.4 KiB12380

HACKING.mdH A D07-Aug-20253.1 KiB8157

INSTALL.mdH A D07-Aug-202569.6 KiB2,0751,416

LICENSE.txtH A D24-Jun-20239.9 KiB178150

NEWS.mdH A D07-Aug-202589.7 KiB2,0851,618

NOTES-ANDROID.mdH A D07-Aug-20254.5 KiB9172

NOTES-ANSI.mdH A D07-Aug-2025835 3421

NOTES-DJGPP.mdH A D24-Jun-20232.1 KiB4736

NOTES-NONSTOP.mdH A D07-Aug-202510.2 KiB255189

NOTES-PERL.mdH A D07-Aug-20254.9 KiB12895

NOTES-POSIX.mdH A D07-Aug-2025748 2115

NOTES-UNIX.mdH A D07-Aug-20255.6 KiB11693

NOTES-VALGRIND.mdH A D07-Aug-20252.8 KiB7352

NOTES-VMS.mdH A D24-Jun-20234.7 KiB13393

NOTES-WINDOWS.mdH A D07-Aug-202510.7 KiB291205

README-ENGINES.mdH A D07-Aug-202515.3 KiB318264

README-FIPS.mdH A D07-Aug-20258.3 KiB202151

README-PROVIDERS.mdH A D07-Aug-20255.4 KiB146111

README-QUIC.mdH A D07-Aug-20254.7 KiB10980

README.mdH A D07-Aug-20257.9 KiB261188

SUPPORT.mdH A D24-Jun-20233.8 KiB9469

VERSION.datH A D07-Aug-202599 87

build.infoH A D07-Aug-20255.7 KiB140126

configH A D24-Jun-2023378 112

config.comH A D02-Feb-20242.5 KiB9490

configdata.pmH A D01-Aug-20251.3 MiB36,32036,164

configdata.pm.inH A D07-Aug-202516.4 KiB488375

funding.jsonH A D07-Aug-20256.1 KiB106105

libcrypto.pcH A D01-Aug-2025350 1412

libssl.pcH A D01-Aug-2025308 1210

openssl.pcH A D01-Aug-2025234 108

README-ENGINES.md

1Engines
2=======
3
4Deprecation Note
5----------------
6
7The ENGINE API was introduced in OpenSSL version 0.9.6 as a low level
8interface for adding alternative implementations of cryptographic
9primitives, most notably for integrating hardware crypto devices.
10
11The ENGINE interface has its limitations and it has been superseded
12by the [PROVIDER API](README-PROVIDERS.md), it is deprecated in OpenSSL
13version 3.0. The following documentation is retained as an aid for
14users who need to maintain or support existing ENGINE implementations.
15Support for new hardware devices or new algorithms should be added
16via providers, and existing engines should be converted to providers
17as soon as possible.
18
19Built-in ENGINE implementations
20-------------------------------
21
22There are currently built-in ENGINE implementations for the following
23crypto devices:
24
25- Microsoft CryptoAPI
26- VIA Padlock
27- nCipher CHIL
28
29In addition, dynamic binding to external ENGINE implementations is now
30provided by a special ENGINE called "dynamic". See the "DYNAMIC ENGINE"
31section below for details.
32
33At this stage, a number of things are still needed and are being worked on:
34
351. Integration of EVP support.
362. Configuration support.
373. Documentation!
38
39Integration of EVP support
40--------------------------
41
42With respect to EVP, this relates to support for ciphers and digests in
43the ENGINE model so that alternative implementations of existing
44algorithms/modes (or previously unimplemented ones) can be provided by
45ENGINE implementations.
46
47Configuration support
48---------------------
49
50Configuration support currently exists in the ENGINE API itself, in the
51form of "control commands". These allow an application to expose to the
52user/admin the set of commands and parameter types a given ENGINE
53implementation supports, and for an application to directly feed string
54based input to those ENGINEs, in the form of name-value pairs. This is an
55extensible way for ENGINEs to define their own "configuration" mechanisms
56that are specific to a given ENGINE (eg. for a particular hardware
57device) but that should be consistent across *all* OpenSSL-based
58applications when they use that ENGINE. Work is in progress (or at least
59in planning) for supporting these control commands from the CONF (or
60NCONF) code so that applications using OpenSSL's existing configuration
61file format can have ENGINE settings specified in much the same way.
62Presently however, applications must use the ENGINE API itself to provide
63such functionality. To see first hand the types of commands available
64with the various compiled-in ENGINEs (see further down for dynamic
65ENGINEs), use the "engine" openssl utility with full verbosity, i.e.:
66
67    openssl engine -vvvv
68
69Documentation
70-------------
71
72Documentation? Volunteers welcome! The source code is reasonably well
73self-documenting, but some summaries and usage instructions are needed -
74moreover, they are needed in the same POD format the existing OpenSSL
75documentation is provided in. Any complete or incomplete contributions
76would help make this happen.
77
78STABILITY & BUG-REPORTS
79=======================
80
81What already exists is fairly stable as far as it has been tested, but
82the test base has been a bit small most of the time. For the most part,
83the vendors of the devices these ENGINEs support have contributed to the
84development and/or testing of the implementations, and *usually* (with no
85guarantees) have experience in using the ENGINE support to drive their
86devices from common OpenSSL-based applications. Bugs and/or inexplicable
87behaviour in using a specific ENGINE implementation should be sent to the
88author of that implementation (if it is mentioned in the corresponding C
89file), and in the case of implementations for commercial hardware
90devices, also through whatever vendor support channels are available. If
91none of this is possible, or the problem seems to be something about the
92ENGINE API itself (ie. not necessarily specific to a particular ENGINE
93implementation) then you should mail complete details to the relevant
94OpenSSL mailing list. For a definition of "complete details", refer to
95the OpenSSL "README" file. As for which list to send it to:
96
97- openssl-users: if you are *using* the ENGINE abstraction, either in an
98  pre-compiled application or in your own application code.
99
100- openssl-dev: if you are discussing problems with OpenSSL source code.
101
102USAGE
103=====
104
105The default "openssl" ENGINE is always chosen when performing crypto
106operations unless you specify otherwise. You must actively tell the
107openssl utility commands to use anything else through a new command line
108switch called "-engine". Also, if you want to use the ENGINE support in
109your own code to do something similar, you must likewise explicitly
110select the ENGINE implementation you want.
111
112Depending on the type of hardware, system, and configuration, "settings"
113may need to be applied to an ENGINE for it to function as expected/hoped.
114The recommended way of doing this is for the application to support
115ENGINE "control commands" so that each ENGINE implementation can provide
116whatever configuration primitives it might require and the application
117can allow the user/admin (and thus the hardware vendor's support desk
118also) to provide any such input directly to the ENGINE implementation.
119This way, applications do not need to know anything specific to any
120device, they only need to provide the means to carry such user/admin
121input through to the ENGINE in question. Ie. this connects *you* (and
122your helpdesk) to the specific ENGINE implementation (and device), and
123allows application authors to not get buried in hassle supporting
124arbitrary devices they know (and care) nothing about.
125
126A new "openssl" utility, "openssl engine", has been added in that allows
127for testing and examination of ENGINE implementations. Basic usage
128instructions are available by specifying the "-?" command line switch.
129
130DYNAMIC ENGINES
131===============
132
133The new "dynamic" ENGINE provides a low-overhead way to support ENGINE
134implementations that aren't pre-compiled and linked into OpenSSL-based
135applications. This could be because existing compiled-in implementations
136have known problems and you wish to use a newer version with an existing
137application. It could equally be because the application (or OpenSSL
138library) you are using simply doesn't have support for the ENGINE you
139wish to use, and the ENGINE provider (eg. hardware vendor) is providing
140you with a self-contained implementation in the form of a shared-library.
141The other use-case for "dynamic" is with applications that wish to
142maintain the smallest foot-print possible and so do not link in various
143ENGINE implementations from OpenSSL, but instead leaves you to provide
144them, if you want them, in the form of "dynamic"-loadable
145shared-libraries. It should be possible for hardware vendors to provide
146their own shared-libraries to support arbitrary hardware to work with
147applications based on OpenSSL 0.9.7 or later. If you're using an
148application based on 0.9.7 (or later) and the support you desire is only
149announced for versions later than the one you need, ask the vendor to
150backport their ENGINE to the version you need.
151
152How does "dynamic" work?
153------------------------
154
155The dynamic ENGINE has a special flag in its implementation such that
156every time application code asks for the 'dynamic' ENGINE, it in fact
157gets its own copy of it. As such, multi-threaded code (or code that
158multiplexes multiple uses of 'dynamic' in a single application in any
159way at all) does not get confused by 'dynamic' being used to do many
160independent things. Other ENGINEs typically don't do this so there is
161only ever 1 ENGINE structure of its type (and reference counts are used
162to keep order). The dynamic ENGINE itself provides absolutely no
163cryptographic functionality, and any attempt to "initialise" the ENGINE
164automatically fails. All it does provide are a few "control commands"
165that can be used to control how it will load an external ENGINE
166implementation from a shared-library. To see these control commands,
167use the command-line;
168
169    openssl engine -vvvv dynamic
170
171The "SO_PATH" control command should be used to identify the
172shared-library that contains the ENGINE implementation, and "NO_VCHECK"
173might possibly be useful if there is a minor version conflict and you
174(or a vendor helpdesk) is convinced you can safely ignore it.
175"ID" is probably only needed if a shared-library implements
176multiple ENGINEs, but if you know the engine id you expect to be using,
177it doesn't hurt to specify it (and this provides a sanity check if
178nothing else). "LIST_ADD" is only required if you actually wish the
179loaded ENGINE to be discoverable by application code later on using the
180ENGINE's "id". For most applications, this isn't necessary - but some
181application authors may have nifty reasons for using it. The "LOAD"
182command is the only one that takes no parameters and is the command
183that uses the settings from any previous commands to actually *load*
184the shared-library ENGINE implementation. If this command succeeds, the
185(copy of the) 'dynamic' ENGINE will magically morph into the ENGINE
186that has been loaded from the shared-library. As such, any control
187commands supported by the loaded ENGINE could then be executed as per
188normal. For instance, if ENGINE "foo" is implemented in the shared-library
189"libfoo.so" and it supports some special control command "CMD_FOO", the
190following code would load and use it (NB: obviously this code has no
191error checking);
192
193    ENGINE *e = ENGINE_by_id("dynamic");
194    ENGINE_ctrl_cmd_string(e, "SO_PATH", "/lib/libfoo.so", 0);
195    ENGINE_ctrl_cmd_string(e, "ID", "foo", 0);
196    ENGINE_ctrl_cmd_string(e, "LOAD", NULL, 0);
197    ENGINE_ctrl_cmd_string(e, "CMD_FOO", "some input data", 0);
198
199For testing, the "openssl engine" utility can be useful for this sort
200of thing. For example the above code excerpt would achieve much the
201same result as;
202
203    openssl engine dynamic \
204              -pre SO_PATH:/lib/libfoo.so \
205              -pre ID:foo \
206              -pre LOAD \
207              -pre "CMD_FOO:some input data"
208
209Or to simply see the list of commands supported by the "foo" ENGINE;
210
211    openssl engine -vvvv dynamic \
212              -pre SO_PATH:/lib/libfoo.so \
213              -pre ID:foo \
214              -pre LOAD
215
216Applications that support the ENGINE API and more specifically, the
217"control commands" mechanism, will provide some way for you to pass
218such commands through to ENGINEs. As such, you would select "dynamic"
219as the ENGINE to use, and the parameters/commands you pass would
220control the *actual* ENGINE used. Each command is actually a name-value
221pair and the value can sometimes be omitted (eg. the "LOAD" command).
222Whilst the syntax demonstrated in "openssl engine" uses a colon to
223separate the command name from the value, applications may provide
224their own syntax for making that separation (eg. a win32 registry
225key-value pair may be used by some applications). The reason for the
226"-pre" syntax in the "openssl engine" utility is that some commands
227might be issued to an ENGINE *after* it has been initialised for use.
228Eg. if an ENGINE implementation requires a smart-card to be inserted
229during initialisation (or a PIN to be typed, or whatever), there may be
230a control command you can issue afterwards to "forget" the smart-card
231so that additional initialisation is no longer possible. In
232applications such as web-servers, where potentially volatile code may
233run on the same host system, this may provide some arguable security
234value. In such a case, the command would be passed to the ENGINE after
235it has been initialised for use, and so the "-post" switch would be
236used instead. Applications may provide a different syntax for
237supporting this distinction, and some may simply not provide it at all
238("-pre" is almost always what you're after, in reality).
239
240How do I build a "dynamic" ENGINE?
241----------------------------------
242
243This question is trickier - currently OpenSSL bundles various ENGINE
244implementations that are statically built in, and any application that
245calls the "ENGINE_load_builtin_engines()" function will automatically
246have all such ENGINEs available (and occupying memory). Applications
247that don't call that function have no ENGINEs available like that and
248would have to use "dynamic" to load any such ENGINE - but on the other
249hand such applications would only have the memory footprint of any
250ENGINEs explicitly loaded using user/admin provided control commands.
251The main advantage of not statically linking ENGINEs and only using
252"dynamic" for hardware support is that any installation using no
253"external" ENGINE suffers no unnecessary memory footprint from unused
254ENGINEs. Likewise, installations that do require an ENGINE incur the
255overheads from only *that* ENGINE once it has been loaded.
256
257Sounds good? Maybe, but currently building an ENGINE implementation as
258a shared-library that can be loaded by "dynamic" isn't automated in
259OpenSSL's build process. It can be done manually quite easily however.
260Such a shared-library can either be built with any OpenSSL code it
261needs statically linked in, or it can link dynamically against OpenSSL
262if OpenSSL itself is built as a shared library. The instructions are
263the same in each case, but in the former (statically linked any
264dependencies on OpenSSL) you must ensure OpenSSL is built with
265position-independent code ("PIC"). The default OpenSSL compilation may
266already specify the relevant flags to do this, but you should consult
267with your compiler documentation if you are in any doubt.
268
269This example will show building the "atalla" ENGINE in the
270crypto/engine/ directory as a shared-library for use via the "dynamic"
271ENGINE.
272
2731.  "cd" to the crypto/engine/ directory of a pre-compiled OpenSSL
274    source tree.
275
2762.  Recompile at least one source file so you can see all the compiler
277    flags (and syntax) being used to build normally. Eg;
278
279        touch hw_atalla.c ; make
280
281    will rebuild "hw_atalla.o" using all such flags.
282
2833.  Manually enter the same compilation line to compile the
284    "hw_atalla.c" file but with the following two changes;
285
286    - add "-DENGINE_DYNAMIC_SUPPORT" to the command line switches,
287    - change the output file from "hw_atalla.o" to something new,
288      eg. "tmp_atalla.o"
289
2904.  Link "tmp_atalla.o" into a shared-library using the top-level
291    OpenSSL libraries to resolve any dependencies. The syntax for doing
292    this depends heavily on your system/compiler and is a nightmare
293    known well to anyone who has worked with shared-library portability
294    before. 'gcc' on Linux, for example, would use the following syntax;
295
296        gcc -shared -o dyn_atalla.so tmp_atalla.o -L../.. -lcrypto
297
2985.  Test your shared library using "openssl engine" as explained in the
299    previous section. Eg. from the top-level directory, you might try
300
301        apps/openssl engine -vvvv dynamic \
302              -pre SO_PATH:./crypto/engine/dyn_atalla.so -pre LOAD
303
304If the shared-library loads successfully, you will see both "-pre"
305commands marked as "SUCCESS" and the list of control commands
306displayed (because of "-vvvv") will be the control commands for the
307*atalla* ENGINE (ie. *not* the 'dynamic' ENGINE). You can also add
308the "-t" switch to the utility if you want it to try and initialise
309the atalla ENGINE for use to test any possible hardware/driver issues.
310
311PROBLEMS
312========
313
314It seems like the ENGINE part doesn't work too well with CryptoSwift on Win32.
315A quick test done right before the release showed that trying "openssl speed
316-engine cswift" generated errors. If the DSO gets enabled, an attempt is made
317to write at memory address 0x00000002.
318

README-FIPS.md

1OpenSSL FIPS support
2====================
3
4This release of OpenSSL includes a cryptographic module that can be
5FIPS validated. The module is implemented as an OpenSSL provider.
6A provider is essentially a dynamically loadable module which implements
7cryptographic algorithms, see the [README-PROVIDERS](README-PROVIDERS.md) file
8for further details.
9
10A cryptographic module is only FIPS validated after it has gone through the complex
11FIPS 140 validation process. As this process takes a very long time, it is not
12possible to validate every minor release of OpenSSL.
13If you need a FIPS validated module then you must ONLY generate a FIPS provider
14using OpenSSL versions that have valid FIPS certificates. A FIPS certificate
15contains a link to a Security Policy, and you MUST follow the instructions
16in the Security Policy in order to be FIPS compliant.
17See <https://www.openssl.org/source/> for information related to OpenSSL
18FIPS certificates and Security Policies.
19
20Newer OpenSSL Releases that include security or bug fixes can be used to build
21all other components (such as the core API's, TLS and the default, base and
22legacy providers) without any restrictions, but the FIPS provider must be built
23as specified in the Security Policy (normally with a different version of the
24source code).
25
26The OpenSSL FIPS provider is a shared library called `fips.so` (on Unix), or
27resp. `fips.dll` (on Windows). The FIPS provider does not get built and
28installed automatically. To enable it, you need to configure OpenSSL using
29the `enable-fips` option.
30
31Installing the FIPS provider
32============================
33
34In order to be FIPS compliant you must only use FIPS validated source code.
35Refer to <https://www.openssl.org/source/> for information related to
36which versions are FIPS validated. The instructions given below build OpenSSL
37just using the FIPS validated source code.  Any FIPS validated version may be
38used with any other openssl library.  Please see <https://www.openssl.org/source/>
39To determine which FIPS validated library version may be appropriate for you.
40
41If you want to use a validated FIPS provider, but also want to use the latest
42OpenSSL release to build everything else, then refer to the next section.
43
44The following is only a guide.
45Please read the Security Policy for up to date installation instructions.
46
47If the FIPS provider is enabled, it gets installed automatically during the
48normal installation process. Simply follow the normal procedure (configure,
49make, make test, make install) as described in the [INSTALL](INSTALL.md) file.
50
51For example, on Unix the final command
52
53    $ make install
54
55effectively executes the following install targets
56
57    $ make install_sw
58    $ make install_ssldirs
59    $ make install_docs
60    $ make install_fips     # for `enable-fips` only
61
62The `install_fips` make target can also be invoked explicitly to install
63the FIPS provider independently, without installing the rest of OpenSSL.
64
65The Installation of the FIPS provider consists of two steps. In the first step,
66the shared library is copied to its installed location, which by default is
67
68    /usr/local/lib/ossl-modules/fips.so                  on Unix, and
69    C:\Program Files\OpenSSL\lib\ossl-modules\fips.dll   on Windows.
70
71In the second step, the `openssl fipsinstall` command is executed, which completes
72the installation by doing the following two things:
73
74- Runs the FIPS module self tests
75- Generates the so-called FIPS module configuration file containing information
76  about the module such as the module checksum (and for OpenSSL 3.1.2 the
77  self test status).
78
79The FIPS module must have the self tests run, and the FIPS module config file
80output generated on every machine that it is to be used on. For OpenSSL 3.1.2
81you must not copy the FIPS module config file output data from one machine to another.
82
83On Unix, the `openssl fipsinstall` command will be invoked as follows by default:
84
85    $ openssl fipsinstall -out /usr/local/ssl/fipsmodule.cnf -module /usr/local/lib/ossl-modules/fips.so
86
87If you configured OpenSSL to be installed to a different location, the paths will
88vary accordingly. In the rare case that you need to install the fipsmodule.cnf
89to a non-standard location, you can execute the `openssl fipsinstall` command manually.
90
91Installing the FIPS provider and using it with the latest release
92=================================================================
93
94This normally requires you to download 2 copies of the OpenSSL source code.
95
96Download and build a validated FIPS provider
97--------------------------------------------
98
99Refer to <https://www.openssl.org/source/> for information related to
100which versions are FIPS validated. For this example we use OpenSSL 3.1.2.
101
102    $ wget https://www.openssl.org/source/openssl-3.1.2.tar.gz
103    $ tar -xf openssl-3.1.2.tar.gz
104    $ cd openssl-3.1.2
105    $ ./Configure enable-fips
106    $ make
107    $ cd ..
108
109Download and build the latest release of OpenSSL
110------------------------------------------------
111
112We use OpenSSL 3.5.0 here, (but you could also use the latest 3.5.X)
113
114    $ wget https://www.openssl.org/source/openssl-3.5.0.tar.gz
115    $ tar -xf openssl-3.5.0.tar.gz
116    $ cd openssl-3.5.0
117    $ ./Configure enable-fips
118    $ make
119
120Use the OpenSSL FIPS provider for testing
121-----------------------------------------
122
123We do this by replacing the artifact for the OpenSSL 3.5.0 FIPS provider.
124Note that the OpenSSL 3.5.0 FIPS provider has not been validated
125so it must not be used for FIPS purposes.
126
127    $ cp ../openssl-3.1.2/providers/fips.so providers/.
128    $ cp ../openssl-3.1.2/providers/fipsmodule.cnf providers/.
129    // Note that for OpenSSL 3.1.2 that the `fipsmodule.cnf` file should not
130    // be copied across multiple machines if it contains an entry for
131    // `install-status`. (Otherwise the self tests would be skipped).
132
133    // Validate the output of the following to make sure we are using the
134    // OpenSSL 3.1.2 FIPS provider
135    $ ./util/wrap.pl -fips apps/openssl list -provider-path providers \
136    -provider fips -providers
137
138    // Now run the current tests using the OpenSSL 3.1.2 FIPS provider.
139    $ make tests
140
141Copy the FIPS provider artifacts (`fips.so` & `fipsmodule.cnf`) to known locations
142-------------------------------------------------------------------------------------
143
144    $ cd ../openssl-3.1.2
145    $ sudo make install_fips
146
147Check that the correct FIPS provider is being used
148--------------------------------------------------
149
150    $ cd ../openssl-3.5.0
151    $./util/wrap.pl -fips apps/openssl list -provider-path providers \
152    -provider fips -providers
153
154    // This should produce the following output
155    Providers:
156      base
157        name: OpenSSL Base Provider
158        version: 3.5.0
159        status: active
160      fips
161        name: OpenSSL FIPS Provider
162        version: 3.1.2
163        status: active
164
165Using the FIPS Module in applications
166=====================================
167
168Documentation about using the FIPS module is available on the [fips_module(7)]
169manual page.
170
171 [fips_module(7)]: https://www.openssl.org/docs/manmaster/man7/fips_module.html
172
173Entropy Source
174==============
175
176The FIPS provider typically relies on an external entropy source,
177specified during OpenSSL build configuration (default: `os`).  However, by
178enabling the `enable-fips-jitter` option during configuration, an internal
179jitter entropy source will be used instead.  Note that this will cause
180the FIPS provider to operate in a non-compliant mode unless an entropy
181assessment [ESV] and validation through the [CMVP] are additionally conducted.
182
183Note that the `enable-fips-jitter` option is only available in OpenSSL
184versions 3.5 and later.
185
186 [CMVP]: https://csrc.nist.gov/projects/cryptographic-module-validation-program
187 [ESV]: https://csrc.nist.gov/Projects/cryptographic-module-validation-program/entropy-validations
188
1893rd-Party Vendor Builds
190=====================================
191
192Some Vendors choose to patch/modify/build their own FIPS provider,
193test it with a Security Laboratory and submit it under their own CMVP
194certificate, instead of using OpenSSL Project submissions. When doing
195so, FIPS provider should uniquely identify its own name and version
196number. The build infrastructure allows to customize FIPS provider
197build information via changes to strings in `VERSION.dat`.
198
199Setting "PRE_RELEASE_TAG" (dashed suffix), "BUILD_METADATA" (plus
200suffix), and "FIPS_VENDOR" allow to control reported FIPS provider
201name and build version as required for CMVP submission.
202

README-PROVIDERS.md

1Providers
2=========
3
4 - [Standard Providers](#standard-providers)
5    - [The Default Provider](#the-default-provider)
6    - [The Legacy Provider](#the-legacy-provider)
7    - [The FIPS Provider](#the-fips-provider)
8    - [The Base Provider](#the-base-provider)
9    - [The Null Provider](#the-null-provider)
10 - [Loading Providers](#loading-providers)
11
12Standard Providers
13==================
14
15Providers are containers for algorithm implementations. Whenever a cryptographic
16algorithm is used via the high level APIs a provider is selected. It is that
17provider implementation that actually does the required work. There are five
18providers distributed with OpenSSL. In the future, we expect third parties to
19distribute their own providers which can be added to OpenSSL dynamically.
20Documentation about writing providers is available on the [provider(7)]
21manual page.
22
23 [provider(7)]: https://www.openssl.org/docs/manmaster/man7/provider.html
24
25The Default Provider
26--------------------
27
28The default provider collects together all of the standard built-in OpenSSL
29algorithm implementations. If an application doesn't specify anything else
30explicitly (e.g. in the application or via config), then this is the provider
31that will be used. It is loaded automatically the first time that we try to
32get an algorithm from a provider if no other provider has been loaded yet.
33If another provider has already been loaded then it won't be loaded
34automatically. Therefore, if you want to use it in conjunction with other
35providers, then you must load it explicitly.
36
37This is a "built-in" provider, which means that it is compiled and linked
38into the libcrypto library and does not exist as a separate standalone module.
39
40The Legacy Provider
41-------------------
42
43The legacy provider is a collection of legacy algorithms that are either no
44longer in common use or considered insecure and strongly discouraged from use.
45However, some applications may need to use these algorithms for backwards
46compatibility reasons. This provider is **not** loaded by default.
47This may mean that some applications upgrading from earlier versions of OpenSSL
48may find that some algorithms are no longer available unless they load the
49legacy provider explicitly.
50
51Algorithms in the legacy provider include MD2, MD4, MDC2, RMD160, CAST5,
52BF (Blowfish), IDEA, SEED, RC2, RC4, RC5 and DES (but not 3DES).
53
54The FIPS Provider
55-----------------
56
57The FIPS provider contains a sub-set of the algorithm implementations available
58from the default provider, consisting of algorithms conforming to FIPS standards.
59It is intended that this provider will be FIPS140-2 validated.
60
61In some cases, there may be minor behavioural differences between algorithm
62implementations in this provider compared to the equivalent algorithm in the
63default provider. This is typically in order to conform to FIPS standards.
64
65The Base Provider
66-----------------
67
68The base provider contains a small sub-set of non-cryptographic algorithms
69available in the default provider. For example, it contains algorithms to
70serialize and deserialize keys to files. If you do not load the default
71provider then you should always load this one instead (in particular, if
72you are using the FIPS provider).
73
74The Null Provider
75-----------------
76
77The null provider is "built-in" to libcrypto and contains no algorithm
78implementations. In order to guarantee that the default provider is not
79automatically loaded, the null provider can be loaded instead.
80
81This can be useful if you are using non-default library contexts and want
82to ensure that the default library context is never used unintentionally.
83
84Loading Providers
85=================
86
87Providers to be loaded can be specified in the OpenSSL config file.
88See the [config(5)] manual page for information about how to configure
89providers via the config file, and how to automatically activate them.
90
91 [config(5)]: https://www.openssl.org/docs/manmaster/man5/config.html
92
93The following is a minimal config file example to load and activate both
94the legacy and the default provider in the default library context.
95
96    openssl_conf = openssl_init
97
98    [openssl_init]
99    providers = provider_sect
100
101    [provider_sect]
102    default = default_sect
103    legacy = legacy_sect
104
105    [default_sect]
106    activate = 1
107
108    [legacy_sect]
109    activate = 1
110
111It is also possible to load providers programmatically. For example you can
112load the legacy provider into the default library context as shown below.
113Note that once you have explicitly loaded a provider into the library context
114the default provider will no longer be automatically loaded. Therefore you will
115often also want to explicitly load the default provider, as is done here:
116
117    #include <stdio.h>
118    #include <stdlib.h>
119
120    #include <openssl/provider.h>
121
122    int main(void)
123    {
124        OSSL_PROVIDER *legacy;
125        OSSL_PROVIDER *deflt;
126
127        /* Load Multiple providers into the default (NULL) library context */
128        legacy = OSSL_PROVIDER_load(NULL, "legacy");
129        if (legacy == NULL) {
130            printf("Failed to load Legacy provider\n");
131            exit(EXIT_FAILURE);
132        }
133        deflt = OSSL_PROVIDER_load(NULL, "default");
134        if (deflt == NULL) {
135            printf("Failed to load Default provider\n");
136            OSSL_PROVIDER_unload(legacy);
137            exit(EXIT_FAILURE);
138        }
139
140        /* Rest of application */
141
142        OSSL_PROVIDER_unload(legacy);
143        OSSL_PROVIDER_unload(deflt);
144        exit(EXIT_SUCCESS);
145    }
146

README-QUIC.md

1Using OpenSSL with QUIC
2=======================
3
4From OpenSSL 3.2, OpenSSL features support for making QUIC connections as a
5client. Starting with OpenSSL 3.5, server-side QUIC support has also been added.
6
7Users interested in using the new QUIC functionality are encouraged to look at
8some of the following resources:
9
10- The new [OpenSSL Guide], which provides introductory guides on the use of TLS,
11  QUIC, and other OpenSSL functionality.
12- The [OpenSSL Guide] incorporates various code samples. The complete source
13  for these can be [found in the source tree under `demos/guide`](./demos/guide/).
14- The [openssl-quic(7) manual page], which provides a basic reference overview
15  of QUIC functionality and how use of QUIC differs from use of TLS with regard
16  to our API.
17- The [Demo-Driven Design (DDD)][DDD] demos, which demonstrate the use of QUIC
18  using simple examples. These can be [found in the source tree under
19  `doc/designs/ddd`].
20- The [demo found in `demos/http3`], which provides an HTTP/3 client example
21  using the nghttp3 HTTP/3 library.
22
23FAQ
24---
25
26### Why would I want to use QUIC, and what functionality does QUIC offer relative to TLS or DTLS?
27
28QUIC is a state-of-the-art secure transport protocol carried over UDP. It can
29serve many of the use cases of SSL/TLS as well as those of DTLS.
30
31QUIC delivers a number of advantages such as support for multiple streams of
32communication; it is the basis for HTTP/3 [RFC 9114]; fast connection
33initiation; and connection migration (enabling a connection to survive IP
34address changes). For a more complete description of what QUIC is and its
35advantages see the [QUIC Introduction] in the [OpenSSL Guide].
36
37For a comprehensive overview of OpenSSL's QUIC implementation, see the
38[openssl-quic(7) manual page].
39
40### How can I use HTTP/3 with OpenSSL?
41
42There are many HTTP/3 implementations in C available. The use of one such HTTP/3
43library with OpenSSL QUIC is demonstrated via the [demo found in `demos/http3`].
44
45### How can I use OpenSSL QUIC in my own application for a different protocol?
46
47The [OpenSSL Guide] provides introductory examples for how to make use of
48OpenSSL QUIC.
49
50The [openssl-quic(7) manual page] and the [Demo-Driven Design (DDD)][DDD] demos
51may also be helpful to illustrate the changes needed if you are trying to adapt
52an existing application.
53
54### How can I test QUIC using `openssl s_client`?
55
56There is basic support for single-stream QUIC using `openssl s_client`:
57
58```shell
59$ openssl s_client -quic -alpn myalpn -connect host:port
60```
61
62In the above example replace `host` with the hostname of the server (e.g.
63`www.example.com`) and `port` with the port for the server (e.g. `443`). Replace
64`myalpn` with the Application Layer Protocol to use (e.g.`h3` represents
65HTTP/3). IANA maintains a standard list of [ALPN ids] that can be used.
66
67This example connects to a QUIC server and opens a single bidirectional stream.
68Data can be passed via stdin/stdout as usual. This allows test usage of QUIC
69using simple TCP/TLS-like usage. Note that OpenSSL has no direct support for
70HTTP/3 so connecting to an HTTP/3 server should be possible but sending an
71HTTP/3 request or receiving any response data is not.
72
73### How can I create a QUIC server with OpenSSL?
74
75Starting with OpenSSL 3.5, you can create a QUIC server. OpenSSL provides a server
76implementation example that you can use as a reference:
77
78The example QUIC server implementation can be found in the source tree under
79[`demos/quic/server`](./demos/quic/server/). This demonstrates how to implement a
80basic QUIC server using the OpenSSL API.
81
82To run the example QUIC server:
83
84```shell
85$ ./demos/quic/server/server <port-number> <certificate-file> <key-file>
86```
87
88For example:
89
90```shell
91$ ./demos/quic/server/server 4433 server.pem server.key
92```
93
94Replace `server.pem` and `server.key` with your certificate and private key files.
95Note that the standard `openssl s_server` command does NOT support QUIC - you must
96use this dedicated server example instead.
97
98For more information about implementing QUIC servers with OpenSSL, refer to the
99[OpenSSL Guide] and the [openssl-quic(7) manual page].
100
101[openssl-quic(7) manual page]: https://www.openssl.org/docs/manmaster/man7/openssl-quic.html
102[OpenSSL Guide]: https://www.openssl.org/docs/manmaster/man7/ossl-guide-introduction.html
103[DDD]: https://github.com/openssl/openssl/tree/master/doc/designs/ddd
104[found in the source tree under `doc/designs/ddd`]: ./doc/designs/ddd/
105[demo found in `demos/http3`]: ./demos/http3/
106[QUIC Introduction]: https://www.openssl.org/docs/manmaster/man7/ossl-guide-quic-introduction.html
107[RFC 9114]: https://tools.ietf.org/html/rfc9114
108[ALPN ids]: https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
109

README.md

1Welcome to the OpenSSL Project
2==============================
3
4[![openssl logo]][www.openssl.org]
5
6[![github actions ci badge]][github actions ci]
7![Nightly OS Zoo ci badge](https://github.com/openssl/openssl/actions/workflows/os-zoo.yml/badge.svg)
8![Provider Compatibility](https://github.com/openssl/openssl/actions/workflows/provider-compatibility.yml/badge.svg)
9![Quic Interop](https://github.com/openssl/openssl/actions/workflows/run_quic_interop.yml/badge.svg)
10![Daily checks](https://github.com/openssl/openssl/actions/workflows/run-checker-daily.yml/badge.svg)
11
12OpenSSL is a robust, commercial-grade, full-featured Open Source Toolkit
13for the TLS (formerly SSL), DTLS and QUIC protocols.
14
15The protocol implementations are based on a full-strength general purpose
16cryptographic library, which can also be used stand-alone. Also included is a
17cryptographic module validated to conform with FIPS standards.
18
19OpenSSL is descended from the SSLeay library developed by Eric A. Young
20and Tim J. Hudson.
21
22The official Home Page of the OpenSSL Project is [www.openssl.org].
23
24Table of Contents
25=================
26
27 - [Overview](#overview)
28 - [Download](#download)
29 - [Build and Install](#build-and-install)
30 - [Documentation](#documentation)
31 - [License](#license)
32 - [Support](#support)
33 - [Contributing](#contributing)
34 - [Legalities](#legalities)
35
36Overview
37========
38
39The OpenSSL toolkit includes:
40
41- **libssl**
42  an implementation of all TLS protocol versions up to TLSv1.3 ([RFC 8446]),
43  DTLS protocol versions up to DTLSv1.2 ([RFC 6347]) and
44  the QUIC version 1 protocol ([RFC 9000]).
45
46- **libcrypto**
47  a full-strength general purpose cryptographic library. It constitutes the
48  basis of the TLS implementation, but can also be used independently.
49
50- **openssl**
51  the OpenSSL command line tool, a swiss army knife for cryptographic tasks,
52  testing and analyzing. It can be used for
53  - creation of key parameters
54  - creation of X.509 certificates, CSRs and CRLs
55  - calculation of message digests
56  - encryption and decryption
57  - SSL/TLS/DTLS and client and server tests
58  - QUIC client tests
59  - handling of S/MIME signed or encrypted mail
60  - and more...
61
62Download
63========
64
65For Production Use
66------------------
67
68Source code tarballs of the official releases can be downloaded from
69[openssl-library.org/source/](https://openssl-library.org/source/).
70The OpenSSL project does not distribute the toolkit in binary form.
71
72However, for a large variety of operating systems precompiled versions
73of the OpenSSL toolkit are available. In particular, on Linux and other
74Unix operating systems, it is normally recommended to link against the
75precompiled shared libraries provided by the distributor or vendor.
76
77We also maintain a list of third parties that produce OpenSSL binaries for
78various Operating Systems (including Windows) on the [Binaries] page on our
79wiki.
80
81For Testing and Development
82---------------------------
83
84Although testing and development could in theory also be done using
85the source tarballs, having a local copy of the git repository with
86the entire project history gives you much more insight into the
87code base.
88
89The main OpenSSL Git repository is private.
90There is a public GitHub mirror of it at [github.com/openssl/openssl],
91which is updated automatically from the former on every commit.
92
93A local copy of the Git repository can be obtained by cloning it from
94the GitHub mirror using
95
96    git clone https://github.com/openssl/openssl.git
97
98If you intend to contribute to OpenSSL, either to fix bugs or contribute
99new features, you need to fork the GitHub mirror and clone your public fork
100instead.
101
102    git clone https://github.com/yourname/openssl.git
103
104This is necessary because all development of OpenSSL nowadays is done via
105GitHub pull requests. For more details, see [Contributing](#contributing).
106
107Build and Install
108=================
109
110After obtaining the Source, have a look at the [INSTALL](INSTALL.md) file for
111detailed instructions about building and installing OpenSSL. For some
112platforms, the installation instructions are amended by a platform specific
113document.
114
115 * [Notes for UNIX-like platforms](NOTES-UNIX.md)
116 * [Notes for Android platforms](NOTES-ANDROID.md)
117 * [Notes for Windows platforms](NOTES-WINDOWS.md)
118 * [Notes for the DOS platform with DJGPP](NOTES-DJGPP.md)
119 * [Notes for the OpenVMS platform](NOTES-VMS.md)
120 * [Notes on Perl](NOTES-PERL.md)
121 * [Notes on Valgrind](NOTES-VALGRIND.md)
122
123Specific notes on upgrading to OpenSSL 3.x from previous versions can be found
124in the [ossl-guide-migration(7ossl)] manual page.
125
126Documentation
127=============
128
129README Files
130------------
131
132There are some README.md files in the top level of the source distribution
133containing additional information on specific topics.
134
135 * [Information about the OpenSSL QUIC protocol implementation](README-QUIC.md)
136 * [Information about the OpenSSL Provider architecture](README-PROVIDERS.md)
137 * [Information about using the OpenSSL FIPS validated module](README-FIPS.md)
138 * [Information about the legacy OpenSSL Engine architecture](README-ENGINES.md)
139
140The OpenSSL Guide
141-----------------
142
143There are some tutorial and introductory pages on some important OpenSSL topics
144within the [OpenSSL Guide].
145
146Manual Pages
147------------
148
149The manual pages for the master branch and all current stable releases are
150available online.
151
152- [OpenSSL master](https://www.openssl.org/docs/manmaster)
153- [OpenSSL 3.0](https://www.openssl.org/docs/man3.0)
154- [OpenSSL 3.1](https://www.openssl.org/docs/man3.1)
155- [OpenSSL 3.2](https://www.openssl.org/docs/man3.2)
156
157Demos
158-----
159
160There are numerous source code demos for using various OpenSSL capabilities in the
161[demos subfolder](./demos).
162
163Wiki
164----
165
166There is a [GitHub Wiki] which is currently not very active.
167
168License
169=======
170
171OpenSSL is licensed under the Apache License 2.0, which means that
172you are free to get and use it for commercial and non-commercial
173purposes as long as you fulfill its conditions.
174
175See the [LICENSE.txt](LICENSE.txt) file for more details.
176
177Support
178=======
179
180There are various ways to get in touch. The correct channel depends on
181your requirement. See the [SUPPORT](SUPPORT.md) file for more details.
182
183Contributing
184============
185
186If you are interested and willing to contribute to the OpenSSL project,
187please take a look at the [CONTRIBUTING](CONTRIBUTING.md) file.
188
189Legalities
190==========
191
192A number of nations restrict the use or export of cryptography. If you are
193potentially subject to such restrictions, you should seek legal advice before
194attempting to develop or distribute cryptographic code.
195
196Copyright
197=========
198
199Copyright (c) 1998-2025 The OpenSSL Project Authors
200
201Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
202
203All rights reserved.
204
205<!-- Links  -->
206
207[www.openssl.org]:
208    <https://www.openssl.org>
209    "OpenSSL Homepage"
210
211[github.com/openssl/openssl]:
212    <https://github.com/openssl/openssl>
213    "OpenSSL GitHub Mirror"
214
215[GitHub Wiki]:
216    <https://github.com/openssl/openssl/wiki>
217    "OpenSSL Wiki"
218
219[ossl-guide-migration(7ossl)]:
220    <https://www.openssl.org/docs/manmaster/man7/ossl-guide-migration.html>
221    "OpenSSL Migration Guide"
222
223[RFC 8446]:
224     <https://tools.ietf.org/html/rfc8446>
225
226[RFC 6347]:
227     <https://tools.ietf.org/html/rfc6347>
228
229[RFC 9000]:
230     <https://tools.ietf.org/html/rfc9000>
231
232[Binaries]:
233    <https://github.com/openssl/openssl/wiki/Binaries>
234    "List of third party OpenSSL binaries"
235
236[OpenSSL Guide]:
237    <https://www.openssl.org/docs/manmaster/man7/ossl-guide-introduction.html>
238    "An introduction to OpenSSL"
239
240<!-- Logos and Badges -->
241
242[openssl logo]:
243    doc/images/openssl.svg
244    "OpenSSL Logo"
245
246[github actions ci badge]:
247    <https://github.com/openssl/openssl/workflows/GitHub%20CI/badge.svg>
248    "GitHub Actions CI Status"
249
250[github actions ci]:
251    <https://github.com/openssl/openssl/actions?query=workflow%3A%22GitHub+CI%22>
252    "GitHub Actions CI"
253
254[appveyor badge]:
255    <https://ci.appveyor.com/api/projects/status/8e10o7xfrg73v98f/branch/master?svg=true>
256    "AppVeyor Build Status"
257
258[appveyor jobs]:
259    <https://ci.appveyor.com/project/openssl/openssl/branch/master>
260    "AppVeyor Jobs"
261