projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add set -e.
[u/mdw/catacomb]
/
dsig.c
diff --git
a/dsig.c
b/dsig.c
index
c5eb5af
..
6a67990
100644
(file)
--- a/
dsig.c
+++ b/
dsig.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: dsig.c,v 1.
7 2001/02/23 09:04:17
mdw Exp $
+ * $Id: dsig.c,v 1.
8 2004/04/04 19:42:59
mdw Exp $
*
* Verify signatures on distribuitions of files
*
*
* Verify signatures on distribuitions of files
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: dsig.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: dsig.c,v $
+ * Revision 1.8 2004/04/04 19:42:59 mdw
+ * Add set -e.
+ *
* Revision 1.7 2001/02/23 09:04:17 mdw
* Add new hash functions. Provide full help for subcommands. Run the
* hash function over parts of the header in a canonical order.
* Revision 1.7 2001/02/23 09:04:17 mdw
* Add new hash functions. Provide full help for subcommands. Run the
* hash function over parts of the header in a canonical order.
@@
-83,19
+86,6
@@
#include "rsa.h"
#include "pkcs1.h"
#include "rsa.h"
#include "pkcs1.h"
-#include "md2.h"
-#include "md4.h"
-#include "md5.h"
-#include "rmd128.h"
-#include "rmd160.h"
-#include "rmd256.h"
-#include "rmd320.h"
-#include "sha.h"
-#include "sha256.h"
-#include "sha384.h"
-#include "sha512.h"
-#include "tiger.h"
-
/*----- Digital signature algorithm ---------------------------------------*/
static int dsasign(key *k, const void *m, size_t msz, dstr *d)
/*----- Digital signature algorithm ---------------------------------------*/
static int dsasign(key *k, const void *m, size_t msz, dstr *d)
@@
-206,9
+196,6
@@
typedef struct sig {
const void */*s*/, size_t /*ssz*/);
} sig;
const void */*s*/, size_t /*ssz*/);
} sig;
-static const gchash *hashtab[] = {
- &rmd160, &tiger, &sha, &sha256, &sha384, &sha512,
- &rmd128, &rmd256, &rmd320, &md5, &md4, &md2, 0 };
static sig sigtab[] = {
{ "dsa", "dsig-dsa", dsasign, dsaverify },
{ "rsa", "dsig-rsa", rsasign, rsaverify },
static sig sigtab[] = {
{ "dsa", "dsig-dsa", dsasign, dsaverify },
{ "rsa", "dsig-rsa", rsasign, rsaverify },
@@
-226,9
+213,9
@@
static sig sigtab[] = {
static const gchash *gethash(const char *name)
{
static const gchash *gethash(const char *name)
{
- const gchash **g, *gg = 0;
+ const gchash *
const
*g, *gg = 0;
size_t sz = strlen(name);
size_t sz = strlen(name);
- for (g = hashtab; *g; g++) {
+ for (g =
g
hashtab; *g; g++) {
if (strncmp(name, (*g)->name, sz) == 0) {
if ((*g)->name[sz] == 0) {
gg = *g;
if (strncmp(name, (*g)->name, sz) == 0) {
if ((*g)->name[sz] == 0) {
gg = *g;