MySQL 8.0.39
Source Code Documentation
my_openssl_fips.cc File Reference
#include "my_openssl_fips.h"
#include <assert.h>
#include <openssl/err.h>
#include <openssl/ec.h>

Functions

int get_fips_mode ()
 Get fips mode from openssl library,. More...
 
static int set_fips_mode_inner (int fips_mode)
 Sets fips mode. More...
 
bool set_fips_mode (const int fips_mode, char err_string[OPENSSL_ERROR_LENGTH])
 Turns FIPs mode on or off. More...
 
int test_ssl_fips_mode (char err_string[OPENSSL_ERROR_LENGTH])
 Toggle FIPS mode, to see whether it is available with the current SSL library. More...
 
void fips_deinit ()
 
void fips_init ()
 

Function Documentation

◆ fips_deinit()

void fips_deinit ( )

◆ fips_init()

void fips_init ( )

◆ get_fips_mode()

int get_fips_mode ( )

Get fips mode from openssl library,.

Returns
openssl current fips mode

◆ set_fips_mode()

bool set_fips_mode ( const int  fips_mode,
char  err_string[OPENSSL_ERROR_LENGTH] 
)

Turns FIPs mode on or off.

Parameters
[in]fips_mode0 for fips mode off, non-zero for fips mode ON
[out]err_stringIf fips mode set fails, err_string will have detail failure reason.
Returns
openssl set fips mode errors
Return values
truefor error
falsefor success

◆ set_fips_mode_inner()

static int set_fips_mode_inner ( int  fips_mode)
static

Sets fips mode.

On error the error is in the openssl error stack

Return values
0failure
non-0success

◆ test_ssl_fips_mode()

int test_ssl_fips_mode ( char  err_string[OPENSSL_ERROR_LENGTH])

Toggle FIPS mode, to see whether it is available with the current SSL library.

Return values
0FIPS is not supported.
non-zeroFIPS is supported.