View Issue Details

IDProjectCategoryView StatusLast Update
0000089fileGeneralpublic2019-07-21 09:22
Reportervitalyisaev2 Assigned Tochristos  
PrioritynormalSeverityminorReproducibilityhave not tried
Status feedbackResolutionopen 
Platformamd64OSLinuxOS VersionFedora 29
Product Version5.37 
Summary0000089: MIME Types for PKI files
DescriptionI believe that libmagic should support MIME type detection for PKI files, like ".key", ".crt" and so on:

application/pkcs8 .p8 .key
application/pkcs10 .p10 .csr
application/pkix-cert .cer
application/pkix-crl .crl
application/pkcs7-mime .p7c
application/x-x509-ca-cert .crt .der
application/x-x509-user-cert .crt
application/x-pkcs7-crl .crl
application/x-pem-file .pem
application/x-pkcs12 .p12 .pfx
application/x-pkcs7-certificates .p7b .spc
application/x-pkcs7-certreqresp .p7r

Please see full list here: https://pki-tutorial.readthedocs.io/en/latest/mime.html
Steps To ReproduceCurrently some of certificates are determined as "plain/text":

➜ file --mime-type ca.crt
ca.crt: text/plain
➜ file ca.crt
ca.crt: PEM certificate

TagsNo tags attached.

Activities

vitalyisaev2

2019-06-28 15:58

reporter  

ca.crt (1,302 bytes)

christos

2019-07-21 09:22

manager   ~0003261

Can you try writing a patch for this? I am not sure if we can cover most of the cases because we don't know enough about what the files contain (and file does not pay attention to extensions).

Issue History

Date Modified Username Field Change
2019-06-28 15:58 vitalyisaev2 New Issue
2019-06-28 15:58 vitalyisaev2 File Added: ca.crt
2019-07-21 09:21 christos Assigned To => christos
2019-07-21 09:21 christos Status new => assigned
2019-07-21 09:22 christos Status assigned => feedback
2019-07-21 09:22 christos Note Added: 0003261