summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavide Pesavento <davidepesa@gmail.com>2008-10-24 01:06:35 +0200
committerLuis R. Rodriguez <lrodriguez@atheros.com>2008-10-23 09:13:42 -0700
commit53ee1596bdfed79b6f95fed7aea2343b21d1b8d0 (patch)
treee2f38660c34970349535f260114a5ad3f7112ee1
parenteb2df38032f659fb2d9b54a3a771bf5a29fda8db (diff)
downloadcrda-53ee1596bdfed79b6f95fed7aea2343b21d1b8d0.tar.gz
crda-53ee1596bdfed79b6f95fed7aea2343b21d1b8d0.tar.bz2
crda-53ee1596bdfed79b6f95fed7aea2343b21d1b8d0.zip
Use the correct index when iterating over the array of public keys.
Signed-off-by: Davide Pesavento <davidepesa@gmail.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
-rw-r--r--regdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/regdb.c b/regdb.c
index f786ae3..e2e2185 100644
--- a/regdb.c
+++ b/regdb.c
@@ -102,9 +102,9 @@ int crda_verify_db_signature(__u8 *db, int dblen, int siglen)
for (i = 0; (i < sizeof(keys)/sizeof(keys[0])) && (!ok); i++) {
if (gcry_mpi_scan(&mpi_e, GCRYMPI_FMT_USG,
- keys[0].e, keys[0].len_e, NULL) ||
+ keys[i].e, keys[i].len_e, NULL) ||
gcry_mpi_scan(&mpi_n, GCRYMPI_FMT_USG,
- keys[0].n, keys[0].len_n, NULL)) {
+ keys[i].n, keys[i].len_n, NULL)) {
fprintf(stderr, "Failed to convert numbers.\n");
goto out;
}