summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-09-21 10:33:44 -0700
committerAndy Williams <andy@andywilliams.me>2016-11-20 09:47:15 +0000
commit848545818d1273b980d6a5ea038cdc1890e6b609 (patch)
tree8ecedec6e73f2b26baf59d44d137e40857143bed
parent8e2b550cc46afb5def5332c3a5f009728fe14f72 (diff)
downloadefl-848545818d1273b980d6a5ea038cdc1890e6b609.tar.gz
eet: fix gnutls support with newer version.
-rw-r--r--src/lib/eet/eet_cipher.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/eet/eet_cipher.c b/src/lib/eet/eet_cipher.c
index a34fdfff4b..cf9ef71a56 100644
--- a/src/lib/eet/eet_cipher.c
+++ b/src/lib/eet/eet_cipher.c
@@ -679,7 +679,6 @@ eet_identity_check(const void *data_base,
gnutls_datum_t datum;
gnutls_datum_t signature;
gnutls_pubkey_t pubkey;
- gnutls_digest_algorithm_t hash_algo;
unsigned char *hash;
gcry_md_hd_t md;
int err;
@@ -717,10 +716,10 @@ eet_identity_check(const void *data_base,
if (gnutls_pubkey_import_x509(pubkey, cert, 0) < 0)
goto on_error;
- if (gnutls_pubkey_get_verify_algorithm(pubkey, &signature, &hash_algo) < 0)
- goto on_error;
-
- if (gnutls_pubkey_verify_hash(pubkey, 0, &datum, &signature) < 0)
+ if (gnutls_pubkey_verify_hash2(pubkey,
+ gnutls_x509_crt_get_signature_algorithm(cert),
+ 0,
+ &datum, &signature) < 0)
goto on_error;
if (sha1)