XRootD
XrdCryptoLite_bf32.cc File Reference
#include "XrdCrypto/XrdCryptoLite.hh"
#include <cerrno>
#include <cstdlib>
#include <cstring>
#include <sys/types.h>
#include <netinet/in.h>
#include <cinttypes>
#include <openssl/evp.h>
#include <openssl/opensslv.h>
#include "XrdOuc/XrdOucCRC.hh"
#include "XrdSys/XrdSysHeaders.hh"
+ Include dependency graph for XrdCryptoLite_bf32.cc:

Go to the source code of this file.

Classes

class  XrdCryptoLite_bf32
 

Functions

XrdCryptoLiteXrdCryptoLite_New_bf32 (const char Type)
 

Function Documentation

◆ XrdCryptoLite_New_bf32()

XrdCryptoLite* XrdCryptoLite_New_bf32 ( const char  Type)

Definition at line 175 of file XrdCryptoLite_bf32.cc.

176 {
177 #if OPENSSL_VERSION_NUMBER >= 0x30000000L
178  // With openssl v3 the blowfish cipher is only available via the "legacy"
179  // provider. Legacy is typically not enabled by default (but can be via
180  // openssl.cnf) so it is loaded here. Explicitly loading a provider will
181  // disable the automatic loading of the "default" one. The default might
182  // not have already been loaded, or standard algorithms might be available
183  // via another configured provider, such as FIPS. So an attempt is made to
184  // fetch a common default algorithm, possibly automaticlly loading the
185  // default provider. Afterwards the legacy provider is loaded.
186  static struct loadProviders {
187  loadProviders() {
188  EVP_MD *mdp = EVP_MD_fetch(NULL, "SHA2-256", NULL);
189  if (mdp) EVP_MD_free(mdp);
190  // Load legacy provider into the default (NULL) library context
191  (void) OSSL_PROVIDER_load(NULL, "legacy");
192  }
193  } lp;
194 #endif
195  return (XrdCryptoLite *)(new XrdCryptoLite_bf32(Type));
196 }

Referenced by XrdCryptoLite::Create().

+ Here is the caller graph for this function: