_libre_BUF_MEM_grow
_libre_BUF_MEM_grow_clean
_libre_ERR_load_BUF_strings
+_libre_OpenSSL_version
+_libre_OpenSSL_version_num
+_libre_SSLeay_version
+_libre_SSLeay
+_libre_CRYPTO_get_ex_data_implementation
+_libre_CRYPTO_set_ex_data_implementation
+_libre_CRYPTO_ex_data_new_class
+_libre_CRYPTO_get_ex_new_index
+_libre_CRYPTO_new_ex_data
+_libre_CRYPTO_dup_ex_data
+_libre_CRYPTO_free_ex_data
+_libre_CRYPTO_set_ex_data
+_libre_CRYPTO_get_ex_data
+_libre_CRYPTO_cleanup_all_ex_data
+_libre_CRYPTO_lock
+_libre_CRYPTO_add_lock
+_libre_CRYPTO_THREADID_current
+_libre_CRYPTO_THREADID_cmp
+_libre_CRYPTO_THREADID_cpy
+_libre_CRYPTO_THREADID_hash
+_libre_CRYPTO_set_mem_functions
+_libre_CRYPTO_set_locked_mem_functions
+_libre_CRYPTO_set_mem_ex_functions
+_libre_CRYPTO_set_locked_mem_ex_functions
+_libre_CRYPTO_set_mem_debug_functions
+_libre_CRYPTO_get_mem_functions
+_libre_CRYPTO_get_locked_mem_functions
+_libre_CRYPTO_get_mem_ex_functions
+_libre_CRYPTO_get_locked_mem_ex_functions
+_libre_CRYPTO_get_mem_debug_functions
+_libre_CRYPTO_realloc_clean
+_libre_CRYPTO_remalloc
+_libre_CRYPTO_set_mem_debug_options
+_libre_CRYPTO_get_mem_debug_options
+_libre_CRYPTO_push_info_
+_libre_CRYPTO_pop_info
+_libre_CRYPTO_remove_all_info
+_libre_CRYPTO_dbg_malloc
+_libre_CRYPTO_dbg_realloc
+_libre_CRYPTO_dbg_free
+_libre_CRYPTO_dbg_set_options
+_libre_CRYPTO_dbg_get_options
+_libre_CRYPTO_mem_leaks_fp
+_libre_CRYPTO_mem_leaks
+_libre_CRYPTO_mem_leaks_cb
+_libre_OpenSSLDie
+_libre_OPENSSL_cpu_caps
+_libre_OPENSSL_init_crypto
+_libre_OPENSSL_cleanup
+_libre_ERR_load_CRYPTO_strings
-/* $OpenBSD: cpt_err.c,v 1.14 2022/07/12 14:42:48 kn Exp $ */
+/* $OpenBSD: cpt_err.c,v 1.15 2023/07/08 08:28:23 beck Exp $ */
/* ====================================================================
* Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
*
}
#endif
}
+LCRYPTO_ALIAS(ERR_load_CRYPTO_strings);
-/* $OpenBSD: cryptlib.c,v 1.45 2019/01/26 11:30:32 deraadt Exp $ */
+/* $OpenBSD: cryptlib.c,v 1.46 2023/07/08 08:28:23 beck Exp $ */
/* ====================================================================
* Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
*
memset(id, 0, sizeof(*id));
id->val = (unsigned long)pthread_self();
}
+LCRYPTO_ALIAS(CRYPTO_THREADID_current);
int
CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a, const CRYPTO_THREADID *b)
{
return memcmp(a, b, sizeof(*a));
}
+LCRYPTO_ALIAS(CRYPTO_THREADID_cmp);
void
CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, const CRYPTO_THREADID *src)
{
memcpy(dest, src, sizeof(*src));
}
+LCRYPTO_ALIAS(CRYPTO_THREADID_cpy);
unsigned long
CRYPTO_THREADID_hash(const CRYPTO_THREADID *id)
{
return id->val;
}
+LCRYPTO_ALIAS(CRYPTO_THREADID_hash);
#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
defined(__INTEL__) || \
{
return OPENSSL_ia32cap_P;
}
+LCRYPTO_ALIAS(OPENSSL_cpu_caps);
#if defined(OPENSSL_CPUID_OBJ) && !defined(OPENSSL_NO_ASM)
#define OPENSSL_CPUID_SETUP
{
return 0;
}
+LCRYPTO_ALIAS(OPENSSL_cpu_caps);
#endif
#if !defined(OPENSSL_CPUID_SETUP) && !defined(OPENSSL_CPUID_OBJ)
getuid(), getprogname(), file, line, assertion);
_exit(1);
}
+LCRYPTO_ALIAS(OpenSSLDie);
int
CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len)
-/* $OpenBSD: crypto_init.c,v 1.10 2023/07/02 19:52:01 tb Exp $ */
+/* $OpenBSD: crypto_init.c,v 1.11 2023/07/08 08:28:23 beck Exp $ */
/*
* Copyright (c) 2018 Bob Beck <beck@openbsd.org>
*
return 1;
}
+LCRYPTO_ALIAS(OPENSSL_init_crypto);
void
OPENSSL_cleanup(void)
crypto_init_cleaned_up = 1;
}
+LCRYPTO_ALIAS(OPENSSL_cleanup);
-/* $OpenBSD: crypto_lock.c,v 1.5 2023/06/04 17:28:35 tb Exp $ */
+/* $OpenBSD: crypto_lock.c,v 1.6 2023/07/08 08:28:23 beck Exp $ */
/*
* Copyright (c) 2018 Brent Cook <bcook@openbsd.org>
*
else if (mode & CRYPTO_UNLOCK)
(void) pthread_mutex_unlock(&locks[type]);
}
+LCRYPTO_ALIAS(CRYPTO_lock);
int
CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,
return (ret);
}
+LCRYPTO_ALIAS(CRYPTO_add_lock);
-/* $OpenBSD: cversion.c,v 1.17 2018/02/17 06:56:12 jsing Exp $ */
+/* $OpenBSD: cversion.c,v 1.18 2023/07/08 08:28:23 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
}
return("not available");
}
+LCRYPTO_ALIAS(SSLeay_version);
unsigned long
SSLeay(void)
{
return (SSLEAY_VERSION_NUMBER);
}
+LCRYPTO_ALIAS(SSLeay);
const char *
OpenSSL_version(int t)
}
return("not available");
}
+LCRYPTO_ALIAS(OpenSSL_version);
unsigned long
OpenSSL_version_num(void)
{
return SSLeay();
}
+LCRYPTO_ALIAS(OpenSSL_version_num);
-/* $OpenBSD: ex_data.c,v 1.21 2023/06/16 11:20:01 tb Exp $ */
+/* $OpenBSD: ex_data.c,v 1.22 2023/07/08 08:28:23 beck Exp $ */
/*
* Overhaul notes;
IMPL_CHECK
return impl;
}
+LCRYPTO_ALIAS(CRYPTO_get_ex_data_implementation);
int
CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i)
CRYPTO_w_unlock(CRYPTO_LOCK_EX_DATA);
return toret;
}
+LCRYPTO_ALIAS(CRYPTO_set_ex_data_implementation);
/****************************************************************************/
/* Interal (default) implementation of "ex_data" support. API functions are
IMPL_CHECK
return EX_IMPL(new_class)();
}
+LCRYPTO_ALIAS(CRYPTO_ex_data_new_class);
/* Release all "ex_data" state to prevent memory leaks. This can't be made
* thread-safe without overhauling a lot of stuff, and shouldn't really be
IMPL_CHECK
EX_IMPL(cleanup)();
}
+LCRYPTO_ALIAS(CRYPTO_cleanup_all_ex_data);
/* Inside an existing class, get/register a new index. */
int
argl, argp, new_func, dup_func, free_func);
return ret;
}
+LCRYPTO_ALIAS(CRYPTO_get_ex_new_index);
/* Initialise a new CRYPTO_EX_DATA for use in a particular class - including
* calling new() callbacks for each index in the class used by this variable */
IMPL_CHECK
return EX_IMPL(new_ex_data)(class_index, obj, ad);
}
+LCRYPTO_ALIAS(CRYPTO_new_ex_data);
/* Duplicate a CRYPTO_EX_DATA variable - including calling dup() callbacks for
* each index in the class used by this variable */
IMPL_CHECK
return EX_IMPL(dup_ex_data)(class_index, to, from);
}
+LCRYPTO_ALIAS(CRYPTO_dup_ex_data);
/* Cleanup a CRYPTO_EX_DATA variable - including calling free() callbacks for
* each index in the class used by this variable */
IMPL_CHECK
EX_IMPL(free_ex_data)(class_index, obj, ad);
}
+LCRYPTO_ALIAS(CRYPTO_free_ex_data);
/* For a given CRYPTO_EX_DATA variable, set the value corresponding to a
* particular index in the class used by this variable */
sk_void_set(ad->sk, idx, val);
return (1);
}
+LCRYPTO_ALIAS(CRYPTO_set_ex_data);
/* For a given CRYPTO_EX_DATA_ variable, get the value corresponding to a
* particular index in the class used by this variable */
else
return (sk_void_value(ad->sk, idx));
}
+LCRYPTO_ALIAS(CRYPTO_get_ex_data);
--- /dev/null
+/* $OpenBSD: crypto.h,v 1.1 2023/07/08 08:28:23 beck Exp $ */
+/*
+ * Copyright (c) 2023 Bob Beck <beck@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _LIBCRYPTO_CRYPTO_H
+#define _LIBCRYPTO_CRYPTO_H
+
+#ifndef _MSC_VER
+#include_next <openssl/crypto.h>
+#else
+#include "../include/openssl/crypto.h"
+#endif
+#include "crypto_namespace.h"
+
+LCRYPTO_USED(OpenSSL_version);
+LCRYPTO_USED(OpenSSL_version_num);
+LCRYPTO_USED(SSLeay_version);
+LCRYPTO_USED(SSLeay);
+LCRYPTO_USED(CRYPTO_get_ex_data_implementation);
+LCRYPTO_USED(CRYPTO_set_ex_data_implementation);
+LCRYPTO_USED(CRYPTO_ex_data_new_class);
+LCRYPTO_USED(CRYPTO_get_ex_new_index);
+LCRYPTO_USED(CRYPTO_new_ex_data);
+LCRYPTO_USED(CRYPTO_dup_ex_data);
+LCRYPTO_USED(CRYPTO_free_ex_data);
+LCRYPTO_USED(CRYPTO_set_ex_data);
+LCRYPTO_USED(CRYPTO_get_ex_data);
+LCRYPTO_USED(CRYPTO_cleanup_all_ex_data);
+LCRYPTO_USED(CRYPTO_lock);
+LCRYPTO_USED(CRYPTO_add_lock);
+LCRYPTO_USED(CRYPTO_THREADID_current);
+LCRYPTO_USED(CRYPTO_THREADID_cmp);
+LCRYPTO_USED(CRYPTO_THREADID_cpy);
+LCRYPTO_USED(CRYPTO_THREADID_hash);
+LCRYPTO_USED(CRYPTO_set_mem_functions);
+LCRYPTO_USED(CRYPTO_set_locked_mem_functions);
+LCRYPTO_USED(CRYPTO_set_mem_ex_functions);
+LCRYPTO_USED(CRYPTO_set_locked_mem_ex_functions);
+LCRYPTO_USED(CRYPTO_set_mem_debug_functions);
+LCRYPTO_USED(CRYPTO_get_mem_functions);
+LCRYPTO_USED(CRYPTO_get_locked_mem_functions);
+LCRYPTO_USED(CRYPTO_get_mem_ex_functions);
+LCRYPTO_USED(CRYPTO_get_locked_mem_ex_functions);
+LCRYPTO_USED(CRYPTO_get_mem_debug_functions);
+LCRYPTO_USED(CRYPTO_realloc_clean);
+LCRYPTO_USED(CRYPTO_remalloc);
+LCRYPTO_USED(CRYPTO_set_mem_debug_options);
+LCRYPTO_USED(CRYPTO_get_mem_debug_options);
+LCRYPTO_USED(CRYPTO_push_info_);
+LCRYPTO_USED(CRYPTO_pop_info);
+LCRYPTO_USED(CRYPTO_remove_all_info);
+LCRYPTO_USED(CRYPTO_dbg_malloc);
+LCRYPTO_USED(CRYPTO_dbg_realloc);
+LCRYPTO_USED(CRYPTO_dbg_free);
+LCRYPTO_USED(CRYPTO_dbg_set_options);
+LCRYPTO_USED(CRYPTO_dbg_get_options);
+LCRYPTO_USED(CRYPTO_mem_leaks_fp);
+LCRYPTO_USED(CRYPTO_mem_leaks);
+LCRYPTO_USED(CRYPTO_mem_leaks_cb);
+LCRYPTO_USED(OpenSSLDie);
+LCRYPTO_USED(OPENSSL_cpu_caps);
+LCRYPTO_USED(OPENSSL_init_crypto);
+LCRYPTO_USED(OPENSSL_cleanup);
+LCRYPTO_USED(ERR_load_CRYPTO_strings);
+
+#endif /* _LIBCRYPTO_CRYPTO_H */
-/* $OpenBSD: malloc-wrapper.c,v 1.7 2018/05/13 13:49:04 jsing Exp $ */
+/* $OpenBSD: malloc-wrapper.c,v 1.8 2023/07/08 08:28:23 beck Exp $ */
/*
* Copyright (c) 2014 Bob Beck
*
#include <stdlib.h>
#include <string.h>
+#include <openssl/crypto.h>
+
int
CRYPTO_set_mem_functions(void *(*m)(size_t), void *(*r)(void *, size_t),
void (*f)(void *))
{
return 0;
}
+LCRYPTO_ALIAS(CRYPTO_set_mem_functions);
int
CRYPTO_set_mem_ex_functions(void *(*m)(size_t, const char *, int),
{
return 0;
}
+LCRYPTO_ALIAS(CRYPTO_set_mem_ex_functions);
int
CRYPTO_set_locked_mem_functions(void *(*m)(size_t), void (*f)(void *))
{
return 0;
}
+LCRYPTO_ALIAS(CRYPTO_set_locked_mem_functions);
int
CRYPTO_set_locked_mem_ex_functions(void *(*m)(size_t, const char *, int),
{
return 0;
}
+LCRYPTO_ALIAS(CRYPTO_set_locked_mem_ex_functions);
int
CRYPTO_set_mem_debug_functions(void (*m)(void *, int, const char *, int, int),
{
return 0;
}
+LCRYPTO_ALIAS(CRYPTO_set_mem_debug_functions);
void
if (f != NULL)
*f = free;
}
+LCRYPTO_ALIAS(CRYPTO_get_mem_functions);
void
CRYPTO_get_mem_ex_functions(void *(**m)(size_t, const char *, int),
if (f != NULL)
*f = free;
}
+LCRYPTO_ALIAS(CRYPTO_get_mem_ex_functions);
void
CRYPTO_get_locked_mem_functions(void *(**m)(size_t), void (**f)(void *))
if (f != NULL)
*f = free;
}
+LCRYPTO_ALIAS(CRYPTO_get_locked_mem_functions);
void
CRYPTO_get_locked_mem_ex_functions(void *(**m)(size_t, const char *, int),
if (f != NULL)
*f = free;
}
+LCRYPTO_ALIAS(CRYPTO_get_locked_mem_ex_functions);
void
CRYPTO_get_mem_debug_functions(void (**m)(void *, int, const char *, int, int),
if (go != NULL)
*go = NULL;
}
+LCRYPTO_ALIAS(CRYPTO_get_mem_debug_functions);
void *
return NULL;
return recallocarray(ptr, old_len, num, 1);
}
+LCRYPTO_ALIAS(CRYPTO_realloc_clean);
void
CRYPTO_free(void *ptr)
free(a);
return malloc(num);
}
+LCRYPTO_ALIAS(CRYPTO_remalloc);
void
CRYPTO_set_mem_debug_options(long bits)
{
return;
}
+LCRYPTO_ALIAS(CRYPTO_set_mem_debug_options);
long
CRYPTO_get_mem_debug_options(void)
{
return 0;
}
+LCRYPTO_ALIAS(CRYPTO_get_mem_debug_options);
-/* $OpenBSD: mem_dbg.c,v 1.24 2019/01/29 14:40:54 deraadt Exp $ */
+/* $OpenBSD: mem_dbg.c,v 1.25 2023/07/08 08:28:23 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
{
return;
}
+LCRYPTO_ALIAS(CRYPTO_dbg_set_options);
long
CRYPTO_dbg_get_options(void)
{
return (0);
}
+LCRYPTO_ALIAS(CRYPTO_dbg_get_options);
int
CRYPTO_push_info_(const char *info, const char *file, int line)
{
return (0);
}
+LCRYPTO_ALIAS(CRYPTO_push_info_);
int
CRYPTO_pop_info(void)
{
return (0);
}
+LCRYPTO_ALIAS(CRYPTO_pop_info);
int
CRYPTO_remove_all_info(void)
{
return (0);
}
+LCRYPTO_ALIAS(CRYPTO_remove_all_info);
void
CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line,
{
OPENSSL_assert("CRYPTO_dbg_malloc is no longer permitted");
}
+LCRYPTO_ALIAS(CRYPTO_dbg_malloc);
void
CRYPTO_dbg_free(void *addr, int before_p)
{
OPENSSL_assert("CRYPTO_dbg_free is no longer permitted");
}
+LCRYPTO_ALIAS(CRYPTO_dbg_free);
void
CRYPTO_dbg_realloc(void *addr1, void *addr2, int num,
{
OPENSSL_assert("CRYPTO_dbg_realloc is no longer permitted");
}
+LCRYPTO_ALIAS(CRYPTO_dbg_realloc);
int
CRYPTO_mem_leaks(BIO *b)
{
return -1;
}
+LCRYPTO_ALIAS(CRYPTO_mem_leaks);
int
CRYPTO_mem_leaks_fp(FILE *fp)
{
return -1;
}
+LCRYPTO_ALIAS(CRYPTO_mem_leaks_fp);
int
{
return -1;
}
+LCRYPTO_ALIAS(CRYPTO_mem_leaks_cb);