proposed multiple recipients option (w/ patch)...

Matthew Whitworth matthew at okcomputer.org
Thu Jun 27 22:10:02 CEST 2002


I have noticed that a lot of gnupg users have trouble getting multiple
recipients to work with the "-r, --recipient" option.  Specifically,
users of PINE need to resort to a gpg wrapper program to iterate
through the list of recipients and prepend the "-r" before each.

Would it make sense to add a specific multiple recipients option?  I
can see the value of specifying:

$ gpg -ea -R "recipient1 recipient2..."

rather than

$ gpg -ea -r recipient1 -r recipient2 -r ...

Here is a fairly simple patch for such an option using -R and/or
--recipients that has worked for me so far:

Index: g10.c
===================================================================
RCS file: /cvs/gnupg/gnupg/g10/Attic/g10.c,v
retrieving revision 1.129.2.127
diff -r1.129.2.127 g10.c
62a63
>     oRecipients   = 'R',
365a367
>     { oRecipients, "recipients", 2, N_("|NAMES|encrypt for NAMES")},
1271a1274,1283
>             any_explicit_recipient = 1;
>           break;
>         case oRecipients: /* store space or comma separated
recipients */
>             {
>                 char *ru = strtok( pargs.r.ret_str, ", " );
>                 while ( ru != NULL ) {
>                     add_to_strlist2( &remusr, ru, utf8_strings );
>                     ru = strtok( NULL, ", " );
>                 }
>             }

Thoughts?

Matthew




More information about the Gnupg-devel mailing list