signify
signify copied to clipboard
Different ContentType
When I verify a certificate of PE file. Some thing is wrong.
The Error is:
Unexpected content type for SignerInfo, expected 1.2.840.113549.1.9.16.1.4, got Data
The refer code in signerinfo.py:90 :
if self._expected_content_type is not None and self.content_type is not self._expected_content_type:
raise SignerInfoParseError("Unexpected content type for SignerInfo, expected %s, got %s" %
(_print_type(self.content_type),
_print_type(self._expected_content_type)))
The position of self.content_type
and self._expected_content_type
is mistaken, but that is not key point.
The key point is content type for SignerInfo
maybe have different value.
You can see here: http://oidref.com/1.2.840.113549.1.9.16.1.4, the Information by oid_info
is:
This is one of the possible values for the contentType value in the ContentInfo structure defined in PKCS#7 (IETF RFC 2630). See also IETF RFC 3161.
Maybe you can add another content type
.
Oh, here is the PE file 3a7de393a36ca8911cd0842a9a25b058.zip
This is implemented as per http://msdn.microsoft.com/en-us/library/windows/hardware/gg463180.aspx, though it seems that this is not exactly enforced. While I'd need to look into this, it doesn't seem to harm to change this to a more relaxed policy.