From e7b3af81597db1a6b55f2c15d030d703c6b2c6ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Fri, 4 May 2018 15:34:46 +0100 Subject: glib: bump min required glib library version to 2.40 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per supported platforms doc[1], the various min glib on relevant distros is: RHEL-7: 2.50.3 Debian (Stretch): 2.50.3 Debian (Jessie): 2.42.1 OpenBSD (Ports): 2.54.3 FreeBSD (Ports): 2.50.3 OpenSUSE Leap 15: 2.54.3 SLE12-SP2: 2.48.2 Ubuntu (Xenial): 2.48.0 macOS (Homebrew): 2.56.0 This suggests that a minimum glib of 2.42 is a reasonable target. The GLibC compile farm, however, uses Ubuntu 14.04 (Trusty) which only has glib 2.40.0, and this is needed for testing during merge. Thus an exception is made to the documented platform support policy to allow for all three current LTS releases to be supported. Docker jobs that not longer satisfy this new min version are removed. [1] https://qemu.weilnetz.de/doc/qemu-doc.html#Supported-build-platforms Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- crypto/hash-glib.c | 4 ---- crypto/hmac-glib.c | 36 ------------------------------------ 2 files changed, 40 deletions(-) (limited to 'crypto') diff --git a/crypto/hash-glib.c b/crypto/hash-glib.c index a5871cc..a0096c7 100644 --- a/crypto/hash-glib.c +++ b/crypto/hash-glib.c @@ -30,11 +30,7 @@ static int qcrypto_hash_alg_map[QCRYPTO_HASH_ALG__MAX] = { [QCRYPTO_HASH_ALG_SHA224] = -1, [QCRYPTO_HASH_ALG_SHA256] = G_CHECKSUM_SHA256, [QCRYPTO_HASH_ALG_SHA384] = -1, -#if GLIB_CHECK_VERSION(2, 36, 0) [QCRYPTO_HASH_ALG_SHA512] = G_CHECKSUM_SHA512, -#else - [QCRYPTO_HASH_ALG_SHA512] = -1, -#endif [QCRYPTO_HASH_ALG_RIPEMD160] = -1, }; diff --git a/crypto/hmac-glib.c b/crypto/hmac-glib.c index a6c1730..7df6273 100644 --- a/crypto/hmac-glib.c +++ b/crypto/hmac-glib.c @@ -17,9 +17,6 @@ #include "crypto/hmac.h" #include "hmacpriv.h" -/* Support for HMAC Algos has been added in GLib 2.30 */ -#if GLIB_CHECK_VERSION(2, 30, 0) - static int qcrypto_hmac_alg_map[QCRYPTO_HASH_ALG__MAX] = { [QCRYPTO_HASH_ALG_MD5] = G_CHECKSUM_MD5, [QCRYPTO_HASH_ALG_SHA1] = G_CHECKSUM_SHA1, @@ -126,39 +123,6 @@ qcrypto_glib_hmac_bytesv(QCryptoHmac *hmac, return 0; } -#else - -bool qcrypto_hmac_supports(QCryptoHashAlgorithm alg) -{ - return false; -} - -void *qcrypto_hmac_ctx_new(QCryptoHashAlgorithm alg, - const uint8_t *key, size_t nkey, - Error **errp) -{ - return NULL; -} - -static void -qcrypto_glib_hmac_ctx_free(QCryptoHmac *hmac) -{ - return; -} - -static int -qcrypto_glib_hmac_bytesv(QCryptoHmac *hmac, - const struct iovec *iov, - size_t niov, - uint8_t **result, - size_t *resultlen, - Error **errp) -{ - return -1; -} - -#endif - QCryptoHmacDriver qcrypto_hmac_lib_driver = { .hmac_bytesv = qcrypto_glib_hmac_bytesv, .hmac_free = qcrypto_glib_hmac_ctx_free, -- cgit v1.1