projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
exp* tests: More tests.
[gnulib.git]
/
tests
/
test-gc-pbkdf2-sha1.c
diff --git
a/tests/test-gc-pbkdf2-sha1.c
b/tests/test-gc-pbkdf2-sha1.c
index
8027b9c
..
a55574c
100644
(file)
--- a/
tests/test-gc-pbkdf2-sha1.c
+++ b/
tests/test-gc-pbkdf2-sha1.c
@@
-1,9
+1,9
@@
/*
/*
- * Copyright (C) 2002
, 2003, 2004, 2005 Free Software Foundation
+ * Copyright (C) 2002
-2005, 2007, 2010-2012 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version
2
, or (at your option)
+ * the Free Software Foundation; either version
3
, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* any later version.
*
* This program is distributed in the hope that it will be useful,
@@
-12,15
+12,11
@@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA. */
+ * along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Written by Simon Josefsson. */
/* Written by Simon Josefsson. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "gc.h"
#include "gc.h"
@@
-91,19
+87,20
@@
main (int argc, char *argv[])
for (i = 0; i < sizeof (pkcs5) / sizeof (pkcs5[0]); i++)
{
rc = gc_pbkdf2_sha1 (pkcs5[i].password, strlen (pkcs5[i].password),
for (i = 0; i < sizeof (pkcs5) / sizeof (pkcs5[0]); i++)
{
rc = gc_pbkdf2_sha1 (pkcs5[i].password, strlen (pkcs5[i].password),
- pkcs5[i].salt, strlen (pkcs5[i].salt),
- pkcs5[i].iterations, out, pkcs5[i].dklen);
+
pkcs5[i].salt, strlen (pkcs5[i].salt),
+
pkcs5[i].iterations, out, pkcs5[i].dklen);
if (rc != GC_OK)
if (rc != GC_OK)
- {
- printf ("PKCS5 entry %d failed fatally: %d\n", i, rc);
- return 1;
- }
+ {
+ printf ("PKCS5 entry %ld failed fatally: %d\n",
+ (unsigned long) i, rc);
+ return 1;
+ }
if (memcmp (pkcs5[i].expected, out, pkcs5[i].dklen) != 0)
if (memcmp (pkcs5[i].expected, out, pkcs5[i].dklen) != 0)
- {
-
printf ("PKCS5 entry %d failed\n",
i);
- return 1;
- }
+
{
+
printf ("PKCS5 entry %ld failed\n", (unsigned long)
i);
+
return 1;
+
}
}
return 0;
}
return 0;