added my Recipes
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
From 0cade4573334571055127a2d4fe3641e2397948d Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 20 Mar 2023 21:59:19 -0700
|
||||
Subject: [PATCH] libgcrypt.c: Fix prototype of des3_encrypt/des3_decrypt
|
||||
|
||||
This is to match the prototype for callback functions which are now emitted as
|
||||
errors by clang16
|
||||
|
||||
Fixes
|
||||
|
||||
TOPDIR/build/tmp/work/cortexa15t2hf-neon-yoe-linux-gnueabi/libssh/0.10.4-r0/git/src/libgcrypt.c:903:20: error: incompatible function pointer types initializing 'void (*)(struct ssh_cipher_struct *, void *, void *, size_t)' (aka 'void (*)(struct ssh_cipher_struct *, void *, void *, unsigned int)') with an expression of type 'void (struct ssh_cipher_struct *, void *, void *, unsigned long)' [-Wincompatible-function-pointer-types]
|
||||
.encrypt = des3_encrypt,
|
||||
^~~~~~~~~~~~
|
||||
TOPDIR/build/tmp/work/cortexa15t2hf-neon-yoe-linux-gnueabi/libssh/0.10.4-r0/git/src/libgcrypt.c:904:20: error: incompatible function pointer types initializing 'void (*)(struct ssh_cipher_struct *, void *, void *, size_t)' (aka 'void (*)(struct ssh_cipher_struct *, void *, void *, unsigned int)') with an expression of type 'void (struct ssh_cipher_struct *, void *, void *, unsigned long)' [-Wincompatible-function-pointer-types]
|
||||
.decrypt = des3_decrypt
|
||||
^~~~~~~~~~~~
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/libgcrypt.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/libgcrypt.c b/src/libgcrypt.c
|
||||
index da5588ad..e482b654 100644
|
||||
--- a/src/libgcrypt.c
|
||||
+++ b/src/libgcrypt.c
|
||||
@@ -469,12 +469,12 @@ static int des3_set_key(struct ssh_cipher_struct *cipher, void *key, void *IV) {
|
||||
}
|
||||
|
||||
static void des3_encrypt(struct ssh_cipher_struct *cipher, void *in,
|
||||
- void *out, unsigned long len) {
|
||||
+ void *out, size_t len) {
|
||||
gcry_cipher_encrypt(cipher->key[0], out, len, in, len);
|
||||
}
|
||||
|
||||
static void des3_decrypt(struct ssh_cipher_struct *cipher, void *in,
|
||||
- void *out, unsigned long len) {
|
||||
+ void *out, size_t len) {
|
||||
gcry_cipher_decrypt(cipher->key[0], out, len, in, len);
|
||||
}
|
||||
|
||||
--
|
||||
2.40.0
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From d2525ba0bc7b11de12c54ea1a3d1eb862537136d Mon Sep 17 00:00:00 2001
|
||||
From: Yi Zhao <yi.zhao@windriver.com>
|
||||
Date: Wed, 15 Mar 2023 16:51:58 +0800
|
||||
Subject: [PATCH] tests/CMakeLists.txt: do not search ssh/sshd commands on host
|
||||
|
||||
It will search ssh/sshd commands on host when configure. Since they are
|
||||
not required by unittests, we can skip the search.
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
|
||||
---
|
||||
tests/CMakeLists.txt | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
|
||||
index 22a36f37..aa32ca2e 100644
|
||||
--- a/tests/CMakeLists.txt
|
||||
+++ b/tests/CMakeLists.txt
|
||||
@@ -86,6 +86,7 @@ set(TEST_TARGET_LIBRARIES
|
||||
|
||||
add_subdirectory(unittests)
|
||||
|
||||
+if (CLIENT_TESTING OR SERVER_TESTING)
|
||||
# OpenSSH Capabilities are required for all unit tests
|
||||
find_program(SSH_EXECUTABLE NAMES ssh)
|
||||
if (SSH_EXECUTABLE)
|
||||
@@ -293,6 +294,7 @@ if (CLIENT_TESTING OR SERVER_TESTING)
|
||||
|
||||
message(STATUS "TORTURE_ENVIRONMENT=${TORTURE_ENVIRONMENT}")
|
||||
endif ()
|
||||
+endif ()
|
||||
|
||||
configure_file(tests_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/tests_config.h)
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Valid tests to run
|
||||
tests="torture_bind_config \
|
||||
torture_buffer \
|
||||
torture_bytearray \
|
||||
torture_callbacks \
|
||||
torture_channel \
|
||||
torture_config \
|
||||
torture_crypto \
|
||||
torture_hashes \
|
||||
torture_init \
|
||||
torture_isipaddr \
|
||||
torture_keyfiles \
|
||||
torture_knownhosts_parsing \
|
||||
torture_list \
|
||||
torture_misc \
|
||||
torture_moduli \
|
||||
torture_options \
|
||||
torture_packet \
|
||||
torture_packet_filter \
|
||||
torture_pki \
|
||||
torture_pki_ecdsa \
|
||||
torture_pki_ed25519 \
|
||||
torture_pki_rsa \
|
||||
torture_push_pop_dir \
|
||||
torture_rand \
|
||||
torture_session_keys \
|
||||
torture_temp_dir \
|
||||
torture_temp_file \
|
||||
torture_threads_buffer \
|
||||
torture_threads_crypto \
|
||||
torture_threads_init \
|
||||
torture_threads_pki_rsa \
|
||||
torture_tokens \
|
||||
"
|
||||
|
||||
ptestdir=$(dirname "$(readlink -f "$0")")
|
||||
cd "$ptestdir"/tests || exit
|
||||
|
||||
# Run specified tests
|
||||
for f in $tests
|
||||
do
|
||||
if test -e ./"$f"; then
|
||||
if ./"$f" > ./"$f".out 2> ./"$f".err; then
|
||||
echo "PASS: $f"
|
||||
else
|
||||
echo "FAIL: $f"
|
||||
fi
|
||||
else
|
||||
echo "SKIP: $f"
|
||||
fi
|
||||
done
|
||||
@@ -0,0 +1,45 @@
|
||||
SUMMARY = "Multiplatform C library implementing the SSHv2 and SSHv1 protocol"
|
||||
HOMEPAGE = "http://www.libssh.org"
|
||||
SECTION = "libs"
|
||||
LICENSE = "LGPL-2.1-only"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=dabb4958b830e5df11d2b0ed8ea255a0"
|
||||
|
||||
DEPENDS = "zlib openssl"
|
||||
|
||||
SRC_URI = "git://git.libssh.org/projects/libssh.git;protocol=https;branch=stable-0.10 \
|
||||
file://0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch \
|
||||
file://0001-libgcrypt.c-Fix-prototype-of-des3_encrypt-des3_decry.patch \
|
||||
file://run-ptest \
|
||||
"
|
||||
SRCREV = "e8322817a9e5aaef0698d779ddd467a209a85d85"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit cmake ptest
|
||||
|
||||
PACKAGECONFIG ??= "gcrypt ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
|
||||
PACKAGECONFIG[gssapi] = "-DWITH_GSSAPI=1, -DWITH_GSSAPI=0, krb5, "
|
||||
PACKAGECONFIG[gcrypt] = "-DWITH_GCRYPT=1, -DWITH_GCRYPT=0, libgcrypt, "
|
||||
PACKAGECONFIG[tests] = "-DUNIT_TESTING=1, -DUNIT_TESTING=0, cmocka"
|
||||
|
||||
ARM_INSTRUCTION_SET:armv5 = "arm"
|
||||
|
||||
EXTRA_OECMAKE = " \
|
||||
-DWITH_PCAP=1 \
|
||||
-DWITH_SFTP=1 \
|
||||
-DWITH_ZLIB=1 \
|
||||
-DWITH_EXAMPLES=0 \
|
||||
"
|
||||
|
||||
do_compile:prepend () {
|
||||
if [ ${PTEST_ENABLED} = "1" ]; then
|
||||
sed -i -e 's|${B}|${PTEST_PATH}|g' ${B}/config.h
|
||||
fi
|
||||
}
|
||||
|
||||
do_install_ptest () {
|
||||
install -d ${D}${PTEST_PATH}/tests
|
||||
cp -f ${B}/tests/unittests/torture_* ${D}${PTEST_PATH}/tests/
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
Reference in New Issue
Block a user