summaryrefslogtreecommitdiffstats
path: root/crypto/hmac-glib.c
diff options
context:
space:
mode:
authorPeter Maydell2018-06-29 16:04:20 +0200
committerPeter Maydell2018-06-29 16:04:20 +0200
commit75507f1aba6feb73ae43329922d51571550b9128 (patch)
treeafdc91cca05f534d22838da16dac63e13ace3307 /crypto/hmac-glib.c
parentMerge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (diff)
parentglib: enforce the minimum required version and warn about old APIs (diff)
downloadqemu-75507f1aba6feb73ae43329922d51571550b9128.tar.gz
qemu-75507f1aba6feb73ae43329922d51571550b9128.tar.xz
qemu-75507f1aba6feb73ae43329922d51571550b9128.zip
Merge remote-tracking branch 'remotes/berrange/tags/min-glib-pull-request' into staging
glib: update the min required version This updates the minimum required glib version to 2.40 # gpg: Signature made Fri 29 Jun 2018 12:24:58 BST # gpg: using RSA key BE86EBB415104FDF # gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>" # gpg: aka "Daniel P. Berrange <berrange@redhat.com>" # Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF * remotes/berrange/tags/min-glib-pull-request: glib: enforce the minimum required version and warn about old APIs glib: bump min required glib library version to 2.40 util: remove redundant include of glib.h and add osdep.h Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'crypto/hmac-glib.c')
-rw-r--r--crypto/hmac-glib.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/crypto/hmac-glib.c b/crypto/hmac-glib.c
index a6c1730291..7df627329d 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,