From dc37fe184907dfb70a99b573b8e36fa71d36061f Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 10 Jan 2002 19:47:20 +0000 Subject: * base64.c (gpgsm_create_writer): Allow to set the object name * server.c (cmd_genkey): New. * certreqgen.c: New. The parameter handling code has been taken from gnupg/g10/keygen.c version 1.0.6. * call-agent.c (gpgsm_agent_genkey): New. --- sm/keydb.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'sm/keydb.c') diff --git a/sm/keydb.c b/sm/keydb.c index 9a39b67fb..17074e800 100644 --- a/sm/keydb.c +++ b/sm/keydb.c @@ -35,8 +35,6 @@ #define DIRSEP_C '/' -#define spacep(a) ((a) == ' ' || (a) == '\t') - static int active_handles; typedef enum { @@ -911,7 +909,7 @@ classify_user_id (const char *name, memset (desc, 0, sizeof *desc); *force_exact = 0; /* skip leading spaces. Fixme: what about trailing white space? */ - for(s = name; *s && spacep(*s); s++ ) + for(s = name; *s && spacep (s); s++ ) ; switch (*s) @@ -957,7 +955,7 @@ classify_user_id (const char *name, case '/': /* subject's DN */ s++; - if (!*s || spacep (*s)) + if (!*s || spacep (s)) return 0; /* no DN or prefixed with a space */ desc->u.name = s; mode = KEYDB_SEARCH_MODE_SUBJECT; @@ -971,7 +969,7 @@ classify_user_id (const char *name, if ( *s == '/') { /* "#/" indicates an issuer's DN */ s++; - if (!*s || spacep (*s)) + if (!*s || spacep (s)) return 0; /* no DN or prefixed with a space */ desc->u.name = s; mode = KEYDB_SEARCH_MODE_ISSUER; @@ -990,7 +988,7 @@ classify_user_id (const char *name, else { s = si+1; - if (!*s || spacep (*s)) + if (!*s || spacep (s)) return 0; /* no DN or prefixed with a space */ desc->u.name = s; mode = KEYDB_SEARCH_MODE_ISSUER_SN; @@ -1038,7 +1036,7 @@ classify_user_id (const char *name, } /* check if a hexadecimal number is terminated by EOS or blank */ - if (hexlength && s[hexlength] && !spacep(s[hexlength])) + if (hexlength && s[hexlength] && !spacep (s+hexlength)) { if (hexprefix) /* a "0x" prefix without correct */ return 0; /* termination is an error */ -- cgit v1.2.3