_libre_BIO_snprintf
_libre_BIO_vsnprintf
_libre_ERR_load_BIO_strings
+_libre_SM4_set_key
+_libre_SM4_decrypt
+_libre_SM4_encrypt
+_libre_SM3_Init
+_libre_SM3_Update
+_libre_SM3_Final
+_libre_RAND_set_rand_method
+_libre_RAND_get_rand_method
+_libre_RAND_set_rand_engine
+_libre_RAND_SSLeay
+_libre_RAND_cleanup
+_libre_RAND_bytes
+_libre_RAND_pseudo_bytes
+_libre_RAND_seed
+_libre_RAND_add
+_libre_RAND_load_file
+_libre_RAND_write_file
+_libre_RAND_file_name
+_libre_RAND_status
+_libre_RAND_poll
+_libre_ERR_load_RAND_strings
+_libre_CRYPTO_poly1305_init
+_libre_CRYPTO_poly1305_update
+_libre_CRYPTO_poly1305_finish
_libre_TS_REQ_new
_libre_TS_REQ_free
_libre_i2d_TS_REQ
--- /dev/null
+/* $OpenBSD: poly1305.h,v 1.1 2023/07/07 12:01:32 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_POLY1305_H
+#define _LIBCRYPTO_POLY1305_H
+
+#ifndef _MSC_VER
+#include_next <openssl/poly1305.h>
+#else
+#include "../include/openssl/poly1305.h"
+#endif
+#include "crypto_namespace.h"
+
+LCRYPTO_USED(CRYPTO_poly1305_init);
+LCRYPTO_USED(CRYPTO_poly1305_update);
+LCRYPTO_USED(CRYPTO_poly1305_finish);
+
+#endif /* _LIBCRYPTO_POLY1305_H */
--- /dev/null
+/* $OpenBSD: rand.h,v 1.1 2023/07/07 12:01:32 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_RAND_H
+#define _LIBCRYPTO_RAND_H
+
+#ifndef _MSC_VER
+#include_next <openssl/rand.h>
+#else
+#include "../include/openssl/rand.h"
+#endif
+#include "crypto_namespace.h"
+
+LCRYPTO_USED(RAND_set_rand_method);
+LCRYPTO_USED(RAND_get_rand_method);
+LCRYPTO_USED(RAND_set_rand_engine);
+LCRYPTO_USED(RAND_SSLeay);
+LCRYPTO_USED(RAND_cleanup);
+LCRYPTO_USED(RAND_bytes);
+LCRYPTO_USED(RAND_pseudo_bytes);
+LCRYPTO_USED(RAND_seed);
+LCRYPTO_USED(RAND_add);
+LCRYPTO_USED(RAND_load_file);
+LCRYPTO_USED(RAND_write_file);
+LCRYPTO_USED(RAND_file_name);
+LCRYPTO_USED(RAND_status);
+LCRYPTO_USED(RAND_poll);
+LCRYPTO_USED(ERR_load_RAND_strings);
+
+#endif /* _LIBCRYPTO_RAND_H */
--- /dev/null
+/* $OpenBSD: sm3.h,v 1.1 2023/07/07 12:01:32 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_SM3_H
+#define _LIBCRYPTO_SM3_H
+
+#ifndef _MSC_VER
+#include_next <openssl/sm3.h>
+#else
+#include "../include/openssl/sm3.h"
+#endif
+#include "crypto_namespace.h"
+
+LCRYPTO_USED(SM3_Init);
+LCRYPTO_USED(SM3_Update);
+LCRYPTO_USED(SM3_Final);
+
+#endif /* _LIBCRYPTO_SM3_H */
--- /dev/null
+/* $OpenBSD: sm4.h,v 1.1 2023/07/07 12:01:32 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_SM4_H
+#define _LIBCRYPTO_SM4_H
+
+#ifndef _MSC_VER
+#include_next <openssl/sm4.h>
+#else
+#include "../include/openssl/sm4.h"
+#endif
+#include "crypto_namespace.h"
+
+LCRYPTO_USED(SM4_set_key);
+LCRYPTO_USED(SM4_decrypt);
+LCRYPTO_USED(SM4_encrypt);
+
+#endif /* _LIBCRYPTO_SM4_H */
-/* $OpenBSD: poly1305.c,v 1.3 2014/06/12 15:49:30 deraadt Exp $ */
+/* $OpenBSD: poly1305.c,v 1.4 2023/07/07 12:01:32 beck Exp $ */
/*
* Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
*
{
poly1305_init(ctx, key);
}
+LCRYPTO_ALIAS(CRYPTO_poly1305_init);
void
CRYPTO_poly1305_update(poly1305_context *ctx, const unsigned char *in,
{
poly1305_update(ctx, in, len);
}
+LCRYPTO_ALIAS(CRYPTO_poly1305_update);
void
CRYPTO_poly1305_finish(poly1305_context *ctx, unsigned char mac[16])
{
poly1305_finish(ctx, mac);
}
+LCRYPTO_ALIAS(CRYPTO_poly1305_finish);
-/* $OpenBSD: rand_err.c,v 1.16 2022/07/12 14:42:50 kn Exp $ */
+/* $OpenBSD: rand_err.c,v 1.17 2023/07/07 12:01:32 beck Exp $ */
/* ====================================================================
* Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
*
}
#endif
}
+LCRYPTO_ALIAS(ERR_load_RAND_strings);
-/* $OpenBSD: rand_lib.c,v 1.20 2014/10/22 13:02:04 jsing Exp $ */
+/* $OpenBSD: rand_lib.c,v 1.21 2023/07/07 12:01:32 beck Exp $ */
/*
* Copyright (c) 2014 Ted Unangst <tedu@openbsd.org>
*
{
return 1;
}
+LCRYPTO_ALIAS(RAND_set_rand_method);
const RAND_METHOD *
RAND_get_rand_method(void)
{
return NULL;
}
+LCRYPTO_ALIAS(RAND_get_rand_method);
RAND_METHOD *
RAND_SSLeay(void)
{
return NULL;
}
+LCRYPTO_ALIAS(RAND_SSLeay);
#ifndef OPENSSL_NO_ENGINE
int
{
return 1;
}
+LCRYPTO_ALIAS(RAND_set_rand_engine);
#endif
void
{
}
+LCRYPTO_ALIAS(RAND_cleanup);
void
RAND_seed(const void *buf, int num)
{
}
+LCRYPTO_ALIAS(RAND_seed);
void
RAND_add(const void *buf, int num, double entropy)
{
}
+LCRYPTO_ALIAS(RAND_add);
int
RAND_status(void)
{
return 1;
}
+LCRYPTO_ALIAS(RAND_status);
int
RAND_poll(void)
{
return 1;
}
+LCRYPTO_ALIAS(RAND_poll);
/*
* Hurray. You've made it to the good parts.
arc4random_buf(buf, num);
return 1;
}
+LCRYPTO_ALIAS(RAND_bytes);
int
RAND_pseudo_bytes(unsigned char *buf, int num)
arc4random_buf(buf, num);
return 1;
}
+LCRYPTO_ALIAS(RAND_pseudo_bytes);
-/* $OpenBSD: randfile.c,v 1.42 2015/09/10 15:56:25 jsing Exp $ */
+/* $OpenBSD: randfile.c,v 1.43 2023/07/07 12:01:32 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
else
return bytes;
}
+LCRYPTO_ALIAS(RAND_load_file);
int
RAND_write_file(const char *file)
explicit_bzero(buf, BUFSIZE);
return ret;
}
+LCRYPTO_ALIAS(RAND_write_file);
const char *
RAND_file_name(char * buf, size_t size)
return (NULL);
return buf;
}
+LCRYPTO_ALIAS(RAND_file_name);
-/* $OpenBSD: sm3.c,v 1.2 2022/11/26 16:08:54 tb Exp $ */
+/* $OpenBSD: sm3.c,v 1.3 2023/07/07 12:01:32 beck Exp $ */
/*
* Copyright (c) 2018, Ribose Inc
*
c->H = SM3_H;
return 1;
}
+LCRYPTO_ALIAS(SM3_Init);
void
SM3_block_data_order(SM3_CTX *ctx, const void *p, size_t num)
-/* $OpenBSD: sm4.c,v 1.1 2019/03/17 17:42:37 tb Exp $ */
+/* $OpenBSD: sm4.c,v 1.2 2023/07/07 12:01:32 beck Exp $ */
/*
* Copyright (c) 2017, 2019 Ribose Inc
*
return 1;
}
+LCRYPTO_ALIAS(SM4_set_key);
#define SM4_ROUNDS(k0, k1, k2, k3, F) \
do { \
store_u32_be(B1, out + 8);
store_u32_be(B0, out + 12);
}
+LCRYPTO_ALIAS(SM4_encrypt);
void
SM4_decrypt(const uint8_t *in, uint8_t *out, const SM4_KEY *k)
store_u32_be(B1, out + 8);
store_u32_be(B0, out + 12);
}
+LCRYPTO_ALIAS(SM4_decrypt);
#endif /* OPENSSL_NO_SM4 */