X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fcrypto.h;h=61605769bb2b3d2016d156ee5f39f27aed832d24;hb=0e05b51fe5eecb9cf6801636b3eca48d2cfef80f;hp=da3e27bc2f815089146aa9bb6bf05d871def8a8e;hpb=65300dcfb04bae643ea7b8f42ff8c8f1b1210a9e;p=oweals%2Fopenssl.git diff --git a/crypto/crypto.h b/crypto/crypto.h index da3e27bc2f..61605769bb 100644 --- a/crypto/crypto.h +++ b/crypto/crypto.h @@ -488,10 +488,10 @@ void CRYPTO_get_mem_debug_functions(void (**m)(void *,int,const char *,int,int), long (**go)(void)); void *CRYPTO_malloc_locked(int num, const char *file, int line); -void CRYPTO_free_locked(void *); +void CRYPTO_free_locked(void *ptr); void *CRYPTO_malloc(int num, const char *file, int line); char *CRYPTO_strdup(const char *str, const char *file, int line); -void CRYPTO_free(void *); +void CRYPTO_free(void *ptr); void *CRYPTO_realloc(void *addr,int num, const char *file, int line); void *CRYPTO_realloc_clean(void *addr,int old_num,int num,const char *file, int line); @@ -563,9 +563,15 @@ void OPENSSL_init(void); return private_##alg##_Init(c); \ } \ int private_##alg##_Init(cx##_CTX *c) + +#define fips_cipher_abort(alg) \ + if (FIPS_mode()) OpenSSLDie(__FILE__, __LINE__, \ + "Low level API call to cipher " #alg " forbidden in FIPS mode!") + #else #define fips_md_init_ctx(alg, cx) \ int alg##_Init(cx##_CTX *c) +#define fips_cipher_abort(alg) while(0) #endif /* BEGIN ERROR CODES */