## crypto

crypto — Crypto transforms implementation for OpenSSL.

## Stability Level

Stable, unless otherwise indicated

## Functions

xmlSecCryptoDLFunctionsPtr | xmlSecCryptoGetFunctions_openssl ()
int | xmlSecOpenSSLInit ()
int | xmlSecOpenSSLShutdown ()
int | xmlSecOpenSSLKeysMngrInit ()
int | xmlSecOpenSSLGenerateRandom ()
int | xmlSecOpenSSLSetDefaultTrustedCertsFolder ()
const xmlChar * | xmlSecOpenSSLGetDefaultTrustedCertsFolder ()
int | xmlSecOpenSSLSetLibCtx ()
OSSL_LIB_CTX * | xmlSecOpenSSLGetLibCtx ()
BIO * | xmlSecOpenSSLCreateMemBio ()
BIO * | xmlSecOpenSSLCreateMemBufBio ()
BIO * | xmlSecOpenSSLCreateReadFileBio ()
xmlSecKeyDataId | xmlSecOpenSSLKeyDataAesGetKlass ()
int | xmlSecOpenSSLKeyDataAesSet ()
xmlSecTransformId | xmlSecOpenSSLTransformAes128CbcGetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformAes192CbcGetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformAes256CbcGetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformAes128GcmGetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformAes192GcmGetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformAes256GcmGetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformKWAes128GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformKWAes192GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformKWAes256GetKlass ()
xmlSecKeyDataId | xmlSecOpenSSLKeyDataDesGetKlass ()
int | xmlSecOpenSSLKeyDataDesSet ()
xmlSecTransformId | xmlSecOpenSSLTransformDes3CbcGetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformKWDes3GetKlass ()
xmlSecKeyDataId | xmlSecOpenSSLKeyDataDsaGetKlass ()
int | xmlSecOpenSSLKeyDataDsaAdoptEvp ()
EVP_PKEY * | xmlSecOpenSSLKeyDataDsaGetEvp ()
xmlSecTransformId | xmlSecOpenSSLTransformDsaSha1GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformDsaSha256GetKlass ()
xmlSecKeyDataId | xmlSecOpenSSLKeyDataEcdsaGetKlass ()
int | xmlSecOpenSSLKeyDataEcdsaAdoptEvp ()
EVP_PKEY * | xmlSecOpenSSLKeyDataEcdsaGetEvp ()
xmlSecTransformId | xmlSecOpenSSLTransformEcdsaSha1GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformEcdsaSha224GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformEcdsaSha256GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformEcdsaSha384GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformEcdsaSha512GetKlass ()
xmlSecKeyDataId | xmlSecOpenSSLKeyDataGost2001GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformGost2001GostR3411_94GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformGostR3411_94GetKlass ()
xmlSecKeyDataId | xmlSecOpenSSLKeyDataGostR3410_2012_256GetKlass ()
xmlSecKeyDataId | xmlSecOpenSSLKeyDataGostR3410_2012_512GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformGostR3410_2012GostR3411_2012_256GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformGostR3410_2012GostR3411_2012_512GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformGostR3411_2012_256GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformGostR3411_2012_512GetKlass ()
xmlSecKeyDataId | xmlSecOpenSSLKeyDataHmacGetKlass ()
int | xmlSecOpenSSLKeyDataHmacSet ()
xmlSecTransformId | xmlSecOpenSSLTransformHmacMd5GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformHmacRipemd160GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformHmacSha1GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformHmacSha224GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformHmacSha256GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformHmacSha384GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformHmacSha512GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformMd5GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformRipemd160GetKlass ()
xmlSecKeyDataId | xmlSecOpenSSLKeyDataRsaGetKlass ()
int | xmlSecOpenSSLKeyDataRsaAdoptEvp ()
EVP_PKEY * | xmlSecOpenSSLKeyDataRsaGetEvp ()
xmlSecTransformId | xmlSecOpenSSLTransformRsaMd5GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformRsaRipemd160GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformRsaSha1GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformRsaSha224GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformRsaSha256GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformRsaSha384GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformRsaSha512GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformRsaPkcs1GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformRsaOaepGetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformSha1GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformSha224GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformSha256GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformSha384GetKlass ()
xmlSecTransformId | xmlSecOpenSSLTransformSha512GetKlass ()
void | xmlSecOpenSSLErrorsDefaultCallback ()

## Types and Values

#define | XMLSEC_OPENSSL_API_100
#define | XMLSEC_OPENSSL_API_110
#define | XMLSEC_OPENSSL_API_300
#define | XMLSEC_OPENSSL_API_111
#define | XMLSEC_NO_AES
#define | XMLSEC_NO_DES
#define | XMLSEC_NO_DSA
#define | XMLSEC_NO_ECDSA
#define | XMLSEC_NO_GOST
#define | XMLSEC_NO_GOST2012
#define | XMLSEC_NO_HMAC
#define | XMLSEC_NO_MD5
#define | XMLSEC_NO_RIPEMD160
#define | XMLSEC_NO_RSA
#define | XMLSEC_NO_SHA1
#define | XMLSEC_NO_SHA256
#define | XMLSEC_NO_SHA224
#define | XMLSEC_NO_SHA384
#define | XMLSEC_NO_SHA512
#define | XMLSEC_NO_X509
#define | xmlSecOpenSSLKeyDataAesId
#define | xmlSecOpenSSLTransformAes128CbcId
#define | xmlSecOpenSSLTransformAes192CbcId
#define | xmlSecOpenSSLTransformAes256CbcId
#define | xmlSecOpenSSLTransformAes128GcmId
#define | xmlSecOpenSSLTransformAes192GcmId
#define | xmlSecOpenSSLTransformAes256GcmId
#define | xmlSecOpenSSLTransformKWAes128Id
#define | xmlSecOpenSSLTransformKWAes192Id
#define | xmlSecOpenSSLTransformKWAes256Id
#define | xmlSecOpenSSLKeyDataDesId
#define | xmlSecOpenSSLTransformDes3CbcId
#define | xmlSecOpenSSLTransformKWDes3Id
#define | xmlSecOpenSSLKeyDataDsaId
#define | xmlSecOpenSSLTransformDsaSha1Id
#define | xmlSecOpenSSLTransformDsaSha256Id
#define | xmlSecOpenSSLKeyDataEcdsaId
#define | xmlSecOpenSSLTransformEcdsaSha1Id
#define | xmlSecOpenSSLTransformEcdsaSha224Id
#define | xmlSecOpenSSLTransformEcdsaSha256Id
#define | xmlSecOpenSSLTransformEcdsaSha384Id
#define | xmlSecOpenSSLTransformEcdsaSha512Id
#define | xmlSecOpenSSLKeyDataGost2001Id
#define | xmlSecOpenSSLTransformGost2001GostR3411_94Id
#define | xmlSecOpenSSLTransformGostR3411_94Id
#define | xmlSecOpenSSLKeyDataGostR3410_2012_256Id
#define | xmlSecOpenSSLKeyDataGostR3410_2012_512Id
#define | xmlSecOpenSSLTransformGostR3410_2012GostR3411_2012_256Id
#define | xmlSecOpenSSLTransformGostR3410_2012GostR3411_2012_512Id
#define | xmlSecOpenSSLTransformGostR3411_2012_256Id
#define | xmlSecOpenSSLTransformGostR3411_2012_512Id
#define | xmlSecOpenSSLKeyDataHmacId
#define | xmlSecOpenSSLTransformHmacMd5Id
#define | xmlSecOpenSSLTransformHmacRipemd160Id
#define | xmlSecOpenSSLTransformHmacSha1Id
#define | xmlSecOpenSSLTransformHmacSha224Id
#define | xmlSecOpenSSLTransformHmacSha256Id
#define | xmlSecOpenSSLTransformHmacSha384Id
#define | xmlSecOpenSSLTransformHmacSha512Id
#define | xmlSecOpenSSLTransformMd5Id
#define | xmlSecOpenSSLTransformRipemd160Id
#define | xmlSecOpenSSLKeyDataRsaId
#define | xmlSecOpenSSLTransformRsaMd5Id
#define | xmlSecOpenSSLTransformRsaRipemd160Id
#define | xmlSecOpenSSLTransformRsaSha1Id
#define | xmlSecOpenSSLTransformRsaSha224Id
#define | xmlSecOpenSSLTransformRsaSha256Id
#define | xmlSecOpenSSLTransformRsaSha384Id
#define | xmlSecOpenSSLTransformRsaSha512Id
#define | xmlSecOpenSSLTransformRsaPkcs1Id
#define | xmlSecOpenSSLTransformRsaOaepId
#define | xmlSecOpenSSLTransformSha1Id
#define | xmlSecOpenSSLTransformSha224Id
#define | xmlSecOpenSSLTransformSha256Id
#define | xmlSecOpenSSLTransformSha384Id
#define | xmlSecOpenSSLTransformSha512Id

## Description

## Functions

### xmlSecCryptoGetFunctions_openssl ()

    xmlSecCryptoDLFunctionsPtr
    xmlSecCryptoGetFunctions_openssl (void);

Gets the pointer to xmlsec-openssl functions table.

#### Returns

the xmlsec-openssl functions table or NULL if an error occurs.

### xmlSecOpenSSLInit ()

    int
    xmlSecOpenSSLInit (void);

XMLSec library specific crypto engine initialization.

#### Returns

0 on success or a negative value otherwise.

### xmlSecOpenSSLShutdown ()

    int
    xmlSecOpenSSLShutdown (void);

XMLSec library specific crypto engine shutdown.

#### Returns

0 on success or a negative value otherwise.

### xmlSecOpenSSLKeysMngrInit ()

    int
    xmlSecOpenSSLKeysMngrInit (xmlSecKeysMngrPtr mngr);

Adds OpenSSL specific key data stores in keys manager.

#### Parameters

mngr | the pointer to keys manager. |

#### Returns

0 on success or a negative value otherwise.

### xmlSecOpenSSLGenerateRandom ()

    int
    xmlSecOpenSSLGenerateRandom (xmlSecBufferPtr buffer,
                                 xmlSecSize size);

Generates `size` random bytes and puts result in `buffer` .

#### Parameters

buffer | the destination buffer. |
size | the numer of bytes to generate. |

#### Returns

0 on success or a negative value otherwise.

### xmlSecOpenSSLSetDefaultTrustedCertsFolder ()

    int
    xmlSecOpenSSLSetDefaultTrustedCertsFolder
                                   (const xmlChar *path);

Sets the default trusted certs folder.

#### Parameters

path | the default trusted certs path. |

#### Returns

0 on success or a negative value if an error occurs.

### xmlSecOpenSSLGetDefaultTrustedCertsFolder ()

    const xmlChar *
    xmlSecOpenSSLGetDefaultTrustedCertsFolder
                                   (void);

Gets the default trusted certs folder.

#### Returns

the default trusted cert folder.

### xmlSecOpenSSLSetLibCtx ()

    int
    xmlSecOpenSSLSetLibCtx (OSSL_LIB_CTX *libctx);

Sets the OSSL_LIB_CTX object to be used by xmlsec-openssl. The caller is responsible for lifetime of this object.

#### Parameters

libctx | the OSSL_LIB_CTX object to be used by xmlsec-openssl or NULL to use default. |

#### Returns

0 on success or a negative value if an error occurs.

### xmlSecOpenSSLGetLibCtx ()

    OSSL_LIB_CTX *
    xmlSecOpenSSLGetLibCtx (void);

Gets the current OSSL_LIB_CTX object to be used by xmlsec-openssl or NULL if the default one is used.

#### Returns

the current OSSL_LIB_CTX object or NULL if default is used.

### xmlSecOpenSSLCreateMemBio ()

    BIO *
    xmlSecOpenSSLCreateMemBio (void);

Creates a memory BIO using `xmlSecOpenSSLGetLibCtx()` for OpenSSL 3.0.

#### Returns

the pointer to BIO object or NULL if an error occurs/

### xmlSecOpenSSLCreateMemBufBio ()

    BIO *
    xmlSecOpenSSLCreateMemBufBio (const xmlSecByte *buf,
                                  xmlSecSize bufSize);

Creates a read-only memory BIO using `xmlSecOpenSSLGetLibCtx()` for OpenSSL 3.0 containing `len` bytes of data from `buf` .

#### Parameters

buf | the data |
bufSize | the data size |

#### Returns

the pointer to BIO object or NULL if an error occurs/

### xmlSecOpenSSLCreateReadFileBio ()

    BIO *
    xmlSecOpenSSLCreateReadFileBio (const char *path);

Creates a read-only file BIO using `xmlSecOpenSSLGetLibCtx()` for OpenSSL 3.0.

#### Parameters

path | the file path |

#### Returns

the pointer to BIO object or NULL if an error occurs/

### xmlSecOpenSSLKeyDataAesGetKlass ()

    xmlSecKeyDataId
    xmlSecOpenSSLKeyDataAesGetKlass (void);

The AES key data klass.

#### Returns

AES key data klass.

### xmlSecOpenSSLKeyDataAesSet ()

    int
    xmlSecOpenSSLKeyDataAesSet (xmlSecKeyDataPtr data,
                                const xmlSecByte *buf,
                                xmlSecSize bufSize);

Sets the value of AES key data.

#### Parameters

data | the pointer to AES key data. |
buf | the pointer to key value. |
bufSize | the key value size (in bytes). |

#### Returns

0 on success or a negative value if an error occurs.

### xmlSecOpenSSLTransformAes128CbcGetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformAes128CbcGetKlass
                                   (void);

AES 128 CBC encryption transform klass.

#### Returns

pointer to AES 128 CBC encryption transform.

### xmlSecOpenSSLTransformAes192CbcGetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformAes192CbcGetKlass
                                   (void);

AES 192 CBC encryption transform klass.

#### Returns

pointer to AES 192 CBC encryption transform.

### xmlSecOpenSSLTransformAes256CbcGetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformAes256CbcGetKlass
                                   (void);

AES 256 CBC encryption transform klass.

#### Returns

pointer to AES 256 CBC encryption transform.

### xmlSecOpenSSLTransformAes128GcmGetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformAes128GcmGetKlass
                                   (void);

AES 128 GCM encryption transform klass.

#### Returns

pointer to AES 128 GCM encryption transform.

### xmlSecOpenSSLTransformAes192GcmGetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformAes192GcmGetKlass
                                   (void);

AES 192 GCM encryption transform klass.

#### Returns

pointer to AES 192 GCM encryption transform.

### xmlSecOpenSSLTransformAes256GcmGetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformAes256GcmGetKlass
                                   (void);

AES 256 GCM encryption transform klass.

#### Returns

pointer to AES 256 GCM encryption transform.

### xmlSecOpenSSLTransformKWAes128GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformKWAes128GetKlass
                                   (void);

The AES-128 kew wrapper transform klass.

#### Returns

AES-128 kew wrapper transform klass.

### xmlSecOpenSSLTransformKWAes192GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformKWAes192GetKlass
                                   (void);

The AES-192 kew wrapper transform klass.

#### Returns

AES-192 kew wrapper transform klass.

### xmlSecOpenSSLTransformKWAes256GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformKWAes256GetKlass
                                   (void);

The AES-256 kew wrapper transform klass.

#### Returns

AES-256 kew wrapper transform klass.

### xmlSecOpenSSLKeyDataDesGetKlass ()

    xmlSecKeyDataId
    xmlSecOpenSSLKeyDataDesGetKlass (void);

The DES key data klass.

#### Returns

DES key data klass.

### xmlSecOpenSSLKeyDataDesSet ()

    int
    xmlSecOpenSSLKeyDataDesSet (xmlSecKeyDataPtr data,
                                const xmlSecByte *buf,
                                xmlSecSize bufSize);

Sets the value of DES key data.

#### Parameters

data | the pointer to DES key data. |
buf | the pointer to key value. |
bufSize | the key value size (in bytes). |

#### Returns

0 on success or a negative value if an error occurs.

### xmlSecOpenSSLTransformDes3CbcGetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformDes3CbcGetKlass (void);

Triple DES CBC encryption transform klass.

#### Returns

pointer to Triple DES encryption transform.

### xmlSecOpenSSLTransformKWDes3GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformKWDes3GetKlass (void);

The Triple DES key wrapper transform klass.

#### Returns

Triple DES key wrapper transform klass.

### xmlSecOpenSSLKeyDataDsaGetKlass ()

    xmlSecKeyDataId
    xmlSecOpenSSLKeyDataDsaGetKlass (void);

The DSA key data klass.

#### Returns

pointer to DSA key data klass.

### xmlSecOpenSSLKeyDataDsaAdoptEvp ()

    int
    xmlSecOpenSSLKeyDataDsaAdoptEvp (xmlSecKeyDataPtr data,
                                     EVP_PKEY *pKey);

Sets the DSA key data value to OpenSSL EVP key.

#### Parameters

data | the pointer to DSA key data. |
pKey | the pointer to OpenSSL EVP key. |

#### Returns

0 on success or a negative value otherwise.

### xmlSecOpenSSLKeyDataDsaGetEvp ()

    EVP_PKEY *
    xmlSecOpenSSLKeyDataDsaGetEvp (xmlSecKeyDataPtr data);

Gets the OpenSSL EVP key from DSA key data.

#### Parameters

data | the pointer to DSA key data. |

#### Returns

pointer to OpenSSL EVP key or NULL if an error occurs.

### xmlSecOpenSSLTransformDsaSha1GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformDsaSha1GetKlass (void);

The DSA-SHA1 signature transform klass.

#### Returns

DSA-SHA1 signature transform klass.

### xmlSecOpenSSLTransformDsaSha256GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformDsaSha256GetKlass
                                   (void);

The DSA-SHA256 signature transform klass.

#### Returns

DSA-SHA256 signature transform klass.

### xmlSecOpenSSLKeyDataEcdsaGetKlass ()

    xmlSecKeyDataId
    xmlSecOpenSSLKeyDataEcdsaGetKlass (void);

The ECDSA key data klass.

#### Returns

pointer to ECDSA key data klass.

### xmlSecOpenSSLKeyDataEcdsaAdoptEvp ()

    int
    xmlSecOpenSSLKeyDataEcdsaAdoptEvp (xmlSecKeyDataPtr data,
                                       EVP_PKEY *pKey);

Sets the ECDSA key data value to OpenSSL EVP key.

#### Parameters

data | the pointer to ECDSA key data. |
pKey | the pointer to OpenSSL EVP key. |

#### Returns

0 on success or a negative value otherwise.

### xmlSecOpenSSLKeyDataEcdsaGetEvp ()

    EVP_PKEY *
    xmlSecOpenSSLKeyDataEcdsaGetEvp (xmlSecKeyDataPtr data);

Gets the OpenSSL EVP key from ECDSA key data.

#### Parameters

data | the pointer to ECDSA key data. |

#### Returns

pointer to OpenSSL EVP key or NULL if an error occurs.

### xmlSecOpenSSLTransformEcdsaSha1GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformEcdsaSha1GetKlass
                                   (void);

The ECDSA-SHA1 signature transform klass.

#### Returns

ECDSA-SHA1 signature transform klass.

### xmlSecOpenSSLTransformEcdsaSha224GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformEcdsaSha224GetKlass
                                   (void);

The ECDSA-SHA224 signature transform klass.

#### Returns

ECDSA-SHA224 signature transform klass.

### xmlSecOpenSSLTransformEcdsaSha256GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformEcdsaSha256GetKlass
                                   (void);

The ECDSA-SHA256 signature transform klass.

#### Returns

ECDSA-SHA256 signature transform klass.

### xmlSecOpenSSLTransformEcdsaSha384GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformEcdsaSha384GetKlass
                                   (void);

The ECDSA-SHA384 signature transform klass.

#### Returns

ECDSA-SHA384 signature transform klass.

### xmlSecOpenSSLTransformEcdsaSha512GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformEcdsaSha512GetKlass
                                   (void);

The ECDSA-SHA512 signature transform klass.

#### Returns

ECDSA-SHA512 signature transform klass.

### xmlSecOpenSSLKeyDataGost2001GetKlass ()

    xmlSecKeyDataId
    xmlSecOpenSSLKeyDataGost2001GetKlass (void);

The GOST2001 key data klass.

#### Returns

pointer to GOST2001 key data klass.

### xmlSecOpenSSLTransformGost2001GostR3411_94GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformGost2001GostR3411_94GetKlass
                                   (void);

The GOST2001-GOSTR3411_94 signature transform klass.

#### Returns

GOST2001-GOSTR3411_94 signature transform klass.

### xmlSecOpenSSLTransformGostR3411_94GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformGostR3411_94GetKlass
                                   (void);

GOSTR3411_94 digest transform klass.

#### Returns

pointer to GOSTR3411_94 digest transform klass.

### xmlSecOpenSSLKeyDataGostR3410_2012_256GetKlass ()

    xmlSecKeyDataId
    xmlSecOpenSSLKeyDataGostR3410_2012_256GetKlass
                                   (void);

The GOST R 34.10-2012 256 bit key data klass.

#### Returns

pointer to GOST R 34.10-2012 256 bit key data klass.

### xmlSecOpenSSLKeyDataGostR3410_2012_512GetKlass ()

    xmlSecKeyDataId
    xmlSecOpenSSLKeyDataGostR3410_2012_512GetKlass
                                   (void);

The GOST R 34.10-2012 512 bit key data klass.

#### Returns

pointer to GOST R 34.10-2012 512 bit key data klass.

### xmlSecOpenSSLTransformGostR3410_2012GostR3411_2012_256GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformGostR3410_2012GostR3411_2012_256GetKlass
                                   (void);

### xmlSecOpenSSLTransformGostR3410_2012GostR3411_2012_512GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformGostR3410_2012GostR3411_2012_512GetKlass
                                   (void);

### xmlSecOpenSSLTransformGostR3411_2012_256GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformGostR3411_2012_256GetKlass
                                   (void);

GOST R 34.11-2012 256 bit digest transform klass.

#### Returns

pointer to GOST R 34.11-2012 256 bit digest transform klass.

### xmlSecOpenSSLTransformGostR3411_2012_512GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformGostR3411_2012_512GetKlass
                                   (void);

GOST R 34.11-2012 512 bit digest transform klass.

#### Returns

pointer to GOST R 34.11-2012 512 bit digest transform klass.

### xmlSecOpenSSLKeyDataHmacGetKlass ()

    xmlSecKeyDataId
    xmlSecOpenSSLKeyDataHmacGetKlass (void);

The HMAC key data klass.

#### Returns

HMAC key data klass.

### xmlSecOpenSSLKeyDataHmacSet ()

    int
    xmlSecOpenSSLKeyDataHmacSet (xmlSecKeyDataPtr data,
                                 const xmlSecByte *buf,
                                 xmlSecSize bufSize);

Sets the value of HMAC key data.

#### Parameters

data | the pointer to HMAC key data. |
buf | the pointer to key value. |
bufSize | the key value size (in bytes). |

#### Returns

0 on success or a negative value if an error occurs.

### xmlSecOpenSSLTransformHmacMd5GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformHmacMd5GetKlass (void);

The HMAC-MD5 transform klass.

#### Returns

the HMAC-MD5 transform klass.

### xmlSecOpenSSLTransformHmacRipemd160GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformHmacRipemd160GetKlass
                                   (void);

The HMAC-RIPEMD160 transform klass.

#### Returns

the HMAC-RIPEMD160 transform klass.

### xmlSecOpenSSLTransformHmacSha1GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformHmacSha1GetKlass
                                   (void);

The HMAC-SHA1 transform klass.

#### Returns

the HMAC-SHA1 transform klass.

### xmlSecOpenSSLTransformHmacSha224GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformHmacSha224GetKlass
                                   (void);

The HMAC-SHA224 transform klass.

#### Returns

the HMAC-SHA224 transform klass.

### xmlSecOpenSSLTransformHmacSha256GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformHmacSha256GetKlass
                                   (void);

The HMAC-SHA256 transform klass.

#### Returns

the HMAC-SHA256 transform klass.

### xmlSecOpenSSLTransformHmacSha384GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformHmacSha384GetKlass
                                   (void);

The HMAC-SHA384 transform klass.

#### Returns

the HMAC-SHA384 transform klass.

### xmlSecOpenSSLTransformHmacSha512GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformHmacSha512GetKlass
                                   (void);

The HMAC-SHA512 transform klass.

#### Returns

the HMAC-SHA512 transform klass.

### xmlSecOpenSSLTransformMd5GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformMd5GetKlass (void);

MD5 digest transform klass.

#### Returns

pointer to MD5 digest transform klass.

### xmlSecOpenSSLTransformRipemd160GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformRipemd160GetKlass
                                   (void);

RIPEMD-160 digest transform klass.

#### Returns

pointer to RIPEMD-160 digest transform klass.

### xmlSecOpenSSLKeyDataRsaGetKlass ()

    xmlSecKeyDataId
    xmlSecOpenSSLKeyDataRsaGetKlass (void);

The OpenSSL RSA key data klass.

#### Returns

pointer to OpenSSL RSA key data klass.

### xmlSecOpenSSLKeyDataRsaAdoptEvp ()

    int
    xmlSecOpenSSLKeyDataRsaAdoptEvp (xmlSecKeyDataPtr data,
                                     EVP_PKEY *pKey);

Sets the RSA key data value to OpenSSL EVP key.

#### Parameters

data | the pointer to RSA key data. |
pKey | the pointer to OpenSSL EVP key. |

#### Returns

0 on success or a negative value otherwise.

### xmlSecOpenSSLKeyDataRsaGetEvp ()

    EVP_PKEY *
    xmlSecOpenSSLKeyDataRsaGetEvp (xmlSecKeyDataPtr data);

Gets the OpenSSL EVP key from RSA key data.

#### Parameters

data | the pointer to RSA key data. |

#### Returns

pointer to OpenSSL EVP key or NULL if an error occurs.

### xmlSecOpenSSLTransformRsaMd5GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformRsaMd5GetKlass (void);

The RSA-MD5 signature transform klass.

#### Returns

RSA-MD5 signature transform klass.

### xmlSecOpenSSLTransformRsaRipemd160GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformRsaRipemd160GetKlass
                                   (void);

The RSA-RIPEMD160 signature transform klass.

#### Returns

RSA-RIPEMD160 signature transform klass.

### xmlSecOpenSSLTransformRsaSha1GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformRsaSha1GetKlass (void);

The RSA-SHA1 signature transform klass.

#### Returns

RSA-SHA1 signature transform klass.

### xmlSecOpenSSLTransformRsaSha224GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformRsaSha224GetKlass
                                   (void);

The RSA-SHA224 signature transform klass.

#### Returns

RSA-SHA224 signature transform klass.

### xmlSecOpenSSLTransformRsaSha256GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformRsaSha256GetKlass
                                   (void);

The RSA-SHA256 signature transform klass.

#### Returns

RSA-SHA256 signature transform klass.

### xmlSecOpenSSLTransformRsaSha384GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformRsaSha384GetKlass
                                   (void);

The RSA-SHA384 signature transform klass.

#### Returns

RSA-SHA384 signature transform klass.

### xmlSecOpenSSLTransformRsaSha512GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformRsaSha512GetKlass
                                   (void);

The RSA-SHA512 signature transform klass.

#### Returns

RSA-SHA512 signature transform klass.

### xmlSecOpenSSLTransformRsaPkcs1GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformRsaPkcs1GetKlass
                                   (void);

The RSA-PKCS1 key transport transform klass.

#### Returns

RSA-PKCS1 key transport transform klass.

### xmlSecOpenSSLTransformRsaOaepGetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformRsaOaepGetKlass (void);

The RSA-OAEP key transport transform klass.

#### Returns

RSA-OAEP key transport transform klass.

### xmlSecOpenSSLTransformSha1GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformSha1GetKlass (void);

SHA-1 digest transform klass.

#### Returns

pointer to SHA-1 digest transform klass.

### xmlSecOpenSSLTransformSha224GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformSha224GetKlass (void);

SHA-224 digest transform klass.

#### Returns

pointer to SHA-224 digest transform klass.

### xmlSecOpenSSLTransformSha256GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformSha256GetKlass (void);

SHA-256 digest transform klass.

#### Returns

pointer to SHA-256 digest transform klass.

### xmlSecOpenSSLTransformSha384GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformSha384GetKlass (void);

SHA-384 digest transform klass.

#### Returns

pointer to SHA-384 digest transform klass.

### xmlSecOpenSSLTransformSha512GetKlass ()

    xmlSecTransformId
    xmlSecOpenSSLTransformSha512GetKlass (void);

SHA-512 digest transform klass.

#### Returns

pointer to SHA-512 digest transform klass.

### xmlSecOpenSSLErrorsDefaultCallback ()

    void
    xmlSecOpenSSLErrorsDefaultCallback (const char *file,
                                        int line,
                                        const char *func,
                                        const char *errorObject,
                                        const char *errorSubject,
                                        int reason,
                                        const char *msg);

The errors reporting callback function.

#### Parameters

file | the error location file name (__FILE__ macro). |
line | the error location line number (__LINE__ macro). |
func | the error location function name (__FUNCTION__ macro). |
errorObject | the error specific error object |
errorSubject | the error specific error subject. |
reason | the error code. |
msg | the additional error message. |

## Types and Values

### XMLSEC_OPENSSL_API_100

    #define XMLSEC_OPENSSL_API_100      1

### XMLSEC_OPENSSL_API_110

    #define XMLSEC_OPENSSL_API_110      1

### XMLSEC_OPENSSL_API_300

    #define XMLSEC_OPENSSL_API_300      1

### XMLSEC_OPENSSL_API_111

    #define XMLSEC_OPENSSL_API_111      1

### XMLSEC_NO_AES

    #define XMLSEC_NO_AES       1

### XMLSEC_NO_DES

    #define XMLSEC_NO_DES       1

### XMLSEC_NO_DSA

    #define XMLSEC_NO_DSA       1

### XMLSEC_NO_ECDSA

    #define XMLSEC_NO_ECDSA     1

### XMLSEC_NO_GOST

    #define XMLSEC_NO_GOST      1

### XMLSEC_NO_GOST2012

    #define XMLSEC_NO_GOST2012  1

### XMLSEC_NO_HMAC

    #define XMLSEC_NO_HMAC      1

### XMLSEC_NO_MD5

    #define XMLSEC_NO_MD5       1

### XMLSEC_NO_RIPEMD160

    #define XMLSEC_NO_RIPEMD160 1

### XMLSEC_NO_RSA

    #define XMLSEC_NO_RSA       1

### XMLSEC_NO_SHA1

    #define XMLSEC_NO_SHA1      1

### XMLSEC_NO_SHA256

    #define XMLSEC_NO_SHA256    1

### XMLSEC_NO_SHA224

    #define XMLSEC_NO_SHA224    1

### XMLSEC_NO_SHA384

    #define XMLSEC_NO_SHA384    1

### XMLSEC_NO_SHA512

    #define XMLSEC_NO_SHA512    1

### XMLSEC_NO_X509

    #define XMLSEC_NO_X509      1

### xmlSecOpenSSLKeyDataAesId

    #define             xmlSecOpenSSLKeyDataAesId

The AES key klass.

### xmlSecOpenSSLTransformAes128CbcId

    #define             xmlSecOpenSSLTransformAes128CbcId

The AES128 CBC cipher transform klass.

### xmlSecOpenSSLTransformAes192CbcId

    #define             xmlSecOpenSSLTransformAes192CbcId

The AES192 CBC cipher transform klass.

### xmlSecOpenSSLTransformAes256CbcId

    #define             xmlSecOpenSSLTransformAes256CbcId

The AES256 CBC cipher transform klass.

### xmlSecOpenSSLTransformAes128GcmId

    #define             xmlSecOpenSSLTransformAes128GcmId

The AES128 GCM cipher transform klass.

### xmlSecOpenSSLTransformAes192GcmId

    #define             xmlSecOpenSSLTransformAes192GcmId

The AES192 GCM cipher transform klass.

### xmlSecOpenSSLTransformAes256GcmId

    #define             xmlSecOpenSSLTransformAes256GcmId

The AES256 GCM cipher transform klass.

### xmlSecOpenSSLTransformKWAes128Id

    #define             xmlSecOpenSSLTransformKWAes128Id

The AES 128 key wrap transform klass.

### xmlSecOpenSSLTransformKWAes192Id

    #define             xmlSecOpenSSLTransformKWAes192Id

The AES 192 key wrap transform klass.

### xmlSecOpenSSLTransformKWAes256Id

    #define             xmlSecOpenSSLTransformKWAes256Id

The AES 256 key wrap transform klass.

### xmlSecOpenSSLKeyDataDesId

    #define             xmlSecOpenSSLKeyDataDesId

The DES key klass.

### xmlSecOpenSSLTransformDes3CbcId

    #define             xmlSecOpenSSLTransformDes3CbcId

The DES3 CBC cipher transform klass.

### xmlSecOpenSSLTransformKWDes3Id

    #define             xmlSecOpenSSLTransformKWDes3Id

The DES3 KW transform klass.

### xmlSecOpenSSLKeyDataDsaId

    #define             xmlSecOpenSSLKeyDataDsaId

The DSA key klass.

### xmlSecOpenSSLTransformDsaSha1Id

    #define             xmlSecOpenSSLTransformDsaSha1Id

`xmlSecOpenSSLTransformDsaSha1Id` is deprecated and should not be used in newly-written code.

The DSA SHA1 signature transform klass.

### xmlSecOpenSSLTransformDsaSha256Id

    #define             xmlSecOpenSSLTransformDsaSha256Id

The DSA SHA256 signature transform klass.

### xmlSecOpenSSLKeyDataEcdsaId

    #define             xmlSecOpenSSLKeyDataEcdsaId

The ECDSA key klass.

### xmlSecOpenSSLTransformEcdsaSha1Id

    #define             xmlSecOpenSSLTransformEcdsaSha1Id

`xmlSecOpenSSLTransformEcdsaSha1Id` is deprecated and should not be used in newly-written code.

The ECDSA-SHA1 signature transform klass.

### xmlSecOpenSSLTransformEcdsaSha224Id

    #define             xmlSecOpenSSLTransformEcdsaSha224Id

The ECDSA-SHA224 signature transform klass.

### xmlSecOpenSSLTransformEcdsaSha256Id

    #define             xmlSecOpenSSLTransformEcdsaSha256Id

The ECDSA-SHA256 signature transform klass.

### xmlSecOpenSSLTransformEcdsaSha384Id

    #define             xmlSecOpenSSLTransformEcdsaSha384Id

The ECDSA-SHA384 signature transform klass.

### xmlSecOpenSSLTransformEcdsaSha512Id

    #define             xmlSecOpenSSLTransformEcdsaSha512Id

The ECDSA-SHA512 signature transform klass.

### xmlSecOpenSSLKeyDataGost2001Id

    #define             xmlSecOpenSSLKeyDataGost2001Id

The GOST2001 key klass.

### xmlSecOpenSSLTransformGost2001GostR3411_94Id

    #define             xmlSecOpenSSLTransformGost2001GostR3411_94Id

The GOST2001 GOSTR3411_94 signature transform klass.

### xmlSecOpenSSLTransformGostR3411_94Id

    #define             xmlSecOpenSSLTransformGostR3411_94Id

The GOSTR3411_94 signature transform klass.

### xmlSecOpenSSLKeyDataGostR3410_2012_256Id

    #define             xmlSecOpenSSLKeyDataGostR3410_2012_256Id

### xmlSecOpenSSLKeyDataGostR3410_2012_512Id

    #define             xmlSecOpenSSLKeyDataGostR3410_2012_512Id

### xmlSecOpenSSLTransformGostR3410_2012GostR3411_2012_256Id

    #define             xmlSecOpenSSLTransformGostR3410_2012GostR3411_2012_256Id

The GOST R 34.10-2012 - GOST R 3411-2012 256 bit signature transform klass.

### xmlSecOpenSSLTransformGostR3410_2012GostR3411_2012_512Id

    #define             xmlSecOpenSSLTransformGostR3410_2012GostR3411_2012_512Id

The GOST R 34.10-2012 - GOST R 3411-2012 512 bit signature transform klass.

### xmlSecOpenSSLTransformGostR3411_2012_256Id

    #define             xmlSecOpenSSLTransformGostR3411_2012_256Id

The GOST R 34.11-2012 256 bit hash transform klass.

### xmlSecOpenSSLTransformGostR3411_2012_512Id

    #define             xmlSecOpenSSLTransformGostR3411_2012_512Id

The GOST R 34.11-2012 512 bit hash transform klass.

### xmlSecOpenSSLKeyDataHmacId

    #define             xmlSecOpenSSLKeyDataHmacId

`xmlSecOpenSSLKeyDataHmacId` is deprecated and should not be used in newly-written code.

The DHMAC key klass.

### xmlSecOpenSSLTransformHmacMd5Id

    #define             xmlSecOpenSSLTransformHmacMd5Id

The HMAC with MD5 signature transform klass.

### xmlSecOpenSSLTransformHmacRipemd160Id

    #define             xmlSecOpenSSLTransformHmacRipemd160Id

The HMAC with RipeMD160 signature transform klass.

### xmlSecOpenSSLTransformHmacSha1Id

    #define             xmlSecOpenSSLTransformHmacSha1Id

The HMAC with SHA1 signature transform klass.

### xmlSecOpenSSLTransformHmacSha224Id

    #define             xmlSecOpenSSLTransformHmacSha224Id

The HMAC with SHA224 signature transform klass.

### xmlSecOpenSSLTransformHmacSha256Id

    #define             xmlSecOpenSSLTransformHmacSha256Id

The HMAC with SHA256 signature transform klass.

### xmlSecOpenSSLTransformHmacSha384Id

    #define             xmlSecOpenSSLTransformHmacSha384Id

The HMAC with SHA384 signature transform klass.

### xmlSecOpenSSLTransformHmacSha512Id

    #define             xmlSecOpenSSLTransformHmacSha512Id

The HMAC with SHA512 signature transform klass.

### xmlSecOpenSSLTransformMd5Id

    #define             xmlSecOpenSSLTransformMd5Id

The MD5 digest transform klass.

### xmlSecOpenSSLTransformRipemd160Id

    #define             xmlSecOpenSSLTransformRipemd160Id

The RIPEMD160 digest transform klass.

### xmlSecOpenSSLKeyDataRsaId

    #define             xmlSecOpenSSLKeyDataRsaId

The RSA key klass.

### xmlSecOpenSSLTransformRsaMd5Id

    #define             xmlSecOpenSSLTransformRsaMd5Id

`xmlSecOpenSSLTransformRsaMd5Id` is deprecated and should not be used in newly-written code.

The RSA-MD5 signature transform klass.

### xmlSecOpenSSLTransformRsaRipemd160Id

    #define             xmlSecOpenSSLTransformRsaRipemd160Id

The RSA-RIPEMD160 signature transform klass.

### xmlSecOpenSSLTransformRsaSha1Id

    #define             xmlSecOpenSSLTransformRsaSha1Id

The RSA-SHA1 signature transform klass.

### xmlSecOpenSSLTransformRsaSha224Id

    #define             xmlSecOpenSSLTransformRsaSha224Id

The RSA-SHA224 signature transform klass.

### xmlSecOpenSSLTransformRsaSha256Id

    #define             xmlSecOpenSSLTransformRsaSha256Id

The RSA-SHA256 signature transform klass.

### xmlSecOpenSSLTransformRsaSha384Id

    #define             xmlSecOpenSSLTransformRsaSha384Id

The RSA-SHA384 signature transform klass.

### xmlSecOpenSSLTransformRsaSha512Id

    #define             xmlSecOpenSSLTransformRsaSha512Id

The RSA-SHA512 signature transform klass.

### xmlSecOpenSSLTransformRsaPkcs1Id

    #define             xmlSecOpenSSLTransformRsaPkcs1Id

The RSA PKCS1 key transport transform klass.

### xmlSecOpenSSLTransformRsaOaepId

    #define             xmlSecOpenSSLTransformRsaOaepId

The RSA PKCS1 key transport transform klass.

### xmlSecOpenSSLTransformSha1Id

    #define             xmlSecOpenSSLTransformSha1Id

The SHA1 digest transform klass.

### xmlSecOpenSSLTransformSha224Id

    #define             xmlSecOpenSSLTransformSha224Id

The SHA224 digest transform klass.

### xmlSecOpenSSLTransformSha256Id

    #define             xmlSecOpenSSLTransformSha256Id

The SHA256 digest transform klass.

### xmlSecOpenSSLTransformSha384Id

    #define             xmlSecOpenSSLTransformSha384Id

The SHA384 digest transform klass.

### xmlSecOpenSSLTransformSha512Id

    #define             xmlSecOpenSSLTransformSha512Id

The SHA512 digest transform klass.