1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-02-02 16:43:03 +01:00

Fix capitalization issues

This commit is contained in:
David Shaw 2001-12-17 22:48:52 +00:00
parent 30481e5a17
commit 0335a5f458
9 changed files with 72 additions and 53 deletions

View File

@ -1,5 +1,11 @@
2001-12-17 David Shaw <dshaw@jabberwocky.com> 2001-12-17 David Shaw <dshaw@jabberwocky.com>
* mainproc.c (proc_encrypted): Use generic IDEA warning.
* gpgv.c: add stub for idea_cipher_warn
* g10.c, hkp.c, keyserver.c: Fix capitalization and plural issues.
* encode.c (encode_crypt), sign.c (sign_file, clearsign_file): * encode.c (encode_crypt), sign.c (sign_file, clearsign_file):
disable pgp2 mode after the message is no longer pgp2 compatible. disable pgp2 mode after the message is no longer pgp2 compatible.

View File

@ -1107,7 +1107,7 @@ main( int argc, char **argv )
break; break;
case oKeyServer: case oKeyServer:
if(parse_keyserver_uri(pargs.r.ret_str)) if(parse_keyserver_uri(pargs.r.ret_str))
log_error(_("Could not parse keyserver URI\n")); log_error(_("could not parse keyserver URI\n"));
break; break;
case oKeyServerOptions: case oKeyServerOptions:
parse_keyserver_options(pargs.r.ret_str); parse_keyserver_options(pargs.r.ret_str);
@ -1133,7 +1133,7 @@ main( int argc, char **argv )
case oHonorHttpProxy: case oHonorHttpProxy:
opt.honor_http_proxy = 1; opt.honor_http_proxy = 1;
log_info("WARNING: --honor-http-proxy is deprecated.\n"); log_info("WARNING: --honor-http-proxy is deprecated.\n");
log_info("Please use \"--keyserver-options honor-http-proxy\" instead\n"); log_info("please use \"--keyserver-options honor-http-proxy\" instead\n");
break; break;
case oFastListMode: opt.fast_list_mode = 1; break; case oFastListMode: opt.fast_list_mode = 1; break;
case oFixedListMode: opt.fixed_list_mode = 1; break; case oFixedListMode: opt.fixed_list_mode = 1; break;
@ -2143,10 +2143,16 @@ check_policy_url( const char *s )
/* Special warning for the IDEA cipher */ /* Special warning for the IDEA cipher */
void void
idea_cipher_warn(void) idea_cipher_warn(void)
{
static int warned=0;
if(!warned)
{ {
log_info("the IDEA cipher plugin is not present\n"); log_info("the IDEA cipher plugin is not present\n");
log_info("please see http://www.gnupg.org/why-not-idea.html " log_info("please see http://www.gnupg.org/why-not-idea.html "
"for more information\n"); "for more information\n");
warned=1;
}
} }
const char * const char *

View File

@ -300,6 +300,9 @@ passphrase_to_dek( u32 *keyid, int pubkey_algo,
return NULL; return NULL;
} }
/* Stub: no decrypting, so no IDEA needed */
void
idea_cipher_warn(void) {}
/* Stubs to void linking to ../cipher/cipher.c */ /* Stubs to void linking to ../cipher/cipher.c */
int string_to_cipher_algo( const char *string ) { return 0; } int string_to_cipher_algo( const char *string ) { return 0; }

View File

@ -75,7 +75,7 @@ hkp_ask_import( u32 *keyid, void *stats_handle)
(ulong)keyid[1] ); (ulong)keyid[1] );
if(opt.keyserver_options.verbose>2) if(opt.keyserver_options.verbose>2)
log_info("Request is \"%s\"\n",request); log_info("request is \"%s\"\n",request);
rc = http_open_document( &hd, request, hflags ); rc = http_open_document( &hd, request, hflags );
if( rc ) { if( rc ) {
@ -129,7 +129,7 @@ hkp_export( STRLIST users )
atoi(opt.keyserver_port)>0?opt.keyserver_port:""); atoi(opt.keyserver_port)>0?opt.keyserver_port:"");
if(opt.keyserver_options.verbose>2) if(opt.keyserver_options.verbose>2)
log_info("Request is \"%s\"\n",request); log_info("request is \"%s\"\n",request);
rc = http_open( &hd, HTTP_REQ_POST, request , hflags ); rc = http_open( &hd, HTTP_REQ_POST, request , hflags );
if( rc ) { if( rc ) {
@ -232,7 +232,7 @@ parse_hkp_index(IOBUF buffer,char *line)
if(!(revoked && !opt.keyserver_options.include_revoked)) if(!(revoked && !opt.keyserver_options.include_revoked))
{ {
char intstr[20]; char intstr[11];
iobuf_writestr(buffer,key); iobuf_writestr(buffer,key);
iobuf_writestr(buffer,":"); iobuf_writestr(buffer,":");
@ -454,7 +454,7 @@ int hkp_search(STRLIST tokens)
searchurl); searchurl);
if(opt.keyserver_options.verbose>2) if(opt.keyserver_options.verbose>2)
log_info("Request is \"%s\"\n",request); log_info("request is \"%s\"\n",request);
rc=http_open_document(&hd,request,hflags); rc=http_open_document(&hd,request,hflags);
if(rc) if(rc)

View File

@ -342,7 +342,7 @@ keyserver_spawn(int action,STRLIST list,u32 (*kidlist)[2],int count)
/* If we get this far the exec failed. Clean up and return. */ /* If we get this far the exec failed. Clean up and return. */
if(opt.keyserver_options.verbose>2) if(opt.keyserver_options.verbose>2)
log_error(_("Unable to execute %s: %s\n"), log_error(_("unable to execute %s: %s\n"),
filename,strerror(errno)); filename,strerror(errno));
if(errno==ENOENT) if(errno==ENOENT)
@ -515,13 +515,13 @@ keyserver_spawn(int action,STRLIST list,u32 (*kidlist)[2],int count)
if(ret==127) if(ret==127)
{ {
log_error(_("Unable to exec keyserver program\n")); log_error(_("unable to exec keyserver program\n"));
goto fail; goto fail;
} }
if(ret==-1) if(ret==-1)
{ {
log_error(_("Internal system error while calling keyserver: %s\n"), log_error(_("internal system error while calling keyserver: %s\n"),
strerror(errno)); strerror(errno));
goto fail; goto fail;
} }
@ -529,7 +529,7 @@ keyserver_spawn(int action,STRLIST list,u32 (*kidlist)[2],int count)
fromchild=iobuf_open(tempfile_out); fromchild=iobuf_open(tempfile_out);
if(fromchild==NULL) if(fromchild==NULL)
{ {
log_error(_("Unable to read keyserver response: %s\n"), log_error(_("unable to read keyserver response: %s\n"),
strerror(errno)); strerror(errno));
goto fail; goto fail;
} }
@ -551,7 +551,7 @@ keyserver_spawn(int action,STRLIST list,u32 (*kidlist)[2],int count)
if(atoi(&line[8])!=KEYSERVER_PROTO_VERSION) if(atoi(&line[8])!=KEYSERVER_PROTO_VERSION)
{ {
log_error(_("Invalid keyserver protocol (us %d!=handler %d)\n"), log_error(_("invalid keyserver protocol (us %d!=handler %d)\n"),
KEYSERVER_PROTO_VERSION,atoi(&line[8])); KEYSERVER_PROTO_VERSION,atoi(&line[8]));
goto fail; goto fail;
} }
@ -569,7 +569,7 @@ keyserver_spawn(int action,STRLIST list,u32 (*kidlist)[2],int count)
if(!gotversion) if(!gotversion)
{ {
log_error(_("Keyserver communications error\n")); log_error(_("keyserver communications error\n"));
goto fail; goto fail;
} }
@ -730,13 +730,13 @@ keyserver_work(int action,STRLIST list,u32 (*kidlist)[2],int count)
switch(rc) switch(rc)
{ {
case KEYSERVER_SCHEME_NOT_FOUND: case KEYSERVER_SCHEME_NOT_FOUND:
log_error(_("No handler for keyserver scheme \"%s\"\n"), log_error(_("no handler for keyserver scheme \"%s\"\n"),
opt.keyserver_scheme); opt.keyserver_scheme);
break; break;
case KEYSERVER_INTERNAL_ERROR: case KEYSERVER_INTERNAL_ERROR:
default: default:
log_error(_("Keyserver internal error\n")); log_error(_("keyserver internal error\n"));
break; break;
} }
@ -783,7 +783,7 @@ keyserver_import(STRLIST users)
} }
else else
{ {
log_error (_("Skipping invalid key ID \"%s\"\n"), users->d ); log_error (_("skipping invalid key ID \"%s\"\n"), users->d );
continue; continue;
} }
} }
@ -903,13 +903,10 @@ keyserver_refresh(STRLIST users)
if(rc) if(rc)
return rc; return rc;
/* fixme: this is is a problem: for Example in German you have 1 if(count==1)
Schlüssel, 2 Schlüssel but 1 Auto, 2 Autos. There is no log_info(_("%d key to refresh\n"),count);
regularity in German (afaik); other languages have even more else
complicates ways. The latest gettext versions have some code to log_info(_("%d keys to refresh\n"),count);
cope with this, but I haven't looked into it. The old suggestion
is to write 2 full strings and don't use %s */
log_info(_("%d key%s to refresh\n"),count,count!=1?"s":"");
if(count>0) if(count>0)
rc=keyserver_work(GET,NULL,kidlist,count); rc=keyserver_work(GET,NULL,kidlist,count);
@ -942,9 +939,9 @@ keyserver_search_prompt(IOBUF buffer,int count,const char *searchstr)
if(count==0) if(count==0)
{ {
if(searchstr) if(searchstr)
log_info(_("Key \"%s\" not found on keyserver\n"),searchstr); log_info(_("key \"%s\" not found on keyserver\n"),searchstr);
else else
log_info(_("Key not found on keyserver\n")); log_info(_("key not found on keyserver\n"));
return; return;
} }

View File

@ -431,7 +431,8 @@ proc_encrypted( CTX c, PACKET *pkt )
else if ( check_cipher_algo(CIPHER_ALGO_IDEA) ) { else if ( check_cipher_algo(CIPHER_ALGO_IDEA) ) {
algo = opt.def_cipher_algo; algo = opt.def_cipher_algo;
if (!algo) if (!algo)
algo = opt.s2k_cipher_algo;; algo = opt.s2k_cipher_algo;
idea_cipher_warn();
log_info (_("IDEA cipher unavailable, " log_info (_("IDEA cipher unavailable, "
"optimistically attempting to use %s instead\n"), "optimistically attempting to use %s instead\n"),
cipher_algo_to_string(algo)); cipher_algo_to_string(algo));

View File

@ -1,3 +1,9 @@
2001-12-17 David Shaw <dshaw@jabberwocky.com>
* gpgkeys_ldap.c, gpgkeys_mailto.in: Fix GNU capitalization
issues. Prefix log messages with "gpgkeys" to clarify which
program is generating them.
2001-12-14 David Shaw <dshaw@jabberwocky.com> 2001-12-14 David Shaw <dshaw@jabberwocky.com>
* gpgkeys_ldap.c (search_key): Use unsigned int rather than uint * gpgkeys_ldap.c (search_key): Use unsigned int rather than uint

View File

@ -71,7 +71,7 @@ int send_key(LDAP *ldap,char *keyid)
dn=malloc(strlen("pgpCertid=virtual,")+strlen(basekeyspacedn)+1); dn=malloc(strlen("pgpCertid=virtual,")+strlen(basekeyspacedn)+1);
if(dn==NULL) if(dn==NULL)
{ {
fprintf(console,"gpg: Can't allocate memory for keyserver record\n"); fprintf(console,"gpgkeys: can't allocate memory for keyserver record\n");
goto fail; goto fail;
} }
@ -81,7 +81,7 @@ int send_key(LDAP *ldap,char *keyid)
key[0]=malloc(1); key[0]=malloc(1);
if(key[0]==NULL) if(key[0]==NULL)
{ {
fprintf(console,"gpg: Unable to allocate memory for key\n"); fprintf(console,"gpgkeys: unable to allocate memory for key\n");
goto fail; goto fail;
} }
@ -119,7 +119,7 @@ int send_key(LDAP *ldap,char *keyid)
key[0]=realloc(key[0],keysize); key[0]=realloc(key[0],keysize);
if(key[0]==NULL) if(key[0]==NULL)
{ {
fprintf(console,"gpg: Unable to reallocate for key\n"); fprintf(console,"gpgkeys: unable to reallocate for key\n");
goto fail; goto fail;
} }
@ -128,14 +128,14 @@ int send_key(LDAP *ldap,char *keyid)
if(!gotit) if(!gotit)
{ {
fprintf(console,"gpg: keyserver: No KEY %s END found\n",keyid); fprintf(console,"gpgkeys: no KEY %s END found\n",keyid);
goto fail; goto fail;
} }
err=ldap_add_s(ldap,dn,attrs); err=ldap_add_s(ldap,dn,attrs);
if(err!=LDAP_SUCCESS) if(err!=LDAP_SUCCESS)
{ {
fprintf(console,"gpg: error adding key %s to keyserver: %s\n", fprintf(console,"gpgkeys: error adding key %s to keyserver: %s\n",
keyid,ldap_err2string(err)); keyid,ldap_err2string(err));
goto fail; goto fail;
} }
@ -175,20 +175,20 @@ int get_key(LDAP *ldap,char *getkey)
fprintf(output,"KEY 0x%s BEGIN\n",getkey); fprintf(output,"KEY 0x%s BEGIN\n",getkey);
if(verbose>2) if(verbose>2)
fprintf(console,"LDAP fetch for: %s\n",search); fprintf(console,"gpgkeys: LDAP fetch for: %s\n",search);
if(!verbose) if(!verbose)
attrs[1]=NULL; attrs[1]=NULL;
fprintf(console, fprintf(console,
"gpg: requesting key %s from LDAP keyserver %s\n", "gpgkeys: requesting key %s from LDAP keyserver %s\n",
getkey,host); getkey,host);
err=ldap_search_s(ldap,basekeyspacedn, err=ldap_search_s(ldap,basekeyspacedn,
LDAP_SCOPE_SUBTREE,search,attrs,0,&res); LDAP_SCOPE_SUBTREE,search,attrs,0,&res);
if(err!=0) if(err!=0)
{ {
fprintf(console,"gpg: LDAP search error: %s\n",ldap_err2string(err)); fprintf(console,"gpgkeys: LDAP search error: %s\n",ldap_err2string(err));
fprintf(output,"KEY 0x%s FAILED\n",getkey); fprintf(output,"KEY 0x%s FAILED\n",getkey);
return -1; return -1;
} }
@ -196,7 +196,7 @@ int get_key(LDAP *ldap,char *getkey)
count=ldap_count_entries(ldap,res); count=ldap_count_entries(ldap,res);
if(count<1) if(count<1)
{ {
fprintf(console,"gpg: Key %s not found on keyserver\n",getkey); fprintf(console,"gpgkeys: key %s not found on keyserver\n",getkey);
fprintf(output,"KEY 0x%s FAILED\n",getkey); fprintf(output,"KEY 0x%s FAILED\n",getkey);
return -1; return -1;
} }
@ -284,7 +284,7 @@ int get_key(LDAP *ldap,char *getkey)
if(vals==NULL) if(vals==NULL)
{ {
fprintf(console, fprintf(console,
"gpg: Unable to retrieve key %s from keyserver\n",getkey); "gpgkeys: unable to retrieve key %s from keyserver\n",getkey);
fprintf(output,"KEY 0x%s FAILED\n",getkey); fprintf(output,"KEY 0x%s FAILED\n",getkey);
} }
else else
@ -358,16 +358,16 @@ int search_key(LDAP *ldap,char *searchkey)
!(include_disabled&&include_revoked)?")":""); !(include_disabled&&include_revoked)?")":"");
if(verbose>2) if(verbose>2)
fprintf(console,"LDAP search for: %s\n",search); fprintf(console,"gpgkeys: LDAP search for: %s\n",search);
fprintf(console,("gpg: searching for \"%s\" from LDAP server %s\n"), fprintf(console,("gpgkeys: searching for \"%s\" from LDAP server %s\n"),
searchkey,host); searchkey,host);
err=ldap_search_s(ldap,basekeyspacedn, err=ldap_search_s(ldap,basekeyspacedn,
LDAP_SCOPE_SUBTREE,search,attrs,0,&res); LDAP_SCOPE_SUBTREE,search,attrs,0,&res);
if(err!=0) if(err!=0)
{ {
fprintf(console,"gpg: LDAP search error: %s\n",ldap_err2string(err)); fprintf(console,"gpgkeys: LDAP search error: %s\n",ldap_err2string(err));
return -1; return -1;
} }
@ -637,7 +637,7 @@ int main(int argc,char *argv[])
keylist=malloc(sizeof(struct keylist)); keylist=malloc(sizeof(struct keylist));
if(keylist==NULL) if(keylist==NULL)
{ {
fprintf(console,"gpg: Out of memory when building key list\n"); fprintf(console,"gpgkeys: out of memory when building key list\n");
goto fail; goto fail;
} }
@ -646,7 +646,7 @@ int main(int argc,char *argv[])
keyptr->keystr=malloc(MAX_LINE); keyptr->keystr=malloc(MAX_LINE);
if(keyptr->keystr==NULL) if(keyptr->keystr==NULL)
{ {
fprintf(console,"gpg: Out of memory when building key list\n"); fprintf(console,"gpgkeys: out of memory when building key list\n");
goto fail; goto fail;
} }
@ -669,7 +669,7 @@ int main(int argc,char *argv[])
keyptr->next=malloc(sizeof(struct keylist)); keyptr->next=malloc(sizeof(struct keylist));
if(keyptr->next==NULL) if(keyptr->next==NULL)
{ {
fprintf(console,"gpg: Out of memory when building key list\n"); fprintf(console,"gpgkeys: out of memory when building key list\n");
goto fail; goto fail;
} }
@ -679,14 +679,14 @@ int main(int argc,char *argv[])
keyptr->keystr=malloc(MAX_LINE); keyptr->keystr=malloc(MAX_LINE);
if(keyptr->keystr==NULL) if(keyptr->keystr==NULL)
{ {
fprintf(console,"gpg: Out of memory when building key list\n"); fprintf(console,"gpgkeys: out of memory when building key list\n");
goto fail; goto fail;
} }
} }
} }
else else
{ {
fprintf(console,"gpg: No keyserver command specified\n"); fprintf(console,"gpgkeys: no keyserver command specified\n");
goto fail; goto fail;
} }
@ -707,14 +707,14 @@ int main(int argc,char *argv[])
ldap=ldap_init(host,port); ldap=ldap_init(host,port);
if(ldap==NULL) if(ldap==NULL)
{ {
fprintf(console,"gpg: Internal LDAP init error: %s\n",strerror(errno)); fprintf(console,"gpgkeys: internal LDAP init error: %s\n",strerror(errno));
goto fail; goto fail;
} }
err=ldap_simple_bind_s(ldap,NULL,NULL); err=ldap_simple_bind_s(ldap,NULL,NULL);
if(err!=0) if(err!=0)
{ {
fprintf(console,"gpg: Internal LDAP bind error: %s\n", fprintf(console,"gpgkeys: internal LDAP bind error: %s\n",
ldap_err2string(err)); ldap_err2string(err));
goto fail; goto fail;
} }
@ -725,14 +725,14 @@ int main(int argc,char *argv[])
"(objectclass=*)",attrs,0,&res); "(objectclass=*)",attrs,0,&res);
if(err==-1) if(err==-1)
{ {
fprintf(console,"gpg: Error retrieving LDAP server info: %s\n", fprintf(console,"gpgkeys: error retrieving LDAP server info: %s\n",
ldap_err2string(err)); ldap_err2string(err));
goto fail; goto fail;
} }
if(ldap_count_entries(ldap,res)!=1) if(ldap_count_entries(ldap,res)!=1)
{ {
fprintf(console,"gpg: More than one serverinfo record\n"); fprintf(console,"gpgkeys: more than one serverinfo record\n");
goto fail; goto fail;
} }
@ -762,7 +762,7 @@ int main(int argc,char *argv[])
basekeyspacedn=strdup(vals[0]); basekeyspacedn=strdup(vals[0]);
if(basekeyspacedn==NULL) if(basekeyspacedn==NULL)
{ {
fprintf(console,"gpg: Can't allocate string space for LDAP base\n"); fprintf(console,"gpgkeys: can't allocate string space for LDAP base\n");
goto fail; goto fail;
} }

View File

@ -112,7 +112,7 @@ if($command=~/get/i || $command=~/search/i)
if($verbose) if($verbose)
{ {
print STDERR "Key $key requested from $host\n"; print STDERR "gpgkeys: key $key requested from $host\n";
} }
} }
} }
@ -149,7 +149,7 @@ if($command=~/send/i)
if($verbose) if($verbose)
{ {
print STDERR "Key $key sent to $host\n"; print STDERR "gpgkeys: key $key sent to $host\n";
} }
} }
} }