1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-02-01 16:33:02 +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>
* 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):
disable pgp2 mode after the message is no longer pgp2 compatible.

View File

@ -1107,7 +1107,7 @@ main( int argc, char **argv )
break;
case oKeyServer:
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;
case oKeyServerOptions:
parse_keyserver_options(pargs.r.ret_str);
@ -1133,7 +1133,7 @@ main( int argc, char **argv )
case oHonorHttpProxy:
opt.honor_http_proxy = 1;
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;
case oFastListMode: opt.fast_list_mode = 1; break;
case oFixedListMode: opt.fixed_list_mode = 1; break;
@ -2144,9 +2144,15 @@ check_policy_url( const char *s )
void
idea_cipher_warn(void)
{
log_info("the IDEA cipher plugin is not present\n");
log_info("please see http://www.gnupg.org/why-not-idea.html "
"for more information\n");
static int warned=0;
if(!warned)
{
log_info("the IDEA cipher plugin is not present\n");
log_info("please see http://www.gnupg.org/why-not-idea.html "
"for more information\n");
warned=1;
}
}
const char *

View File

@ -300,6 +300,9 @@ passphrase_to_dek( u32 *keyid, int pubkey_algo,
return NULL;
}
/* Stub: no decrypting, so no IDEA needed */
void
idea_cipher_warn(void) {}
/* Stubs to void linking to ../cipher/cipher.c */
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] );
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 );
if( rc ) {
@ -129,7 +129,7 @@ hkp_export( STRLIST users )
atoi(opt.keyserver_port)>0?opt.keyserver_port:"");
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 );
if( rc ) {
@ -232,7 +232,7 @@ parse_hkp_index(IOBUF buffer,char *line)
if(!(revoked && !opt.keyserver_options.include_revoked))
{
char intstr[20];
char intstr[11];
iobuf_writestr(buffer,key);
iobuf_writestr(buffer,":");
@ -454,7 +454,7 @@ int hkp_search(STRLIST tokens)
searchurl);
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);
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(opt.keyserver_options.verbose>2)
log_error(_("Unable to execute %s: %s\n"),
log_error(_("unable to execute %s: %s\n"),
filename,strerror(errno));
if(errno==ENOENT)
@ -515,13 +515,13 @@ keyserver_spawn(int action,STRLIST list,u32 (*kidlist)[2],int count)
if(ret==127)
{
log_error(_("Unable to exec keyserver program\n"));
log_error(_("unable to exec keyserver program\n"));
goto fail;
}
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));
goto fail;
}
@ -529,7 +529,7 @@ keyserver_spawn(int action,STRLIST list,u32 (*kidlist)[2],int count)
fromchild=iobuf_open(tempfile_out);
if(fromchild==NULL)
{
log_error(_("Unable to read keyserver response: %s\n"),
log_error(_("unable to read keyserver response: %s\n"),
strerror(errno));
goto fail;
}
@ -551,7 +551,7 @@ keyserver_spawn(int action,STRLIST list,u32 (*kidlist)[2],int count)
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]));
goto fail;
}
@ -569,7 +569,7 @@ keyserver_spawn(int action,STRLIST list,u32 (*kidlist)[2],int count)
if(!gotversion)
{
log_error(_("Keyserver communications error\n"));
log_error(_("keyserver communications error\n"));
goto fail;
}
@ -730,13 +730,13 @@ keyserver_work(int action,STRLIST list,u32 (*kidlist)[2],int count)
switch(rc)
{
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);
break;
case KEYSERVER_INTERNAL_ERROR:
default:
log_error(_("Keyserver internal error\n"));
log_error(_("keyserver internal error\n"));
break;
}
@ -783,7 +783,7 @@ keyserver_import(STRLIST users)
}
else
{
log_error (_("Skipping invalid key ID \"%s\"\n"), users->d );
log_error (_("skipping invalid key ID \"%s\"\n"), users->d );
continue;
}
}
@ -903,13 +903,10 @@ keyserver_refresh(STRLIST users)
if(rc)
return rc;
/* fixme: this is is a problem: for Example in German you have 1
Schlüssel, 2 Schlüssel but 1 Auto, 2 Autos. There is no
regularity in German (afaik); other languages have even more
complicates ways. The latest gettext versions have some code to
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==1)
log_info(_("%d key to refresh\n"),count);
else
log_info(_("%d keys to refresh\n"),count);
if(count>0)
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(searchstr)
log_info(_("Key \"%s\" not found on keyserver\n"),searchstr);
log_info(_("key \"%s\" not found on keyserver\n"),searchstr);
else
log_info(_("Key not found on keyserver\n"));
log_info(_("key not found on keyserver\n"));
return;
}

View File

@ -431,7 +431,8 @@ proc_encrypted( CTX c, PACKET *pkt )
else if ( check_cipher_algo(CIPHER_ALGO_IDEA) ) {
algo = opt.def_cipher_algo;
if (!algo)
algo = opt.s2k_cipher_algo;;
algo = opt.s2k_cipher_algo;
idea_cipher_warn();
log_info (_("IDEA cipher unavailable, "
"optimistically attempting to use %s instead\n"),
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>
* 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);
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;
}
@ -81,7 +81,7 @@ int send_key(LDAP *ldap,char *keyid)
key[0]=malloc(1);
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;
}
@ -119,7 +119,7 @@ int send_key(LDAP *ldap,char *keyid)
key[0]=realloc(key[0],keysize);
if(key[0]==NULL)
{
fprintf(console,"gpg: Unable to reallocate for key\n");
fprintf(console,"gpgkeys: unable to reallocate for key\n");
goto fail;
}
@ -128,14 +128,14 @@ int send_key(LDAP *ldap,char *keyid)
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;
}
err=ldap_add_s(ldap,dn,attrs);
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));
goto fail;
}
@ -175,20 +175,20 @@ int get_key(LDAP *ldap,char *getkey)
fprintf(output,"KEY 0x%s BEGIN\n",getkey);
if(verbose>2)
fprintf(console,"LDAP fetch for: %s\n",search);
fprintf(console,"gpgkeys: LDAP fetch for: %s\n",search);
if(!verbose)
attrs[1]=NULL;
fprintf(console,
"gpg: requesting key %s from LDAP keyserver %s\n",
"gpgkeys: requesting key %s from LDAP keyserver %s\n",
getkey,host);
err=ldap_search_s(ldap,basekeyspacedn,
LDAP_SCOPE_SUBTREE,search,attrs,0,&res);
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);
return -1;
}
@ -196,7 +196,7 @@ int get_key(LDAP *ldap,char *getkey)
count=ldap_count_entries(ldap,res);
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);
return -1;
}
@ -284,7 +284,7 @@ int get_key(LDAP *ldap,char *getkey)
if(vals==NULL)
{
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);
}
else
@ -358,16 +358,16 @@ int search_key(LDAP *ldap,char *searchkey)
!(include_disabled&&include_revoked)?")":"");
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);
err=ldap_search_s(ldap,basekeyspacedn,
LDAP_SCOPE_SUBTREE,search,attrs,0,&res);
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;
}
@ -637,7 +637,7 @@ int main(int argc,char *argv[])
keylist=malloc(sizeof(struct keylist));
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;
}
@ -646,7 +646,7 @@ int main(int argc,char *argv[])
keyptr->keystr=malloc(MAX_LINE);
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;
}
@ -669,7 +669,7 @@ int main(int argc,char *argv[])
keyptr->next=malloc(sizeof(struct keylist));
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;
}
@ -679,14 +679,14 @@ int main(int argc,char *argv[])
keyptr->keystr=malloc(MAX_LINE);
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;
}
}
}
else
{
fprintf(console,"gpg: No keyserver command specified\n");
fprintf(console,"gpgkeys: no keyserver command specified\n");
goto fail;
}
@ -707,14 +707,14 @@ int main(int argc,char *argv[])
ldap=ldap_init(host,port);
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;
}
err=ldap_simple_bind_s(ldap,NULL,NULL);
if(err!=0)
{
fprintf(console,"gpg: Internal LDAP bind error: %s\n",
fprintf(console,"gpgkeys: internal LDAP bind error: %s\n",
ldap_err2string(err));
goto fail;
}
@ -725,14 +725,14 @@ int main(int argc,char *argv[])
"(objectclass=*)",attrs,0,&res);
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));
goto fail;
}
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;
}
@ -762,7 +762,7 @@ int main(int argc,char *argv[])
basekeyspacedn=strdup(vals[0]);
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;
}

View File

@ -112,7 +112,7 @@ if($command=~/get/i || $command=~/search/i)
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)
{
print STDERR "Key $key sent to $host\n";
print STDERR "gpgkeys: key $key sent to $host\n";
}
}
}