Network System 0.1.1
High-performance modular networking library for scalable client-server applications
Loading...
Searching...
No Matches
openssl_compat.h File Reference

OpenSSL utilities and version definitions. More...

#include <openssl/opensslv.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/evp.h>
Include dependency graph for openssl_compat.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  kcenon
 
namespace  kcenon::network
 Main namespace for all Network System components.
 
namespace  kcenon::network::internal
 

Macros

#define NETWORK_OPENSSL_SUPPRESS_DEPRECATED_START
 Verify OpenSSL 3.x is being used.
 
#define NETWORK_OPENSSL_SUPPRESS_DEPRECATED_END
 

Functions

const char * kcenon::network::internal::openssl_version_string () noexcept
 Get OpenSSL version string.
 
std::string kcenon::network::internal::get_openssl_error () noexcept
 Get last OpenSSL error as string.
 
void kcenon::network::internal::clear_openssl_errors () noexcept
 Clear all OpenSSL errors from the thread's error queue.
 

Detailed Description

OpenSSL utilities and version definitions.

This header provides utility macros and functions for working with OpenSSL 3.x.

OpenSSL Version Support:

  • OpenSSL 3.x: Required (minimum version)

Note: OpenSSL 1.1.x support was removed as it reached End-of-Life on September 11, 2023. Users must use OpenSSL 3.x or later.

Definition in file openssl_compat.h.

Macro Definition Documentation

◆ NETWORK_OPENSSL_SUPPRESS_DEPRECATED_END

#define NETWORK_OPENSSL_SUPPRESS_DEPRECATED_END

Definition at line 72 of file openssl_compat.h.

◆ NETWORK_OPENSSL_SUPPRESS_DEPRECATED_START

#define NETWORK_OPENSSL_SUPPRESS_DEPRECATED_START

Verify OpenSSL 3.x is being used.

OpenSSL 3.0 introduced significant API changes including:

  • Provider-based architecture
  • Deprecated many low-level APIs
  • New EVP_MAC API replacing HMAC()

This library requires OpenSSL 3.x. OpenSSL 1.1.x is no longer supported as it reached End-of-Life on September 11, 2023.

Suppress OpenSSL deprecation warnings

OpenSSL 3.x marks some APIs as deprecated across minor releases. Use these macros to suppress warnings when using such APIs.

Usage: NETWORK_OPENSSL_SUPPRESS_DEPRECATED_START // Code using potentially deprecated APIs NETWORK_OPENSSL_SUPPRESS_DEPRECATED_END

Definition at line 71 of file openssl_compat.h.