# Poco::Crypto

# class OpenSSLInitializer

Library: Crypto
Package: CryptoCore
Header: Poco/Crypto/OpenSSLInitializer.h

## Description

Initalizes the OpenSSL library.

The class ensures the earliest initialization and the latest shutdown of the OpenSSL library.

## Member Summary

Member Functions: enableFIPSMode, haveLegacyProvider, initialize, isFIPSEnabled, uninitialize

## Constructors

### OpenSSLInitializer

OpenSSLInitializer();

Automatically initialize OpenSSL on startup.

## Destructor

### ~OpenSSLInitializer

~OpenSSLInitializer();

Automatically shut down OpenSSL on exit.

## Member Functions

### enableFIPSMode

static void enableFIPSMode(
bool enabled
);

Enable or disable FIPS mode. If FIPS is not available, this method doesn't do anything.

### haveLegacyProvider

static bool haveLegacyProvider();

Returns true if the OpenSSL legacy provider is available, otherwise false.

### initialize

static void initialize();

Initializes the OpenSSL machinery.

### isFIPSEnabled

static bool isFIPSEnabled();

Returns true if FIPS mode is enabled, false otherwise.

### uninitialize

static void uninitialize();

Shuts down the OpenSSL machinery.