Merge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2021-06-02' into staging

* Update the references to some doc files (use *.rst instead of *.txt)
* Bump minimum versions of some requirements after removing CentOS 7 support

# gpg: Signature made Wed 02 Jun 2021 08:12:18 BST
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* remotes/thuth-gitlab/tags/pull-request-2021-06-02:
  configure: bump min required CLang to 6.0 / XCode 10.0
  configure: bump min required GCC to 7.5.0
  configure: bump min required glib version to 2.56
  tests/docker: drop CentOS 7 container
  tests/vm: convert centos VM recipe to CentOS 8
  crypto: drop used conditional check
  crypto: bump min gnutls to 3.5.18, dropping RHEL-7 support
  crypto: bump min gcrypt to 1.8.0, dropping RHEL-7 support
  crypto: drop back compatibility typedefs for nettle
  crypto: bump min nettle to 3.4, dropping RHEL-7 support
  patchew: move quick build job from CentOS 7 to CentOS 8 container
  block/ssh: Bump minimum libssh version to 0.8.7
  docs: fix references to docs/devel/s390-dasd-ipl.rst
  docs: fix references to docs/specs/tpm.rst
  docs: fix references to docs/devel/build-system.rst
  docs: fix references to docs/devel/atomics.rst
  docs: fix references to docs/devel/tracing.rst

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell
2021-06-02 17:08:11 +01:00
97 changed files with 141 additions and 591 deletions
-35
View File
@@ -626,41 +626,6 @@ build-coroutine-sigaltstack:
--enable-trace-backends=ftrace
MAKE_CHECK_ARGS: check-unit
# Most jobs test latest gcrypt or nettle builds
#
# These jobs test old gcrypt and nettle from RHEL7
# which had some API differences.
crypto-old-nettle:
extends: .native_build_job_template
needs:
job: amd64-centos7-container
variables:
IMAGE: centos7
TARGETS: x86_64-softmmu x86_64-linux-user
CONFIGURE_ARGS: --disable-gcrypt --enable-nettle
MAKE_CHECK_ARGS: check
crypto-old-gcrypt:
extends: .native_build_job_template
needs:
job: amd64-centos7-container
variables:
IMAGE: centos7
TARGETS: x86_64-softmmu x86_64-linux-user
CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
MAKE_CHECK_ARGS: check
crypto-only-gnutls:
extends: .native_build_job_template
needs:
job: amd64-centos7-container
variables:
IMAGE: centos7
TARGETS: x86_64-softmmu x86_64-linux-user
CONFIGURE_ARGS: --disable-nettle --disable-gcrypt --enable-gnutls
MAKE_CHECK_ARGS: check
# Check our reduced build configurations
build-without-default-devices:
extends: .native_build_job_template
-5
View File
@@ -7,11 +7,6 @@ amd64-alpine-container:
variables:
NAME: alpine
amd64-centos7-container:
extends: .container_job_template
variables:
NAME: centos7
amd64-debian11-container:
extends: .container_job_template
variables:
+3 -3
View File
@@ -88,7 +88,7 @@ email:
more information:
{{ logtext }}
{% elif test == "docker-mingw@fedora" or test == "docker-quick@centos7" or test == "asan" %}
{% elif test == "docker-mingw@fedora" or test == "docker-quick@centos8" or test == "asan" %}
Hi,
This series failed the {{ test }} build test. Please find the testing commands and
@@ -124,13 +124,13 @@ testing:
script: |
#!/bin/bash
time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1
docker-quick@centos7:
docker-quick@centos8:
enabled: false
requirements: docker,x86_64
timeout: 3600
script: |
#!/bin/bash
time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1
time make docker-test-quick@centos8 SHOW_ENV=1 J=14 NETWORK=1
checkpatch:
enabled: true
requirements: ''
+2 -2
View File
@@ -2692,7 +2692,7 @@ F: scripts/tracetool.py
F: scripts/tracetool/
F: scripts/qemu-trace-stap*
F: docs/tools/qemu-trace-stap.rst
F: docs/devel/tracing.txt
F: docs/devel/tracing.rst
T: git https://github.com/stefanha/qemu.git tracing
TPM
@@ -3361,7 +3361,7 @@ Documentation
Build system architecture
M: Daniel P. Berrange <berrange@redhat.com>
S: Odd Fixes
F: docs/devel/build-system.txt
F: docs/devel/build-system.rst
GIT Data Mining Config
M: Alex Bennée <alex.bennee@linaro.org>
+1 -1
View File
@@ -1,4 +1,4 @@
# See docs/devel/tracing.txt for syntax documentation.
# See docs/devel/tracing.rst for syntax documentation.
# kvm-all.c
kvm_ioctl(int type, void *arg) "type 0x%x, arg %p"
+1 -1
View File
@@ -1,4 +1,4 @@
# See docs/devel/tracing.txt for syntax documentation.
# See docs/devel/tracing.rst for syntax documentation.
# TCG related tracing
# cpu-exec.c
+1 -1
View File
@@ -1,4 +1,4 @@
# See docs/devel/tracing.txt for syntax documentation.
# See docs/devel/tracing.rst for syntax documentation.
# alsaaudio.c
alsa_revents(int revents) "revents = %d"
+1 -1
View File
@@ -1,4 +1,4 @@
# See docs/devel/tracing.txt for syntax documentation.
# See docs/devel/tracing.rst for syntax documentation.
# base.c
qauthz_is_allowed(void *authz, const char *identity, bool allowed) "AuthZ %p check identity=%s allowed=%d"
+1 -1
View File
@@ -1,4 +1,4 @@
# See docs/devel/tracing.txt for syntax documentation.
# See docs/devel/tracing.rst for syntax documentation.
# tpm_passthrough.c
tpm_passthrough_handle_request(void *cmd) "processing command %p"
+1 -1
View File
@@ -1,4 +1,4 @@
# See docs/devel/tracing.txt for syntax documentation.
# See docs/devel/tracing.rst for syntax documentation.
# dbus-vmstate.c
dbus_vmstate_pre_save(void)
-59
View File
@@ -277,7 +277,6 @@ static void ssh_parse_filename(const char *filename, QDict *options,
static int check_host_key_knownhosts(BDRVSSHState *s, Error **errp)
{
int ret;
#ifdef HAVE_LIBSSH_0_8
enum ssh_known_hosts_e state;
int r;
ssh_key pubkey;
@@ -343,46 +342,6 @@ static int check_host_key_knownhosts(BDRVSSHState *s, Error **errp)
error_setg(errp, "error while checking for known server (%d)", state);
goto out;
}
#else /* !HAVE_LIBSSH_0_8 */
int state;
state = ssh_is_server_known(s->session);
trace_ssh_server_status(state);
switch (state) {
case SSH_SERVER_KNOWN_OK:
/* OK */
trace_ssh_check_host_key_knownhosts();
break;
case SSH_SERVER_KNOWN_CHANGED:
ret = -EINVAL;
error_setg(errp,
"host key does not match the one in known_hosts; this "
"may be a possible attack");
goto out;
case SSH_SERVER_FOUND_OTHER:
ret = -EINVAL;
error_setg(errp,
"host key for this server not found, another type exists");
goto out;
case SSH_SERVER_FILE_NOT_FOUND:
ret = -ENOENT;
error_setg(errp, "known_hosts file not found");
goto out;
case SSH_SERVER_NOT_KNOWN:
ret = -EINVAL;
error_setg(errp, "no host key was found in known_hosts");
goto out;
case SSH_SERVER_ERROR:
ret = -EINVAL;
error_setg(errp, "server error");
goto out;
default:
ret = -EINVAL;
error_setg(errp, "error while checking for known server (%d)", state);
goto out;
}
#endif /* !HAVE_LIBSSH_0_8 */
/* known_hosts checking successful. */
ret = 0;
@@ -438,11 +397,7 @@ check_host_key_hash(BDRVSSHState *s, const char *hash,
unsigned char *server_hash;
size_t server_hash_len;
#ifdef HAVE_LIBSSH_0_8
r = ssh_get_server_publickey(s->session, &pubkey);
#else
r = ssh_get_publickey(s->session, &pubkey);
#endif
if (r != SSH_OK) {
session_error_setg(errp, s, "failed to read remote host key");
return -EINVAL;
@@ -1233,8 +1188,6 @@ static void unsafe_flush_warning(BDRVSSHState *s, const char *what)
}
}
#ifdef HAVE_LIBSSH_0_8
static coroutine_fn int ssh_flush(BDRVSSHState *s, BlockDriverState *bs)
{
int r;
@@ -1271,18 +1224,6 @@ static coroutine_fn int ssh_co_flush(BlockDriverState *bs)
return ret;
}
#else /* !HAVE_LIBSSH_0_8 */
static coroutine_fn int ssh_co_flush(BlockDriverState *bs)
{
BDRVSSHState *s = bs->opaque;
unsafe_flush_warning(s, "libssh >= 0.8.0");
return 0;
}
#endif /* !HAVE_LIBSSH_0_8 */
static int64_t ssh_getlength(BlockDriverState *bs)
{
BDRVSSHState *s = bs->opaque;
+1 -1
View File
@@ -1,4 +1,4 @@
# See docs/devel/tracing.txt for syntax documentation.
# See docs/devel/tracing.rst for syntax documentation.
# ../block.c
bdrv_open_common(void *bs, const char *filename, int flags, const char *format_name) "bs %p filename \"%s\" flags 0x%x format_name \"%s\""
+1 -1
View File
@@ -1,4 +1,4 @@
# See docs/devel/tracing.txt for syntax documentation.
# See docs/devel/tracing.rst for syntax documentation.
# wctablet.c
wct_init(void) ""
Vendored
+12 -47
View File
@@ -407,7 +407,6 @@ gnutls="$default_feature"
nettle="$default_feature"
nettle_xts="no"
gcrypt="$default_feature"
gcrypt_hmac="no"
gcrypt_xts="no"
qemu_private_xts="yes"
auth_pam="$default_feature"
@@ -2057,17 +2056,17 @@ fi
cat > $TMPC << EOF
#if defined(__clang_major__) && defined(__clang_minor__)
# ifdef __apple_build_version__
# if __clang_major__ < 5 || (__clang_major__ == 5 && __clang_minor__ < 1)
# error You need at least XCode Clang v5.1 to compile QEMU
# if __clang_major__ < 10 || (__clang_major__ == 10 && __clang_minor__ < 0)
# error You need at least XCode Clang v10.0 to compile QEMU
# endif
# else
# if __clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 4)
# error You need at least Clang v3.4 to compile QEMU
# if __clang_major__ < 6 || (__clang_major__ == 6 && __clang_minor__ < 0)
# error You need at least Clang v6.0 to compile QEMU
# endif
# endif
#elif defined(__GNUC__) && defined(__GNUC_MINOR__)
# if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8)
# error You need at least GCC v4.8 to compile QEMU
# if __GNUC__ < 7 || (__GNUC__ == 7 && __GNUC_MINOR__ < 5)
# error You need at least GCC v7.5.0 to compile QEMU
# endif
#else
# error You either need GCC or Clang to compiler QEMU
@@ -2075,7 +2074,7 @@ cat > $TMPC << EOF
int main (void) { return 0; }
EOF
if ! compile_prog "" "" ; then
error_exit "You need at least GCC v4.8 or Clang v3.4 (or XCode Clang v5.1)"
error_exit "You need at least GCC v7.5 or Clang v6.0 (or XCode Clang v10.0)"
fi
# Accumulate -Wfoo and -Wno-bar separately.
@@ -2802,7 +2801,7 @@ fi
if test "$gnutls" != "no"; then
pass="no"
if $pkg_config --exists "gnutls >= 3.1.18"; then
if $pkg_config --exists "gnutls >= 3.5.18"; then
gnutls_cflags=$($pkg_config --cflags gnutls)
gnutls_libs=$($pkg_config --libs gnutls)
# Packaging for the static libraries is not always correct.
@@ -2860,7 +2859,7 @@ has_libgcrypt() {
maj=`libgcrypt-config --version | awk -F . '{print $1}'`
min=`libgcrypt-config --version | awk -F . '{print $2}'`
if test $maj != 1 || test $min -lt 5
if test $maj != 1 || test $min -lt 8
then
return 1
fi
@@ -2871,10 +2870,9 @@ has_libgcrypt() {
if test "$nettle" != "no"; then
pass="no"
if $pkg_config --exists "nettle >= 2.7.1"; then
if $pkg_config --exists "nettle >= 3.4"; then
nettle_cflags=$($pkg_config --cflags nettle)
nettle_libs=$($pkg_config --libs nettle)
nettle_version=$($pkg_config --modversion nettle)
# Link test to make sure the given libraries work (e.g for static).
write_c_skeleton
if compile_prog "" "$nettle_libs" ; then
@@ -2927,18 +2925,6 @@ if test "$gcrypt" != "no"; then
gcrypt="yes"
cat > $TMPC << EOF
#include <gcrypt.h>
int main(void) {
gcry_mac_hd_t handle;
gcry_mac_open(&handle, GCRY_MAC_HMAC_MD5,
GCRY_MAC_FLAG_SECURE, NULL);
return 0;
}
EOF
if compile_prog "$gcrypt_cflags" "$gcrypt_libs" ; then
gcrypt_hmac=yes
fi
cat > $TMPC << EOF
#include <gcrypt.h>
int main(void) {
gcry_cipher_hd_t handle;
gcry_cipher_open(&handle, GCRY_CIPHER_AES, GCRY_CIPHER_MODE_XTS, 0);
@@ -3321,7 +3307,7 @@ done
##########################################
# glib support probe
glib_req_ver=2.48
glib_req_ver=2.56
glib_modules=gthread-2.0
if test "$modules" = yes; then
glib_modules="$glib_modules gmodule-export-2.0"
@@ -3529,7 +3515,7 @@ fi
##########################################
# libssh probe
if test "$libssh" != "no" ; then
if $pkg_config --exists libssh; then
if $pkg_config --exists "libssh >= 0.8.7"; then
libssh_cflags=$($pkg_config libssh --cflags)
libssh_libs=$($pkg_config libssh --libs)
libssh=yes
@@ -3541,23 +3527,6 @@ if test "$libssh" != "no" ; then
fi
fi
##########################################
# Check for libssh 0.8
# This is done like this instead of using the LIBSSH_VERSION_* and
# SSH_VERSION_* macros because some distributions in the past shipped
# snapshots of the future 0.8 from Git, and those snapshots did not
# have updated version numbers (still referring to 0.7.0).
if test "$libssh" = "yes"; then
cat > $TMPC <<EOF
#include <libssh/libssh.h>
int main(void) { return ssh_get_server_publickey(NULL, NULL); }
EOF
if compile_prog "$libssh_cflags" "$libssh_libs"; then
libssh_cflags="-DHAVE_LIBSSH_0_8 $libssh_cflags"
fi
fi
##########################################
# linux-aio probe
@@ -5739,15 +5708,11 @@ if test "$gnutls" = "yes" ; then
fi
if test "$gcrypt" = "yes" ; then
echo "CONFIG_GCRYPT=y" >> $config_host_mak
if test "$gcrypt_hmac" = "yes" ; then
echo "CONFIG_GCRYPT_HMAC=y" >> $config_host_mak
fi
echo "GCRYPT_CFLAGS=$gcrypt_cflags" >> $config_host_mak
echo "GCRYPT_LIBS=$gcrypt_libs" >> $config_host_mak
fi
if test "$nettle" = "yes" ; then
echo "CONFIG_NETTLE=y" >> $config_host_mak
echo "CONFIG_NETTLE_VERSION_MAJOR=${nettle_version%%.*}" >> $config_host_mak
echo "NETTLE_CFLAGS=$nettle_cflags" >> $config_host_mak
echo "NETTLE_LIBS=$nettle_libs" >> $config_host_mak
fi
+25 -66
View File
@@ -34,47 +34,6 @@
#include <nettle/xts.h>
#endif
typedef void (*QCryptoCipherNettleFuncWrapper)(const void *ctx,
size_t length,
uint8_t *dst,
const uint8_t *src);
#if CONFIG_NETTLE_VERSION_MAJOR < 3
typedef nettle_crypt_func * QCryptoCipherNettleFuncNative;
typedef void * cipher_ctx_t;
typedef unsigned cipher_length_t;
#define CONST_CTX
#define cast5_set_key cast128_set_key
#define aes128_ctx aes_ctx
#define aes192_ctx aes_ctx
#define aes256_ctx aes_ctx
#define aes128_set_encrypt_key(c, k) \
aes_set_encrypt_key(c, 16, k)
#define aes192_set_encrypt_key(c, k) \
aes_set_encrypt_key(c, 24, k)
#define aes256_set_encrypt_key(c, k) \
aes_set_encrypt_key(c, 32, k)
#define aes128_set_decrypt_key(c, k) \
aes_set_decrypt_key(c, 16, k)
#define aes192_set_decrypt_key(c, k) \
aes_set_decrypt_key(c, 24, k)
#define aes256_set_decrypt_key(c, k) \
aes_set_decrypt_key(c, 32, k)
#define aes128_encrypt aes_encrypt
#define aes192_encrypt aes_encrypt
#define aes256_encrypt aes_encrypt
#define aes128_decrypt aes_decrypt
#define aes192_decrypt aes_decrypt
#define aes256_decrypt aes_decrypt
#else
typedef nettle_cipher_func * QCryptoCipherNettleFuncNative;
typedef const void * cipher_ctx_t;
typedef size_t cipher_length_t;
#define CONST_CTX const
#endif
static inline bool qcrypto_length_check(size_t len, size_t blocksize,
Error **errp)
{
@@ -197,12 +156,12 @@ static const struct QCryptoCipherDriver NAME##_driver_ctr = { \
static void NAME##_xts_wrape(const void *ctx, size_t length, \
uint8_t *dst, const uint8_t *src) \
{ \
ENCRYPT((cipher_ctx_t)ctx, length, dst, src); \
ENCRYPT((const void *)ctx, length, dst, src); \
} \
static void NAME##_xts_wrapd(const void *ctx, size_t length, \
uint8_t *dst, const uint8_t *src) \
{ \
DECRYPT((cipher_ctx_t)ctx, length, dst, src); \
DECRYPT((const void *)ctx, length, dst, src); \
} \
static int NAME##_encrypt_xts(QCryptoCipher *cipher, const void *in, \
void *out, size_t len, Error **errp) \
@@ -282,13 +241,13 @@ typedef struct QCryptoNettleDESRFB {
uint8_t iv[DES_BLOCK_SIZE];
} QCryptoNettleDESRFB;
static void des_encrypt_native(cipher_ctx_t ctx, cipher_length_t length,
static void des_encrypt_native(const void *ctx, size_t length,
uint8_t *dst, const uint8_t *src)
{
des_encrypt(ctx, length, dst, src);
}
static void des_decrypt_native(cipher_ctx_t ctx, cipher_length_t length,
static void des_decrypt_native(const void *ctx, size_t length,
uint8_t *dst, const uint8_t *src)
{
des_decrypt(ctx, length, dst, src);
@@ -304,13 +263,13 @@ typedef struct QCryptoNettleDES3 {
uint8_t iv[DES3_BLOCK_SIZE];
} QCryptoNettleDES3;
static void des3_encrypt_native(cipher_ctx_t ctx, cipher_length_t length,
static void des3_encrypt_native(const void *ctx, size_t length,
uint8_t *dst, const uint8_t *src)
{
des3_encrypt(ctx, length, dst, src);
}
static void des3_decrypt_native(cipher_ctx_t ctx, cipher_length_t length,
static void des3_decrypt_native(const void *ctx, size_t length,
uint8_t *dst, const uint8_t *src)
{
des3_decrypt(ctx, length, dst, src);
@@ -327,17 +286,17 @@ typedef struct QCryptoNettleAES128 {
struct aes128_ctx key[2], key_xts[2];
} QCryptoNettleAES128;
static void aes128_encrypt_native(cipher_ctx_t ctx, cipher_length_t length,
static void aes128_encrypt_native(const void *ctx, size_t length,
uint8_t *dst, const uint8_t *src)
{
CONST_CTX struct aes128_ctx *keys = ctx;
const struct aes128_ctx *keys = ctx;
aes128_encrypt(&keys[0], length, dst, src);
}
static void aes128_decrypt_native(cipher_ctx_t ctx, cipher_length_t length,
static void aes128_decrypt_native(const void *ctx, size_t length,
uint8_t *dst, const uint8_t *src)
{
CONST_CTX struct aes128_ctx *keys = ctx;
const struct aes128_ctx *keys = ctx;
aes128_decrypt(&keys[1], length, dst, src);
}
@@ -353,17 +312,17 @@ typedef struct QCryptoNettleAES192 {
struct aes192_ctx key[2], key_xts[2];
} QCryptoNettleAES192;
static void aes192_encrypt_native(cipher_ctx_t ctx, cipher_length_t length,
static void aes192_encrypt_native(const void *ctx, size_t length,
uint8_t *dst, const uint8_t *src)
{
CONST_CTX struct aes192_ctx *keys = ctx;
const struct aes192_ctx *keys = ctx;
aes192_encrypt(&keys[0], length, dst, src);
}
static void aes192_decrypt_native(cipher_ctx_t ctx, cipher_length_t length,
static void aes192_decrypt_native(const void *ctx, size_t length,
uint8_t *dst, const uint8_t *src)
{
CONST_CTX struct aes192_ctx *keys = ctx;
const struct aes192_ctx *keys = ctx;
aes192_decrypt(&keys[1], length, dst, src);
}
@@ -379,17 +338,17 @@ typedef struct QCryptoNettleAES256 {
struct aes256_ctx key[2], key_xts[2];
} QCryptoNettleAES256;
static void aes256_encrypt_native(cipher_ctx_t ctx, cipher_length_t length,
static void aes256_encrypt_native(const void *ctx, size_t length,
uint8_t *dst, const uint8_t *src)
{
CONST_CTX struct aes256_ctx *keys = ctx;
const struct aes256_ctx *keys = ctx;
aes256_encrypt(&keys[0], length, dst, src);
}
static void aes256_decrypt_native(cipher_ctx_t ctx, cipher_length_t length,
uint8_t *dst, const uint8_t *src)
static void aes256_decrypt_native(const void *ctx, size_t length,
uint8_t *dst, const uint8_t *src)
{
CONST_CTX struct aes256_ctx *keys = ctx;
const struct aes256_ctx *keys = ctx;
aes256_decrypt(&keys[1], length, dst, src);
}
@@ -404,13 +363,13 @@ typedef struct QCryptoNettleCAST128 {
struct cast128_ctx key, key_xts;
} QCryptoNettleCAST128;
static void cast128_encrypt_native(cipher_ctx_t ctx, cipher_length_t length,
static void cast128_encrypt_native(const void *ctx, size_t length,
uint8_t *dst, const uint8_t *src)
{
cast128_encrypt(ctx, length, dst, src);
}
static void cast128_decrypt_native(cipher_ctx_t ctx, cipher_length_t length,
static void cast128_decrypt_native(const void *ctx, size_t length,
uint8_t *dst, const uint8_t *src)
{
cast128_decrypt(ctx, length, dst, src);
@@ -428,13 +387,13 @@ typedef struct QCryptoNettleSerpent {
} QCryptoNettleSerpent;
static void serpent_encrypt_native(cipher_ctx_t ctx, cipher_length_t length,
static void serpent_encrypt_native(const void *ctx, size_t length,
uint8_t *dst, const uint8_t *src)
{
serpent_encrypt(ctx, length, dst, src);
}
static void serpent_decrypt_native(cipher_ctx_t ctx, cipher_length_t length,
static void serpent_decrypt_native(const void *ctx, size_t length,
uint8_t *dst, const uint8_t *src)
{
serpent_decrypt(ctx, length, dst, src);
@@ -451,13 +410,13 @@ typedef struct QCryptoNettleTwofish {
struct twofish_ctx key, key_xts;
} QCryptoNettleTwofish;
static void twofish_encrypt_native(cipher_ctx_t ctx, cipher_length_t length,
static void twofish_encrypt_native(const void *ctx, size_t length,
uint8_t *dst, const uint8_t *src)
{
twofish_encrypt(ctx, length, dst, src);
}
static void twofish_decrypt_native(cipher_ctx_t ctx, cipher_length_t length,
static void twofish_decrypt_native(const void *ctx, size_t length,
uint8_t *dst, const uint8_t *src)
{
twofish_decrypt(ctx, length, dst, src);
+2 -8
View File
@@ -26,18 +26,12 @@
#include <nettle/sha.h>
#include <nettle/ripemd160.h>
#if CONFIG_NETTLE_VERSION_MAJOR < 3
typedef unsigned int hash_length_t;
#else
typedef size_t hash_length_t;
#endif
typedef void (*qcrypto_nettle_init)(void *ctx);
typedef void (*qcrypto_nettle_write)(void *ctx,
hash_length_t len,
size_t len,
const uint8_t *buf);
typedef void (*qcrypto_nettle_result)(void *ctx,
hash_length_t len,
size_t len,
uint8_t *buf);
union qcrypto_hash_ctx {
+3 -9
View File
@@ -18,22 +18,16 @@
#include "hmacpriv.h"
#include <nettle/hmac.h>
#if CONFIG_NETTLE_VERSION_MAJOR < 3
typedef unsigned int hmac_length_t;
#else
typedef size_t hmac_length_t;
#endif
typedef void (*qcrypto_nettle_hmac_setkey)(void *ctx,
hmac_length_t key_length,
size_t key_length,
const uint8_t *key);
typedef void (*qcrypto_nettle_hmac_update)(void *ctx,
hmac_length_t length,
size_t length,
const uint8_t *data);
typedef void (*qcrypto_nettle_hmac_digest)(void *ctx,
hmac_length_t length,
size_t length,
uint8_t *digest);
typedef struct QCryptoHmacNettle QCryptoHmacNettle;
+1 -5
View File
@@ -26,11 +26,7 @@ if 'CONFIG_NETTLE' in config_host
crypto_ss.add(files('hash-nettle.c', 'hmac-nettle.c', 'pbkdf-nettle.c'))
elif 'CONFIG_GCRYPT' in config_host
crypto_ss.add(files('hash-gcrypt.c', 'pbkdf-gcrypt.c'))
if 'CONFIG_GCRYPT_HMAC' in config_host
crypto_ss.add(files('hmac-gcrypt.c'))
else
crypto_ss.add(files('hmac-glib.c'))
endif
crypto_ss.add(files('hmac-gcrypt.c'))
else
crypto_ss.add(files('hash-glib.c', 'hmac-glib.c', 'pbkdf-stub.c'))
endif
-2
View File
@@ -354,11 +354,9 @@ qcrypto_tls_creds_check_cert_pair(gnutls_x509_crt_t cert,
reason = "The certificate has been revoked";
}
#ifndef GNUTLS_1_0_COMPAT
if (status & GNUTLS_CERT_INSECURE_ALGORITHM) {
reason = "The certificate uses an insecure algorithm";
}
#endif
error_setg(errp,
"Our own certificate %s failed validation against %s: %s",
+1 -1
View File
@@ -1,4 +1,4 @@
# See docs/devel/tracing.txt for syntax documentation.
# See docs/devel/tracing.rst for syntax documentation.
# tlscreds.c
qcrypto_tls_creds_load_dh(void *creds, const char *filename) "TLS creds load DH creds=%p filename=%s"

Some files were not shown because too many files have changed in this diff Show More