pycose doesn't allow to modify the unprotected header of an already signed message. Being able to do so is useful for countersigning, since the countersignature is computed based on the original signature and then embedded as new parameter in the unprotected header. Decoding an existing message followed by msg.encode(sign=False) strips the original signature instead of retaining it.
pycose doesn't allow to modify the unprotected header of an already signed message. Being able to do so is useful for countersigning, since the countersignature is computed based on the original signature and then embedded as new parameter in the unprotected header. Decoding an existing message followed by
msg.encode(sign=False)
strips the original signature instead of retaining it.