diff options
Diffstat (limited to 'g10')
-rw-r--r-- | g10/ChangeLog | 12 | ||||
-rw-r--r-- | g10/armor.c | 8 | ||||
-rw-r--r-- | g10/getkey.c | 8 | ||||
-rw-r--r-- | g10/helptext.c | 4 | ||||
-rw-r--r-- | g10/pkclist.c | 4 |
5 files changed, 25 insertions, 11 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index 99e83ab6e..01c6fb181 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,15 @@ +Mon May 1 15:38:04 CEST 2000 Werner Koch <[email protected]> + + * getkey.c (key_byname): Always returned a defined context. Fixed + a segv for invalid user id specifications. Reported by Walter Koch. + + * getkey.c (get_user_id): I18ned "no user id" string. By Walter. + + * pkclist.c (do_show_revocation_reason): Typo fixes. + * helptext.c: Ditto. + + * armor.c (armor_filter): Fixed some CRLF issues. By Mike McEwan. + Fri Apr 14 19:37:08 CEST 2000 Werner Koch <[email protected]> * pkclist.c (do_show_revocation_reason): New. diff --git a/g10/armor.c b/g10/armor.c index 3a0791841..863b93243 100644 --- a/g10/armor.c +++ b/g10/armor.c @@ -902,10 +902,10 @@ armor_filter( void *opaque, int control, log_bug("afx->what=%d", afx->what); iobuf_writestr(a, "-----"); iobuf_writestr(a, head_strings[afx->what] ); - iobuf_writestr(a, "-----\n"); + iobuf_writestr(a, "-----" LF ); if( !opt.no_version ) iobuf_writestr(a, "Version: GnuPG v" VERSION " (" - PRINTABLE_OS_NAME ")\n"); + PRINTABLE_OS_NAME ")" LF ); /* write the comment string or a default one */ s = opt.comment_string ? opt.comment_string @@ -922,12 +922,12 @@ armor_filter( void *opaque, int control, else iobuf_put(a, *s ); } - iobuf_put(a, '\n' ); + iobuf_writestr(a, LF ); } if( afx->hdrlines ) iobuf_writestr(a, afx->hdrlines); - iobuf_put(a, '\n'); + iobuf_writestr(a, LF ); afx->status++; afx->idx = 0; afx->idx2 = 0; diff --git a/g10/getkey.c b/g10/getkey.c index 568402f3a..6c15542df 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -701,6 +701,8 @@ key_byname( GETKEY_CTX *retctx, STRLIST namelist, STRLIST r; GETKEY_CTX ctx; + if( retctx ) /* reset the returned context in case of error */ + *retctx = NULL; assert( !pk ^ !sk ); /* build the search context */ @@ -2001,6 +2003,7 @@ get_user_id( u32 *keyid, size_t *rn ) user_id_db_t r; char *p; int pass=0; + /* try it two times; second pass reads from key resources */ do { for(r=user_id_db; r; r = r->next ) @@ -2011,9 +2014,8 @@ get_user_id( u32 *keyid, size_t *rn ) return p; } } while( ++pass < 2 && !get_pubkey( NULL, keyid ) ); - p = m_alloc( 19 ); - memcpy(p, "[User id not found]", 19 ); - *rn = 19; + p = m_strdup( _("[User id not found]") ); + *rn = strlen(p); return p; } diff --git a/g10/helptext.c b/g10/helptext.c index a5640b3f3..f189f4f8e 100644 --- a/g10/helptext.c +++ b/g10/helptext.c @@ -231,11 +231,11 @@ static struct helptexts { const char *key; const char *help; } helptexts[] = { " \"Key has been compromised\"\n" " Use this if you have a reason to believe that unauthorized persons\n" " got access to your secret key.\n" - " \"Key is superseded\"\n" + " \"Key is superseeded\"\n" " Use this if you have replaced this key with a newer one.\n" " \"Key is no longer used\"\n" " Use this if you have retired this key.\n" - " \"User ID is non longer valid\"\n" + " \"User ID is no longer valid\"\n" " Use this to state that the user ID should not longer be used;\n" " this is normally used to mark an email address invalid.\n" )}, diff --git a/g10/pkclist.c b/g10/pkclist.c index 42725d446..5cb214746 100644 --- a/g10/pkclist.c +++ b/g10/pkclist.c @@ -115,13 +115,13 @@ do_show_revocation_reason( PKT_signature *sig ) if( *p == 0 ) text = _("No reason specified"); else if( *p == 0x01 ) - text = _("Key is superseded"); + text = _("Key is superseeded"); else if( *p == 0x02 ) text = _("Key has been compromised"); else if( *p == 0x03 ) text = _("Key is no longer used"); else if( *p == 0x20 ) - text = _("User ID is non longer valid"); + text = _("User ID is no longer valid"); else text = NULL; |