In the current code, the merge between protected and unprotected headers raise an exception if the header is the required one (33). This problem is caused by the fact that the library pycose apply a _value_parserif it identify an header that can be parsed. This is the case of the unprotected x5chain header when it is a list of certificate. Pycose parse it and populate the unprotected headers map with a key that is the Pycose X5Chain type and the value that is the list of certificate.
The current code still search for key value where key has identifier 33. This is incorrect.
|
_mixed_heads = self.object.phdr.items() | self.object.uhdr.items() |