|
OpenVPN
|
Data Channel Cryptography backend interface using the TF-PSA-Crypto library part of Mbed TLS 4. More...

Go to the source code of this file.
Data Structures | |
| struct | cipher_info |
| union | psa_cipher_or_aead_operation |
| struct | cipher_ctx |
| struct | md_info |
| struct | md_ctx |
| struct | hmac_ctx |
Macros | |
| #define | OPENVPN_MAX_IV_LENGTH 16 |
| Maximum length of an IV. | |
| #define | OPENVPN_MODE_CBC PSA_ALG_CBC_PKCS7 |
| Cipher is in CBC mode. | |
| #define | OPENVPN_MODE_OFB PSA_ALG_OFB |
| Cipher is in OFB mode. | |
| #define | OPENVPN_MODE_CFB PSA_ALG_CFB |
| Cipher is in CFB mode. | |
| #define | OPENVPN_MODE_GCM PSA_ALG_GCM |
| Cipher is in GCM mode. | |
| #define | OPENVPN_OP_ENCRYPT 0 |
| Cipher should encrypt. | |
| #define | OPENVPN_OP_DECRYPT 1 |
| Cipher should decrypt. | |
| #define | MD4_DIGEST_LENGTH 16 |
| #define | MD5_DIGEST_LENGTH 16 |
| #define | SHA_DIGEST_LENGTH 20 |
| #define | SHA256_DIGEST_LENGTH 32 |
| #define | mbed_ok(errval) mbed_log_func_line_lite(D_CRYPT_ERRORS, errval, __func__, __LINE__) |
| Check errval and log on error. | |
Typedefs | |
| typedef int | crypto_operation_t |
| typedef void | provider_t |
| typedef struct cipher_info | cipher_info_t |
| typedef union psa_cipher_or_aead_operation | cipher_operation_t |
| typedef struct cipher_ctx | cipher_ctx_t |
| typedef struct md_info | md_info_t |
| typedef struct md_ctx | md_ctx_t |
| typedef struct hmac_ctx | hmac_ctx_t |
Functions | |
| bool | mbed_log_err (unsigned int flags, int errval, const char *prefix) |
| Log the supplied mbed TLS error, prefixed by supplied prefix. | |
| bool | mbed_log_func_line (unsigned int flags, int errval, const char *func, int line) |
| Log the supplied mbed TLS error, prefixed by function name and line number. | |
| static bool | mbed_log_func_line_lite (unsigned int flags, int errval, const char *func, int line) |
| Wraps mbed_log_func_line() to prevent function calls for non-errors. | |
Data Channel Cryptography backend interface using the TF-PSA-Crypto library part of Mbed TLS 4.
Definition in file crypto_mbedtls.h.
| #define mbed_ok | ( | errval | ) | mbed_log_func_line_lite(D_CRYPT_ERRORS, errval, __func__, __LINE__) |
Check errval and log on error.
Convenience wrapper to put around mbed TLS library calls, e.g. if (!mbed_ok (mbedtls_ssl_func())) return 0; or ASSERT (mbed_ok (mbedtls_ssl_func()));
| errval | mbed TLS error code to convert to error message. |
Definition at line 161 of file crypto_mbedtls.h.
| #define MD4_DIGEST_LENGTH 16 |
Definition at line 61 of file crypto_mbedtls.h.
| #define MD5_DIGEST_LENGTH 16 |
Definition at line 62 of file crypto_mbedtls.h.
| #define OPENVPN_MAX_IV_LENGTH 16 |
Maximum length of an IV.
Definition at line 39 of file crypto_mbedtls.h.
| #define OPENVPN_MODE_CBC PSA_ALG_CBC_PKCS7 |
Cipher is in CBC mode.
Definition at line 42 of file crypto_mbedtls.h.
| #define OPENVPN_MODE_CFB PSA_ALG_CFB |
Cipher is in CFB mode.
Definition at line 48 of file crypto_mbedtls.h.
| #define OPENVPN_MODE_GCM PSA_ALG_GCM |
Cipher is in GCM mode.
Definition at line 51 of file crypto_mbedtls.h.
| #define OPENVPN_MODE_OFB PSA_ALG_OFB |
Cipher is in OFB mode.
Definition at line 45 of file crypto_mbedtls.h.
| #define OPENVPN_OP_DECRYPT 1 |
Cipher should decrypt.
Definition at line 59 of file crypto_mbedtls.h.
| #define OPENVPN_OP_ENCRYPT 0 |
Cipher should encrypt.
Definition at line 56 of file crypto_mbedtls.h.
| #define SHA256_DIGEST_LENGTH 32 |
Definition at line 64 of file crypto_mbedtls.h.
| #define SHA_DIGEST_LENGTH 20 |
Definition at line 63 of file crypto_mbedtls.h.
| typedef struct cipher_ctx cipher_ctx_t |
| typedef struct cipher_info cipher_info_t |
| typedef union psa_cipher_or_aead_operation cipher_operation_t |
| typedef int crypto_operation_t |
Definition at line 53 of file crypto_mbedtls.h.
| typedef struct hmac_ctx hmac_ctx_t |
| typedef void provider_t |
Definition at line 66 of file crypto_mbedtls.h.
| bool mbed_log_err | ( | unsigned int | flags, |
| int | errval, | ||
| const char * | prefix | ||
| ) |
Log the supplied mbed TLS error, prefixed by supplied prefix.
| flags | Flags to indicate error type and priority. |
| errval | mbed TLS error code. |
| prefix | Prefix to mbed TLS error message. |
| bool mbed_log_func_line | ( | unsigned int | flags, |
| int | errval, | ||
| const char * | func, | ||
| int | line | ||
| ) |
Log the supplied mbed TLS error, prefixed by function name and line number.
| flags | Flags to indicate error type and priority. |
| errval | mbed TLS error code. |
| func | Function name where error was reported. |
| line | Line number where error was reported. |
Referenced by mbed_log_func_line_lite().
|
inlinestatic |
Wraps mbed_log_func_line() to prevent function calls for non-errors.
Definition at line 139 of file crypto_mbedtls.h.
References mbed_log_func_line().