mirror of
https://github.com/jorisvink/kore
synced 2025-03-09 12:39:01 -04:00
Get rid of the openssl libcrypto allocation hooks.
In practice this rarely works anyway as other libs can end up allocating things before we even reach main() as demonstrated on the discord channel earlier.
This commit is contained in:
parent
9fec810ce8
commit
83d1ff1013
@ -76,12 +76,6 @@ static int tls_keymgr_rsa_finish(RSA *);
|
|||||||
static int tls_keymgr_rsa_privenc(int, const unsigned char *,
|
static int tls_keymgr_rsa_privenc(int, const unsigned char *,
|
||||||
unsigned char *, RSA *, int);
|
unsigned char *, RSA *, int);
|
||||||
|
|
||||||
#if !defined(LIBRESSL_VERSION_NUMBER)
|
|
||||||
static void tls_free(void *, const char *, int);
|
|
||||||
static void *tls_malloc(size_t, const char *, int);
|
|
||||||
static void *tls_realloc(void *, size_t, const char *, int);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static DH *dh_params = NULL;
|
static DH *dh_params = NULL;
|
||||||
static RSA_METHOD *keymgr_rsa_meth = NULL;
|
static RSA_METHOD *keymgr_rsa_meth = NULL;
|
||||||
static int tls_version = KORE_TLS_VERSION_BOTH;
|
static int tls_version = KORE_TLS_VERSION_BOTH;
|
||||||
@ -108,11 +102,6 @@ kore_tls_supported(void)
|
|||||||
void
|
void
|
||||||
kore_tls_init(void)
|
kore_tls_init(void)
|
||||||
{
|
{
|
||||||
#if !defined(LIBRESSL_VERSION_NUMBER)
|
|
||||||
if (!CRYPTO_set_mem_functions(tls_malloc, tls_realloc, tls_free))
|
|
||||||
fatalx("CRYPTO_set_mem_functions failed");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
SSL_library_init();
|
SSL_library_init();
|
||||||
SSL_load_error_strings();
|
SSL_load_error_strings();
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
@ -1165,26 +1154,6 @@ tls_privsep_private_key(EVP_PKEY *pub, struct kore_domain *dom)
|
|||||||
return (pkey);
|
return (pkey);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(LIBRESSL_VERSION_NUMBER)
|
|
||||||
static void *
|
|
||||||
tls_malloc(size_t len, const char *file, int line)
|
|
||||||
{
|
|
||||||
return (kore_malloc(len));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void *
|
|
||||||
tls_realloc(void *ptr, size_t len, const char *file, int line)
|
|
||||||
{
|
|
||||||
return (kore_realloc(ptr, len));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
tls_free(void *ptr, const char *file, int line)
|
|
||||||
{
|
|
||||||
kore_free(ptr);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(KORE_USE_ACME)
|
#if defined(KORE_USE_ACME)
|
||||||
static int
|
static int
|
||||||
tls_acme_alpn(SSL *ssl, const unsigned char **out, unsigned char *outlen,
|
tls_acme_alpn(SSL *ssl, const unsigned char **out, unsigned char *outlen,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user