Go to the documentation of this file.
29 #ifndef CRYPTO_OPENSSL_H_
30 #define CRYPTO_OPENSSL_H_
32 #include <openssl/evp.h>
33 #include <openssl/hmac.h>
34 #include <openssl/md5.h>
35 #include <openssl/sha.h>
36 #if OPENSSL_VERSION_NUMBER >= 0x30000000L
37 #include <openssl/provider.h>
47 #if OPENSSL_VERSION_NUMBER < 0x30000000L
55 uint8_t
key[EVP_MAX_KEY_LENGTH];
65 #if OPENSSL_VERSION_NUMBER < 0x30000000L
74 #define OPENVPN_MAX_IV_LENGTH EVP_MAX_IV_LENGTH
77 #define OPENVPN_MODE_CBC EVP_CIPH_CBC_MODE
80 #define OPENVPN_MODE_OFB EVP_CIPH_OFB_MODE
83 #define OPENVPN_MODE_CFB EVP_CIPH_CFB_MODE
86 #define OPENVPN_MODE_GCM EVP_CIPH_GCM_MODE
89 #define OPENVPN_OP_ENCRYPT 1
92 #define OPENVPN_OP_DECRYPT 0
94 #define DES_KEY_LENGTH 8
95 #define MD4_DIGEST_LENGTH 16
115 #define crypto_msg(flags, ...) \
117 crypto_print_openssl_errors(nonfatal(flags)); \
118 msg((flags), __VA_ARGS__); \
HMAC_CTX hmac_ctx_t
Generic HMAC context.
EVP_MD_CTX md_ctx_t
Generic message digest context.
Container for unidirectional cipher and HMAC key material.
EVP_CIPHER_CTX cipher_ctx_t
Generic cipher context.
EVP_PKEY * engine_load_key(const char *file, SSL_CTX *ctx)
Load a key file from an engine.
const typedef EVP_CIPHER evp_cipher_type
void crypto_print_openssl_errors(const unsigned int flags)
Retrieve any occurred OpenSSL errors and print those errors.
const typedef EVP_MD evp_md_type