[File] More mime types
Oliver Mangold
kex3 at pm.me
Wed Oct 25 10:43:27 UTC 2023
Hi,
I found file reports currently for SSL pem files and lzop archives the generic mime types text/plain and application/octet-stream for which (now?) the types application/x-pem-file and application/x-lzop exist. Here is a patch to fix that:
Best regards,
Oliver
---
diff -r -u magic/Magdir.orig/compress magic/Magdir/compress
--- magic/Magdir.orig/compress 2023-06-19 15:43:13.000000000 +0200
+++ magic/Magdir/compress 2023-10-25 12:11:27.201286548 +0200
@@ -203,6 +203,7 @@
# lzop from <markus.oberhumer at jk.uni-linz.ac.at>
0 string \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data
!:ext lzo
+!:mime application/x-lzop
>9 beshort <0x0940
>>9 byte&0xf0 =0x00 - version 0.
>>9 beshort&0x0fff x \b%03x,
diff -r -u magic/Magdir.orig/ssh magic/Magdir/ssh
--- magic/Magdir.orig/ssh 2023-06-19 15:43:13.000000000 +0200
+++ magic/Magdir/ssh 2023-10-25 11:58:50.854905832 +0200
@@ -4,6 +4,7 @@
0 string SSH\040PRIVATE\040KEY OpenSSH RSA1 private key,
>28 string >\0 version %s
0 string -----BEGIN\040OPENSSH\040PRIVATE\040KEY----- OpenSSH private key
+!:mime application/x-pem-file
# https://www.rfc-editor.org/rfc/rfc5958
0 string -----BEGIN\040PRIVATE\040KEY----- OpenSSH private key (no password)
0 string -----BEGIN\040ENCRYPTED\040PRIVATE\040KEY----- OpenSSH private key (with password)
diff -r -u magic/Magdir.orig/ssl magic/Magdir/ssl
--- magic/Magdir.orig/ssl 2021-02-23 01:49:24.000000000 +0100
+++ magic/Magdir/ssl 2023-10-25 11:57:56.850404765 +0200
@@ -7,11 +7,17 @@
# From: Nicolas Collignon <tsointsoin at gmail.com>
0 string -----BEGIN\040CERTIFICATE----- PEM certificate
+!:mime application/x-pem-file
0 string -----BEGIN\040CERTIFICATE\040REQ PEM certificate request
+!:mime application/x-pem-file
0 string -----BEGIN\040RSA\040PRIVATE PEM RSA private key
+!:mime application/x-pem-file
0 string -----BEGIN\040DSA\040PRIVATE PEM DSA private key
+!:mime application/x-pem-file
0 string -----BEGIN\040EC\040PRIVATE PEM EC private key
+!:mime application/x-pem-file
0 string -----BEGIN\040ECDSA\040PRIVATE PEM ECDSA private key
+!:mime application/x-pem-file
# From Luc Gommans
# OpenSSL enc file (recognized by a magic string preceding the password's salt)
---
More information about the File
mailing list