diff --git a/keyserver/ChangeLog b/keyserver/ChangeLog index 6cf84e78d..50166ea4b 100644 --- a/keyserver/ChangeLog +++ b/keyserver/ChangeLog @@ -1,3 +1,8 @@ +2002-10-24 David Shaw + + * gpgkeys_hkp.c (main), gpgkeys_ldap.c (main): Add -V flag to + output protocol and program version. + 2002-10-08 David Shaw * gpgkeys_ldap.c (search_key, main): Make sure LDAP values are diff --git a/keyserver/gpgkeys_hkp.c b/keyserver/gpgkeys_hkp.c index 3194d1cc8..8dee66ff4 100644 --- a/keyserver/gpgkeys_hkp.c +++ b/keyserver/gpgkeys_hkp.c @@ -654,15 +654,20 @@ int main(int argc,char *argv[]) fprintf(console, "gpgkeys: WARNING: this is an *experimental* HKP interface!\n"); - while((arg=getopt(argc,argv,"ho:"))!=-1) + while((arg=getopt(argc,argv,"hVo:"))!=-1) switch(arg) { default: case 'h': fprintf(console,"-h\thelp\n"); + fprintf(console,"-V\tversion\n"); fprintf(console,"-o\toutput to this file\n"); return KEYSERVER_OK; + case 'V': + fprintf(stdout,"0\n%s\n",VERSION); + return KEYSERVER_OK; + case 'o': output=fopen(optarg,"w"); if(output==NULL) diff --git a/keyserver/gpgkeys_ldap.c b/keyserver/gpgkeys_ldap.c index 654c7a2c3..1920da7b5 100644 --- a/keyserver/gpgkeys_ldap.c +++ b/keyserver/gpgkeys_ldap.c @@ -622,15 +622,20 @@ int main(int argc,char *argv[]) console=stderr; - while((arg=getopt(argc,argv,"ho:"))!=-1) + while((arg=getopt(argc,argv,"hVo:"))!=-1) switch(arg) { default: case 'h': fprintf(console,"-h\thelp\n"); + fprintf(console,"-V\tversion\n"); fprintf(console,"-o\toutput to this file\n"); return KEYSERVER_OK; + case 'V': + fprintf(stdout,"0\n%s\n",VERSION); + return KEYSERVER_OK; + case 'o': output=fopen(optarg,"w"); if(output==NULL)