Reader small image

You're reading from  Demystifying Cryptography with OpenSSL 3.0

Product typeBook
Published inOct 2022
PublisherPackt
ISBN-139781800560345
Edition1st Edition
Concepts
Right arrow
Author (1)
Alexei Khlebnikov
Alexei Khlebnikov
author image
Alexei Khlebnikov

Alexei Khlebnikov has more than 20 years of professional experience in IT, where he worked in different roles - software developer, system administrator, DevOps engineer, technical leader, architect and project manager. During those years Alexei worked with many technologies - Security, Artificial Intelligence, Web Development, Embedded, Mobile, and Robotics. Among other companies, Alexei worked in Opera Software on the famous Opera Internet browser. Alexei has always been interested in security. He was one of the maintainers of security-related Opera browser modules, responsible for cryptography, SSL/TLS and integration with OpenSSL. He was also a member of the Security Architects group, responsible for the security of the Opera browser. Now Alexei lives in Oslo, Norway, and works as a senior consultant for Bespoke AS. He is also the leader of the Architects group at his current employer.
Read more about Alexei Khlebnikov

Right arrow

Initializing and uninitializing OpenSSL library

As of version 1.1.0, the OpenSSL library does not require explicit initialization and uninitialization. The library will automatically initialize and uninitialize.

However, it is still possible to initialize OpenSSL explicitly if some non-standard initialization is needed. It is also possible to uninitialize explicitly, but it is discouraged, especially in multithreaded programs or if OpenSSL may be used by both the program and another library in the same process. Note that after uninitialization, it is not possible to initialize OpenSSL again.

Explicit initialization is done by calling the OPENSSL_init_ssl() function. Explicit uninitialization is done by calling the OPENSSL_cleanup() function.

Older versions of OpenSSL, below 1.1.0, will not initialize automatically. If you need to use an old OpenSSL version, you have to initialize it explicitly, using now-deprecated functions called SSL_library_init() and EVP_cleanup().

...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Demystifying Cryptography with OpenSSL 3.0
Published in: Oct 2022Publisher: PacktISBN-13: 9781800560345

Author (1)

author image
Alexei Khlebnikov

Alexei Khlebnikov has more than 20 years of professional experience in IT, where he worked in different roles - software developer, system administrator, DevOps engineer, technical leader, architect and project manager. During those years Alexei worked with many technologies - Security, Artificial Intelligence, Web Development, Embedded, Mobile, and Robotics. Among other companies, Alexei worked in Opera Software on the famous Opera Internet browser. Alexei has always been interested in security. He was one of the maintainers of security-related Opera browser modules, responsible for cryptography, SSL/TLS and integration with OpenSSL. He was also a member of the Security Architects group, responsible for the security of the Opera browser. Now Alexei lives in Oslo, Norway, and works as a senior consultant for Bespoke AS. He is also the leader of the Architects group at his current employer.
Read more about Alexei Khlebnikov