update wolfssl to 5.6.4, wolfmqtt to 1.17.0 and wolftpm to 3.0.0
parent
7a6e3f455f
commit
d50b112150
File diff suppressed because it is too large
Load Diff
|
@ -51,7 +51,7 @@ void bench_chacha(void);
|
|||
void bench_chacha20_poly1305_aead(void);
|
||||
void bench_aescbc(int useDeviceID);
|
||||
void bench_aesgcm(int useDeviceID);
|
||||
void bench_gmac(void);
|
||||
void bench_gmac(int useDeviceID);
|
||||
void bench_aesccm(int useDeviceID);
|
||||
void bench_aesecb(int useDeviceID);
|
||||
void bench_aesxts(void);
|
||||
|
@ -61,6 +61,9 @@ void bench_aesofb(void);
|
|||
void bench_aessiv(void);
|
||||
void bench_poly1305(void);
|
||||
void bench_camellia(void);
|
||||
void bench_sm4_cbc(void);
|
||||
void bench_sm4_gcm(void);
|
||||
void bench_sm4_ccm(void);
|
||||
void bench_md5(int useDeviceID);
|
||||
void bench_sha(int useDeviceID);
|
||||
void bench_sha224(int useDeviceID);
|
||||
|
@ -81,6 +84,7 @@ void bench_sha3_384(int useDeviceID);
|
|||
void bench_sha3_512(int useDeviceID);
|
||||
void bench_shake128(int useDeviceID);
|
||||
void bench_shake256(int useDeviceID);
|
||||
void bench_sm3(int useDeviceID);
|
||||
void bench_ripemd(void);
|
||||
void bench_cmac(int useDeviceID);
|
||||
void bench_scrypt(void);
|
||||
|
@ -97,10 +101,13 @@ void bench_rsa(int useDeviceID);
|
|||
void bench_rsa_key(int useDeviceID, word32 keySz);
|
||||
void bench_dh(int useDeviceID);
|
||||
void bench_kyber(int type);
|
||||
void bench_lms(void);
|
||||
void bench_xmss(void);
|
||||
void bench_ecc_curve(int curveId);
|
||||
void bench_eccMakeKey(int useDeviceID, int curveId);
|
||||
void bench_ecc(int useDeviceID, int curveId);
|
||||
void bench_eccEncrypt(int curveId);
|
||||
void bench_sm2(int useDeviceID);
|
||||
void bench_curve25519KeyGen(int useDeviceID);
|
||||
void bench_curve25519KeyAgree(int useDeviceID);
|
||||
void bench_ed25519KeyGen(void);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -23,19 +23,28 @@
|
|||
#ifndef WOLFCRYPT_TEST_H
|
||||
#define WOLFCRYPT_TEST_H
|
||||
|
||||
#include <wolfssl/wolfcrypt/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef WC_TEST_RET_CUSTOM_TYPE
|
||||
typedef WC_TEST_RET_CUSTOM_TYPE wc_test_ret_t;
|
||||
#else
|
||||
typedef sword32 wc_test_ret_t;
|
||||
#endif
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
|
||||
#ifdef HAVE_STACK_SIZE
|
||||
THREAD_RETURN WOLFSSL_THREAD wolfcrypt_test(void* args);
|
||||
#else
|
||||
int wolfcrypt_test(void* args);
|
||||
wc_test_ret_t wolfcrypt_test(void* args);
|
||||
#endif
|
||||
|
||||
#ifndef NO_MAIN_DRIVER
|
||||
int wolfcrypt_test_main(int argc, char** argv);
|
||||
wc_test_ret_t wolfcrypt_test_main(int argc, char** argv);
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_ESPIDF) || defined(_WIN32_WCE)
|
||||
|
@ -44,13 +53,13 @@ int wolf_test_task(void);
|
|||
|
||||
#ifndef WC_TEST_RET_HAVE_CUSTOM_MACROS
|
||||
|
||||
#define WC_TEST_RET_TAG_NC 0
|
||||
#define WC_TEST_RET_TAG_EC 1
|
||||
#define WC_TEST_RET_TAG_ERRNO 2
|
||||
#define WC_TEST_RET_TAG_I 3
|
||||
#define WC_TEST_RET_TAG_NC 0L
|
||||
#define WC_TEST_RET_TAG_EC 1L
|
||||
#define WC_TEST_RET_TAG_ERRNO 2L
|
||||
#define WC_TEST_RET_TAG_I 3L
|
||||
|
||||
#define WC_TEST_RET_ENC(line, i, tag) \
|
||||
(-((line) + ((int)((unsigned)(i) & 0x7ff) * 100000) + ((tag) << 29)))
|
||||
((wc_test_ret_t)(-((wc_test_ret_t)(line) + ((wc_test_ret_t)((word32)(i) & 0x7ffL) * 100000L) + ((wc_test_ret_t)(tag) << 29L))))
|
||||
|
||||
#ifndef WC_TEST_RET_LN
|
||||
#define WC_TEST_RET_LN __LINE__
|
||||
|
@ -74,16 +83,16 @@ int wolf_test_task(void);
|
|||
#define WC_TEST_RET_ENC_ERRNO WC_TEST_RET_ENC_NC
|
||||
#endif
|
||||
|
||||
#define WC_TEST_RET_DEC_TAG(x) ((-(x)) >> 29)
|
||||
#define WC_TEST_RET_DEC_TAG(x) ((-(x)) >> 29L)
|
||||
|
||||
/* decode line number */
|
||||
#define WC_TEST_RET_DEC_LN(x) (((-(x)) & ~(3 << 29)) % 100000)
|
||||
#define WC_TEST_RET_DEC_LN(x) ((int)(((-(x)) & ~(3L << 29L)) % 100000L))
|
||||
|
||||
/* decode integer or errno */
|
||||
#define WC_TEST_RET_DEC_I(x) (((-(x)) & ~(3 << 29)) / 100000)
|
||||
#define WC_TEST_RET_DEC_I(x) ((int)((((-(x)) & ~(3L << 29L)) / 100000L)))
|
||||
|
||||
/* decode error code */
|
||||
#define WC_TEST_RET_DEC_EC(x) (-WC_TEST_RET_DEC_I(x))
|
||||
#define WC_TEST_RET_DEC_EC(x) ((int)(-WC_TEST_RET_DEC_I(x)))
|
||||
|
||||
#endif /* !WC_TEST_RET_HAVE_CUSTOM_MACROS */
|
||||
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
SUMMARY = "wolfMQTT Client Library"
|
||||
DESCRIPTION = "wolfMQTT is a client library implementation of the MQTT \
|
||||
protocol, written in ANSI C and targeted for embedded, RTOS, \
|
||||
and resource-constrained environments. It has been built from \
|
||||
the ground up to be multi-platform, space conscious, and \
|
||||
extensible. It includes support for the MQTT v5.0 protocol."
|
||||
HOMEPAGE = "https://www.wolfssl.com/products/wolfmqtt"
|
||||
BUGTRACKER = "https://github.com/wolfssl/wolfmqtt/issues"
|
||||
SECTION = "libs"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=2c1c00f9d3ed9e24fa69b932b7e7aff2"
|
||||
|
||||
DEPENDS += "wolfssl"
|
||||
|
||||
SRC_URI = "git://github.com/wolfssl/wolfMQTT.git;nobranch=1;protocol=https;rev=51b84ead212dde4364352ce9acdf5211b39cbf89"
|
||||
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools pkgconfig
|
||||
|
||||
EXTRA_OECONF = "--with-libwolfssl-prefix=${COMPONENTS_DIR}/${PACKAGE_ARCH}/wolfssl/usr"
|
||||
|
||||
do_configure:prepend() {
|
||||
(cd ${S}; ./autogen.sh; cd -)
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
SUMMARY = "wolfSSL Lightweight Embedded SSL/TLS Library"
|
||||
DESCRIPTION = "wolfSSL is a lightweight SSL/TLS library written in C and \
|
||||
optimized for embedded and RTOS environments. It can be up \
|
||||
to 20 times smaller than OpenSSL while still supporting \
|
||||
a full TLS client and server, up to TLS 1.3"
|
||||
HOMEPAGE = "https://www.wolfssl.com/products/wolfssl"
|
||||
BUGTRACKER = "https://github.com/wolfssl/wolfssl/issues"
|
||||
SECTION = "libs"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
||||
DEPENDS += "util-linux-native"
|
||||
|
||||
PROVIDES += "cyassl"
|
||||
RPROVIDES_${PN} = "cyassl"
|
||||
PROVIDES += "wolfssl"
|
||||
RPROVIDES_${PN} = "wolfssl"
|
||||
|
||||
SRC_URI = "git://github.com/wolfssl/wolfssl.git;nobranch=1;protocol=https;rev=37884f864d6fd9b04f44677cb04da15d0c9d6526"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools pkgconfig
|
||||
|
||||
do_configure:prepend() {
|
||||
(cd ${S}; ./autogen.sh; cd -)
|
||||
}
|
||||
|
||||
BBCLASSEXTEND += "native nativesdk"
|
|
@ -1,19 +0,0 @@
|
|||
diff --git a/wolftpm/tpm2_types.h b/wolftpm/tpm2_types.h
|
||||
index 6edbdee..745b17c 100644
|
||||
--- a/wolftpm/tpm2_types.h
|
||||
+++ b/wolftpm/tpm2_types.h
|
||||
@@ -197,6 +197,14 @@ typedef int64_t INT64;
|
||||
#define XATOI(s) atoi((s))
|
||||
#endif
|
||||
|
||||
+/* make sure file IO macros are available for examples */
|
||||
+#ifndef XFEOF /* used in pcr/extend example */
|
||||
+ #define XFEOF feof
|
||||
+#endif
|
||||
+#ifndef XREWIND /* used in tpm_test_keys.c */
|
||||
+ #define XREWIND rewind
|
||||
+#endif
|
||||
+
|
||||
/* enable way for customer to override printf */
|
||||
#ifdef XPRINTF
|
||||
#undef printf
|
|
@ -12,8 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
|||
|
||||
DEPENDS += "wolfssl"
|
||||
|
||||
SRC_URI = "git://github.com/wolfssl/wolfTPM.git;nobranch=1;protocol=https;rev=a0bd9fef9842ffbdf933afbd15ed4fa8bc8daf26"
|
||||
SRC_URI += "file://v2.7.0+pr277.diff"
|
||||
SRC_URI = "git://github.com/wolfssl/wolfTPM.git;nobranch=1;protocol=https;rev=5b288d480d7bc5598d47dc78832907ff377b38d8"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright (C) 2006-2022 wolfSSL Inc.
|
||||
#
|
||||
# This file is part of wolfSSL.
|
||||
#
|
||||
# wolfSSL is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# wolfSSL is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
|
||||
|
||||
get_current() {
|
||||
CURRENT=`find recipes-wolfssl/$1/*.bb | grep -Eo '[0-9]+.[0-9]+.[0-9]+'`
|
||||
}
|
||||
|
||||
get_new() {
|
||||
NEW=`curl -s https://api.github.com/repos/wolfssl/$1/releases/latest | grep -i $1- | grep name | grep -Eo -m 1 '[0-9]+.[0-9]+.[0-9]+'`
|
||||
}
|
||||
|
||||
update() {
|
||||
if [ "$CURRENT" != "$NEW" ]; then
|
||||
printf "updating from $CURRENT to $NEW\n"
|
||||
TAG="v$NEW-stable"
|
||||
if [ "$1" = "wolfmqtt" ] || [ "$1" == "wolftpm" ]; then
|
||||
TAG="v$NEW"
|
||||
fi
|
||||
git clone -b $TAG git@github.com:wolfssl/$1 &> /dev/null
|
||||
cd $1 &> /dev/null
|
||||
REV=`git rev-list -n 1 $TAG`
|
||||
cd ..
|
||||
rm -rf $1
|
||||
|
||||
git mv ./recipes-wolfssl/$1/$1_$CURRENT.bb ./recipes-wolfssl/$1/$1_$NEW.bb &> /dev/null
|
||||
sed -i "s/rev=.*/rev=$REV\"/" ./recipes-wolfssl/$1/$1_$NEW.bb
|
||||
else
|
||||
printf "version $CURRENT is the latest\n"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
printf "Checking version of wolfSSL to use..."
|
||||
get_current "wolfssl"
|
||||
get_new "wolfssl"
|
||||
update "wolfssl"
|
||||
|
||||
# update benchmark and testwolfcrypt if needed
|
||||
if [ "$CURRENT" != "$NEW" ]; then
|
||||
set -e
|
||||
printf "Updating wolfSSL benchmark and test files..."
|
||||
curl -L -o wolfssl-$NEW.zip https://api.github.com/repos/wolfSSL/wolfssl/zipball/v$NEW-stable &> /dev/null
|
||||
unzip wolfssl-$NEW.zip &> /dev/null
|
||||
mv wolfSSL-wolfssl-* wolfssl-$NEW &> /dev/null
|
||||
cp ./wolfssl-$NEW/wolfcrypt/benchmark/benchmark.{c,h} recipes-examples/wolfcrypt/wolfcryptbenchmark/ &> /dev/null
|
||||
cp ./wolfssl-$NEW/wolfcrypt/test/test.{c,h} recipes-examples/wolfcrypt/wolfcrypttest/ &> /dev/null
|
||||
rm -rf ./wolfssl-$NEW* &> /dev/null
|
||||
printf "done\n"
|
||||
set +e
|
||||
fi
|
||||
|
||||
printf "Checking version of wolfMQTT to use..."
|
||||
get_current "wolfmqtt"
|
||||
get_new "wolfmqtt"
|
||||
update "wolfmqtt"
|
||||
|
||||
printf "Checking version of wolfSSH to use..."
|
||||
get_current "wolfssh"
|
||||
get_new "wolfssh"
|
||||
update "wolfssh"
|
||||
|
||||
printf "Checking version of wolfTPM to use..."
|
||||
get_current "wolftpm"
|
||||
get_new "wolftpm"
|
||||
update "wolftpm"
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue