[vlc-commits] update: handle hash lengths with DSA keys larger than 1024 bits
Rafaël Carré
git at videolan.org
Thu May 15 16:40:49 CEST 2014
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Mon May 12 12:51:17 2014 +0200| [5ce0c2c1eb05688958a4f33b95e7a4aef52ea9dd] | committer: Rafaël Carré
update: handle hash lengths with DSA keys larger than 1024 bits
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5ce0c2c1eb05688958a4f33b95e7a4aef52ea9dd
---
src/misc/update_crypto.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/misc/update_crypto.c b/src/misc/update_crypto.c
index 97b55c6..ba95b32 100644
--- a/src/misc/update_crypto.c
+++ b/src/misc/update_crypto.c
@@ -452,8 +452,8 @@ int verify_signature( signature_packet_t *sign, public_key_packet_t *p_key,
int i_hash_len = gcry_md_get_algo_dlen (sign->digest_algo);
if (sign->public_key_algo == GCRY_PK_DSA) {
- if (i_hash_len > 20)
- i_hash_len = 20;
+ if (i_hash_len > i_q_len)
+ i_hash_len = i_q_len;
}
if( gcry_mpi_scan( &hash, GCRYMPI_FMT_USG, p_hash, i_hash_len, NULL ) ||
gcry_sexp_build( &hash_sexp, &erroff, hash_sexp_s, hash ) )
More information about the vlc-commits
mailing list