[ https://issues.apache.org/jira/browse/TIKA-4454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18004683#comment-18004683 ]
Tim Allison commented on TIKA-4454: ----------------------------------- This looks like it goes all the way back: [https://github.com/apache/tika/blame/7d48d00ac1febfb1ac70e4887268b28fb4951b78/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml#L798] How do we determine the difference between a pkcs7 mime and a pkcs signature? Is it only based on the file extension, is there something in the magic or can we make that determination at parse time in the Pkcs7Parser? I see that the oid type for the example file is `data`: `1.2.840.113549.1.7.1` > Media-type application/pkcs7-mime > ---------------------------------- > > Key: TIKA-4454 > URL: https://issues.apache.org/jira/browse/TIKA-4454 > Project: Tika > Issue Type: Bug > Affects Versions: 3.2.1 > Reporter: Salvatore MORANA > Priority: Major > Attachments: test.pdf.p7m > > > Using the tika release 3.2.1, the detect method recognized EvelopedData ( > extension file .p7m) with Media-Type "application/pkcs7-mime" as > "application/pkcs7-signature". This is a bug. > Log with standalone release: > Content-Length: 18211 > Content-Type: application/pkcs7-signature > X-TIKA:Parsed-By: org.apache.tika.parser.DefaultParser > X-TIKA:Parsed-By: org.apache.tika.parser.crypto.Pkcs7Parser > X-TIKA:Parsed-By-Full-Set: org.apache.tika.parser.DefaultParser > X-TIKA:Parsed-By-Full-Set: org.apache.tika.parser.crypto.Pkcs7Parser > X-TIKA:Parsed-By-Full-Set: org.apache.tika.parser.pdf.PDFParser > X-TIKA:digest:MD5: 8e011e26c464702a3ae91da49410a624 > X-TIKA:digest:SHA256: > b8755cfd1a444c2da4b583edfb4d2edbebe7d0e802e4c8ced19a70283f5a9424 > resourceName: ExampleDoc.pdf.p7m > As writted in the rfc RFC 5751 > ( https://www.rfc-editor.org/rfc/rfc8551.html , chapters "3.2. "The > application/pkcs7-mime Media Type" and "3.2.1. The name and filename > Parameters") > the correct mediaType for EvelopedData is application/pkcs7-mime. > > I attach the file used for the tests. > Thanks -- This message was sent by Atlassian Jira (v8.20.10#820010)