mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 06:40:05 +00:00
LibCrypto: Remove OpenSSL as a public header dependency
Add a forwarding header for OpenSSL types so that we can build without propagating the OpenSSL dependency.
This commit is contained in:
parent
559c5a7311
commit
daa81c9b32
Notes:
github-actions[bot]
2025-01-13 16:01:56 +00:00
Author: https://github.com/devgianlu
Commit: daa81c9b32
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3234
3 changed files with 34 additions and 6 deletions
|
@ -10,8 +10,7 @@
|
|||
#include <AK/NonnullOwnPtr.h>
|
||||
#include <AK/Types.h>
|
||||
#include <LibCrypto/Hash/HashFunction.h>
|
||||
|
||||
#include <openssl/evp.h>
|
||||
#include <LibCrypto/OpenSSLForward.h>
|
||||
|
||||
namespace Crypto::Hash {
|
||||
|
||||
|
|
|
@ -9,10 +9,7 @@
|
|||
#include <AK/Error.h>
|
||||
#include <AK/Format.h>
|
||||
#include <LibCrypto/BigInt/UnsignedBigInteger.h>
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/evp.h>
|
||||
#include <LibCrypto/OpenSSLForward.h>
|
||||
|
||||
namespace Crypto {
|
||||
|
||||
|
|
32
Libraries/LibCrypto/OpenSSLForward.h
Normal file
32
Libraries/LibCrypto/OpenSSLForward.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Altomani Gianluca <altomanigianluca@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
extern "C" {
|
||||
typedef struct engine_st ENGINE;
|
||||
typedef struct bignum_st BIGNUM;
|
||||
typedef struct evp_md_st EVP_MD;
|
||||
typedef struct evp_md_ctx_st EVP_MD_CTX;
|
||||
typedef struct evp_pkey_st EVP_PKEY;
|
||||
typedef struct evp_pkey_ctx_st EVP_PKEY_CTX;
|
||||
|
||||
long unsigned int ERR_get_error();
|
||||
char* ERR_error_string(long unsigned int, char*);
|
||||
|
||||
EVP_MD_CTX* EVP_MD_CTX_new();
|
||||
void EVP_MD_CTX_free(EVP_MD_CTX*);
|
||||
int EVP_DigestUpdate(EVP_MD_CTX*, void const*, size_t);
|
||||
int EVP_DigestInit_ex(EVP_MD_CTX*, const EVP_MD*, ENGINE*);
|
||||
int EVP_DigestFinal_ex(EVP_MD_CTX*, unsigned char*, unsigned int*);
|
||||
int EVP_MD_CTX_copy_ex(EVP_MD_CTX*, EVP_MD_CTX const*);
|
||||
|
||||
void EVP_PKEY_CTX_free(EVP_PKEY_CTX*);
|
||||
|
||||
void EVP_PKEY_free(EVP_PKEY*);
|
||||
|
||||
void BN_free(BIGNUM*);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue