Fwd: card_status - change-request to update allways

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Fwd: card_status - change-request to update allways

Myonium
Hi Werner

Any chance to get this change pushed into the next build?
----------------------snip-------------------------
diff --git a/g10/card-util.c b/g10/card-util.c
index 78cd52b..950b76f 100644
--- a/g10/card-util.c
+++ b/g10/card-util.c
@@ -376,7 +376,7 @@ current_card_status (ctrl_t ctrl, estream_t fp,
   if (serialno && serialnobuflen)
     *serialno = 0;
 
-  rc = agent_scd_learn (&info, 0);
+  rc = agent_scd_learn (&info, 1);
   if (rc)
     {
       if (opt.with_colons)
----------------------snip————————————

Best,
Ben

Begin forwarded message:

From: Myonium <[hidden email]>
Subject: card_status - change-request to update allways
Date: May 14, 2017 at 11:29:32 GMT+2

Hi all

I would love to change the „card_status“ behavior to always update the "key stubs“. (It's only a 1 character change ;-)

Is there anything which would speak against making the following change:

diff --git a/g10/card-util.c b/g10/card-util.c
index 78cd52b..950b76f 100644
--- a/g10/card-util.c
+++ b/g10/card-util.c
@@ -376,7 +376,7 @@ current_card_status (ctrl_t ctrl, estream_t fp,
 if (serialno && serialnobuflen)
   *serialno = 0;

-  rc = agent_scd_learn (&info, 0);
+  rc = agent_scd_learn (&info, 1);

With „force=true“ agent_scd_learn will always update the „key stub“. I.e. if a new card is attached containing the „private key“ of an already known keygrip it will update the stub so that the newly attached token can be used for crypto-operations.
I cannot think of any scenario where somebody does not want such a behavior or where this could brake anything. In case the user would shuffle back the old token the system would be reverted back to the old key stub.

Please advise. Many thanks,
Ben


_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: card_status - change-request to update allways

NIIBE Yutaka
Myonium <[hidden email]> wrote:

> Any chance to get this change pushed into the next build?
> ----------------------snip-------------------------
> diff --git a/g10/card-util.c b/g10/card-util.c
> index 78cd52b..950b76f 100644
> --- a/g10/card-util.c
> +++ b/g10/card-util.c
> @@ -376,7 +376,7 @@ current_card_status (ctrl_t ctrl, estream_t fp,
>    if (serialno && serialnobuflen)
>      *serialno = 0;
>  
> -  rc = agent_scd_learn (&info, 0);
> +  rc = agent_scd_learn (&info, 1);
>    if (rc)
>      {
>        if (opt.with_colons)
> ----------------------snip————————————

FYI, we have a ticket:

        https://dev.gnupg.org/T2898

under this parent ticket:

        https://dev.gnupg.org/T2291
--

_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: card_status - change-request to update allways

Myonium
Thank you very much for notifying.
Yes that’s exactly what I’m trying to addressing.
Do you think this patch addresses the problem appropriate?
Is there anything I could help/contribute to get this implemented?

Thanks,
Ben  

 

> On Jun 5, 2017, at 09:46, NIIBE Yutaka <[hidden email]> wrote:
>
> Myonium <[hidden email]> wrote:
>> Any chance to get this change pushed into the next build?
>> ----------------------snip-------------------------
>> diff --git a/g10/card-util.c b/g10/card-util.c
>> index 78cd52b..950b76f 100644
>> --- a/g10/card-util.c
>> +++ b/g10/card-util.c
>> @@ -376,7 +376,7 @@ current_card_status (ctrl_t ctrl, estream_t fp,
>>   if (serialno && serialnobuflen)
>>     *serialno = 0;
>>
>> -  rc = agent_scd_learn (&info, 0);
>> +  rc = agent_scd_learn (&info, 1);
>>   if (rc)
>>     {
>>       if (opt.with_colons)
>> ----------------------snip————————————
>
> FYI, we have a ticket:
>
> https://dev.gnupg.org/T2898
>
> under this parent ticket:
>
> https://dev.gnupg.org/T2291
> --


_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Loading...