Merge pull request #70 from night1rider/kirkstone-update

Kirkstone update
pull/72/head
David Garske 2024-01-16 15:32:41 -08:00 committed by GitHub
commit 884e5e0fa0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 15 additions and 60078 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,144 +0,0 @@
/* wolfcrypt/benchmark/benchmark.h
*
* Copyright (C) 2006-2023 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
*/
#ifndef WOLFCRYPT_BENCHMARK_H
#define WOLFCRYPT_BENCHMARK_H
#ifdef __cplusplus
extern "C" {
#endif
#include <wolfssl/wolfcrypt/types.h> /* Needed for 'byte' typedef */
/* run all benchmark entry */
#ifdef HAVE_STACK_SIZE
THREAD_RETURN WOLFSSL_THREAD benchmark_test(void* args);
#else
int benchmark_test(void *args);
#endif
#ifndef NO_MAIN_DRIVER
int wolfcrypt_benchmark_main(int argc, char** argv);
#endif
/* individual benchmarks */
int benchmark_init(void);
int benchmark_free(void);
void benchmark_configure(word32 block_size);
void bench_des(int useDeviceID);
void bench_arc4(int useDeviceID);
void bench_chacha(void);
void bench_chacha20_poly1305_aead(void);
void bench_aescbc(int useDeviceID);
void bench_aesgcm(int useDeviceID);
void bench_gmac(int useDeviceID);
void bench_aesccm(int useDeviceID);
void bench_aesecb(int useDeviceID);
void bench_aesxts(void);
void bench_aesctr(int useDeviceID);
void bench_aescfb(void);
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);
void bench_sha256(int useDeviceID);
void bench_sha384(int useDeviceID);
void bench_sha512(int useDeviceID);
#if !defined(WOLFSSL_NOSHA512_224) && \
(!defined(HAVE_FIPS) || FIPS_VERSION_GE(5, 3)) && !defined(HAVE_SELFTEST)
void bench_sha512_224(int useDeviceID);
#endif
#if !defined(WOLFSSL_NOSHA512_256) && \
(!defined(HAVE_FIPS) || FIPS_VERSION_GE(5, 3)) && !defined(HAVE_SELFTEST)
void bench_sha512_256(int useDeviceID);
#endif
void bench_sha3_224(int useDeviceID);
void bench_sha3_256(int useDeviceID);
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);
void bench_hmac_md5(int useDeviceID);
void bench_hmac_sha(int useDeviceID);
void bench_hmac_sha224(int useDeviceID);
void bench_hmac_sha256(int useDeviceID);
void bench_hmac_sha384(int useDeviceID);
void bench_hmac_sha512(int useDeviceID);
void bench_siphash(void);
void bench_rsaKeyGen(int useDeviceID);
void bench_rsaKeyGen_size(int useDeviceID, word32 keySz);
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);
void bench_ed25519KeySign(void);
void bench_curve448KeyGen(void);
void bench_curve448KeyAgree(void);
void bench_ed448KeyGen(void);
void bench_ed448KeySign(void);
void bench_eccsiKeyGen(void);
void bench_eccsiPairGen(void);
void bench_eccsiValidate(void);
void bench_eccsi(void);
void bench_sakkeKeyGen(void);
void bench_sakkeRskGen(void);
void bench_sakkeValidate(void);
void bench_sakke(void);
void bench_rng(void);
void bench_blake2b(void);
void bench_blake2s(void);
void bench_pbkdf2(void);
void bench_falconKeySign(byte level);
void bench_dilithiumKeySign(byte level);
void bench_sphincsKeySign(byte level, byte optim);
void bench_stats_print(void);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* WOLFCRYPT_BENCHMARK_H */

View File

@ -12,12 +12,12 @@ LIC_FILES_CHKSUM = "file://benchmark.c;beginline=1;endline=20;md5=aca0c406899b74
DEPENDS += "wolfssl" DEPENDS += "wolfssl"
SRC_URI = "file://benchmark.c file://benchmark.h" SRC_URI = "git://github.com/wolfSSL/wolfssl.git;nobranch=1;protocol=https;rev=66596ad9e1d7efa8479656872cf09c9c1870a02e"
S = "${WORKDIR}" S = "${WORKDIR}/git/wolfcrypt/benchmark"
do_compile() { do_compile() {
${CC} ${CFLAGS} -DUSE_CERT_BUFFERS_2048 -DUSE_CERT_BUFFERS_256 -DUSE_FLAT_BENCHMARK_H -DBENCH_EMBEDDED -Wall -include wolfssl/options.h -o wolfcryptbenchmark ${WORKDIR}/benchmark.c -lwolfssl ${LDFLAGS} ${CC} ${CFLAGS} -DUSE_CERT_BUFFERS_2048 -DUSE_CERT_BUFFERS_256 -DUSE_FLAT_BENCHMARK_H -DBENCH_EMBEDDED -Wall -include wolfssl/options.h -o wolfcryptbenchmark ${S}/benchmark.c -lwolfssl ${LDFLAGS}
} }
do_install() { do_install() {

File diff suppressed because it is too large Load Diff

View File

@ -1,104 +0,0 @@
/* wolfcrypt/test/test.h
*
* Copyright (C) 2006-2023 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
*/
#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
wc_test_ret_t wolfcrypt_test(void* args);
#endif
#ifndef NO_MAIN_DRIVER
wc_test_ret_t wolfcrypt_test_main(int argc, char** argv);
#endif
#if defined(WOLFSSL_ESPIDF) || defined(_WIN32_WCE)
int wolf_test_task(void);
#endif
#ifndef WC_TEST_RET_HAVE_CUSTOM_MACROS
#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) \
((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__
#endif
/* encode no code */
#define WC_TEST_RET_ENC_NC WC_TEST_RET_ENC(WC_TEST_RET_LN, 0, WC_TEST_RET_TAG_NC)
/* encode positive integer */
#define WC_TEST_RET_ENC_I(i) WC_TEST_RET_ENC(WC_TEST_RET_LN, i, WC_TEST_RET_TAG_I)
/* encode error code (negative integer) */
#define WC_TEST_RET_ENC_EC(ec) WC_TEST_RET_ENC(WC_TEST_RET_LN, -(ec), WC_TEST_RET_TAG_EC)
/* encode system/libc error code */
#if defined(HAVE_ERRNO_H) && !defined(NO_FILESYSTEM) && \
!defined(NO_STDIO_FILESYSTEM) && !defined(WOLFSSL_USER_IO)
#include <errno.h>
#define WC_TEST_RET_ENC_ERRNO WC_TEST_RET_ENC(WC_TEST_RET_LN, errno, WC_TEST_RET_TAG_ERRNO)
#else
#define WC_TEST_RET_ENC_ERRNO WC_TEST_RET_ENC_NC
#endif
#define WC_TEST_RET_DEC_TAG(x) ((-(x)) >> 29L)
/* decode line number */
#define WC_TEST_RET_DEC_LN(x) ((int)(((-(x)) & ~(3L << 29L)) % 100000L))
/* decode integer or errno */
#define WC_TEST_RET_DEC_I(x) ((int)((((-(x)) & ~(3L << 29L)) / 100000L)))
/* decode error code */
#define WC_TEST_RET_DEC_EC(x) ((int)(-WC_TEST_RET_DEC_I(x)))
#endif /* !WC_TEST_RET_HAVE_CUSTOM_MACROS */
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* WOLFCRYPT_TEST_H */

View File

@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://test.c;beginline=1;endline=20;md5=61d63fb8b820bae4d85
DEPENDS += "wolfssl" DEPENDS += "wolfssl"
SRC_URI = "git://github.com/wolfSSL/wolfssl.git;branch=master;protocol=https;rev=9ffa9faecda87a7c0ce7521c83996c65d4e86943" SRC_URI = "git://github.com/wolfSSL/wolfssl.git;nobranch=1;protocol=https;rev=66596ad9e1d7efa8479656872cf09c9c1870a02e"
S = "${WORKDIR}/git/wolfcrypt/test" S = "${WORKDIR}/git/wolfcrypt/test"

View File

@ -1,26 +0,0 @@
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 -)
}

View File

@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2c1c00f9d3ed9e24fa69b932b7e7aff2"
DEPENDS += "wolfssl" DEPENDS += "wolfssl"
SRC_URI = "git://github.com/wolfssl/wolfMQTT.git;nobranch=1;protocol=https;rev=6a1a7f85b4b42e8818a3b3d91760f55ed34d345f" SRC_URI = "git://github.com/wolfssl/wolfMQTT.git;nobranch=1;protocol=https;rev=91b01f4be412fff883374168aa4da2bd00d2968c"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"

View File

@ -1,28 +0,0 @@
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"

View File

@ -15,7 +15,7 @@ RPROVIDES_${PN} = "cyassl"
PROVIDES += "wolfssl" PROVIDES += "wolfssl"
RPROVIDES_${PN} = "wolfssl" RPROVIDES_${PN} = "wolfssl"
SRC_URI = "git://github.com/wolfssl/wolfssl.git;nobranch=1;protocol=https;rev=3b3c175af0e993ffaae251871421e206cc41963f" SRC_URI = "git://github.com/wolfssl/wolfssl.git;nobranch=1;protocol=https;rev=66596ad9e1d7efa8479656872cf09c9c1870a02e"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"

View File

@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
DEPENDS += "wolfssl" DEPENDS += "wolfssl"
SRC_URI = "git://github.com/wolfssl/wolfTPM.git;nobranch=1;protocol=https;rev=5b288d480d7bc5598d47dc78832907ff377b38d8" SRC_URI = "git://github.com/wolfssl/wolfTPM.git;nobranch=1;protocol=https;rev=e54734a3ab2507fbba378567d16aa3e27c54655b"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"

View File

@ -39,9 +39,16 @@ update() {
REV=`git rev-list -n 1 $TAG` REV=`git rev-list -n 1 $TAG`
cd .. cd ..
rm -rf $1 rm -rf $1
git mv ./recipes-wolfssl/$1/$1_$CURRENT.bb ./recipes-wolfssl/$1/$1_$NEW.bb &> /dev/null 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 sed -i "s/rev=.*/rev=$REV\"/" ./recipes-wolfssl/$1/$1_$NEW.bb
git add ./recipes-wolfssl/$1/$1_$NEW.bb &> /dev/null
if [ "$1" = "wolfssl" ]; then
printf "\tUpdating wolfcrypt test and benchmark...\n"
sed -i "s/rev=.*/rev=$REV\"/" ./recipes-examples/wolfcrypt/wolfcrypttest/wolfcrypttest.bb
git add ./recipes-examples/wolfcrypt/wolfcrypttest/wolfcrypttest.bb &> /dev/null
sed -i "s/rev=.*/rev=$REV\"/" ./recipes-examples/wolfcrypt/wolfcryptbenchmark/wolfcryptbenchmark.bb
git add ./recipes-examples/wolfcrypt/wolfcryptbenchmark/wolfcryptbenchmark.bb &> /dev/null
fi
else else
printf "version $CURRENT is the latest\n" printf "version $CURRENT is the latest\n"
fi fi
@ -53,20 +60,6 @@ get_current "wolfssl"
get_new "wolfssl" get_new "wolfssl"
update "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..." printf "Checking version of wolfMQTT to use..."
get_current "wolfmqtt" get_current "wolfmqtt"
get_new "wolfmqtt" get_new "wolfmqtt"