是否可以使用 Tika 检测证书文件类型? [英] Does Certificate file types can be detected using Tika?

查看:30
本文介绍了是否可以使用 Tika 检测证书文件类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 Apache tika 检测给定文件的文件类型.不仅与文件名,而且还应该检查基于内容并返回文件类型.我使用了tika.detect(stream)"它适用于文本、图像、XML 文件.现在我想使用 Tika 检测证书文件.但是基于内容的文件类型检测不适用于证书文件(X509、.pem、.der 等)

I want to detect the file type of the given file using Apache tika. Not only with the file name, but It should also check the content-based and return the file type. I used "tika.detect(stream)" It is working fine for text, image, XML files. Now I want to detect the certificate files using Tika. But content based file type detection is not working for certificate files(X509, .pem, .der etc)

提前致谢

推荐答案

对许多主题的支持才刚刚添加到 Apache Tika!TIKA-3205 中的详细信息.

Support for many of thees has only just been added to Apache Tika! Details in TIKA-3205.

发布后,如果您升级到 Apache Tika 1.25 或 2.0,您将检测到 DER 和 PEM 编码的证书、私钥和公钥.在早期版本的 Tika 中,仅检测到 PKCS#7 系列格式.

Once released, if you upgrade to Apache Tika 1.25 or 2.0, you'll get detection for DER and PEM encoded Certificates, Private Keys and Public Keys. In earlier versions of Tika, only the PKCS#7 family of formats was detected.

在 1.25/2.0 发布之前,2020 年 9 月 30 日之后从 git 夜间构建/手动构建将有额外的检测

Until 1.25 / 2.0 are released, a nightly build / manual build from git after 2020-09-30 will have the extra detection in

如果Apache Tika缺少更多证书相关格式,最好的选择是在Tika JIRA中针对mime组件提出增强请求,并上传一些示例文件

If there are any more certificate-related formats that Apache Tika lacks, the best option is to raise an enhancement request in the Tika JIRA against the mime component, and upload a few sample files

这篇关于是否可以使用 Tika 检测证书文件类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆