diff options
author | Werner Koch <wk@gnupg.org> | 2002-01-10 20:47:20 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2002-01-10 20:47:20 +0100 |
commit | dc37fe184907dfb70a99b573b8e36fa71d36061f (patch) | |
tree | 40860a3645374c3dcd0ef07edb84471e39045b53 /sm/keydb.c | |
parent | *** empty log message *** (diff) | |
download | gnupg2-dc37fe184907dfb70a99b573b8e36fa71d36061f.tar.xz gnupg2-dc37fe184907dfb70a99b573b8e36fa71d36061f.zip |
* 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.
Diffstat (limited to 'sm/keydb.c')
-rw-r--r-- | sm/keydb.c | 12 |
1 files changed, 5 insertions, 7 deletions
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 */ |