You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @dajiaji , I've encountered an unwilling side-effect on Recipient.new() that it may update the user defined variable protected.
This is because the to_cose_header (here) returns its reference, and this line alters the dereferenced object.
You can check it with id(protected) on this code below and cwt/utils.py:L161 , they must have the same id.
Hi @dajiaji , I've encountered an unwilling side-effect on Recipient.new() that it may update the user defined variable
protected
.This is because the
to_cose_header
(here) returns its reference, and this line alters the dereferenced object.You can check it with
id(protected)
on this code below andcwt/utils.py:L161
, they must have the same id.Is this a bug or an intentional behavior?
Test code
Result
Workaround
Cut off the reference from KDF Context, but it may not appropriate if there are other header parameters in protected.
The text was updated successfully, but these errors were encountered: