xref: /freebsd/contrib/file/magic/Magdir/ssl (revision b1879975794772ee51f0b4865753364c7d7626c3)
1
2#------------------------------------------------------------------------------
3# $File: ssl,v 1.7 2024/06/10 23:23:55 christos Exp $
4# ssl:  file(1) magic for SSL file formats
5
6# Type: OpenSSL certificates/key files
7# From: Nicolas Collignon <tsointsoin@gmail.com>
8
90	string	-----BEGIN\040CERTIFICATE-----	PEM certificate
10!:mime	application/x-pem-file
110	string	-----BEGIN\040CERTIFICATE\040REQ	PEM certificate request
12!:mime	application/x-pem-file
13# Update:	Joerg Jenderek
14# Reference:	https://github.com/openssl/openssl/blob/master/include/openssl/pem.h
15#		http://mark0.net/download/triddefs_xml.7z/defs/k/key-rsa-pvt.trid.xml
16# Note:		called "ASCII armored RSA Private Key" by TrID
170	string	-----BEGIN\040RSA\040PRIVATE	PEM RSA private key
18#!:mime		text/plain
19!:mime		text/x-ssl-private-key
20!:ext		key/priv
210	string	-----BEGIN\040RSA\040PRIVATE	PEM RSA private key
22!:mime	application/x-pem-file
230	string	-----BEGIN\040DSA\040PRIVATE	PEM DSA private key
24!:mime	application/x-pem-file
250	string	-----BEGIN\040EC\040PRIVATE	PEM EC private key
26!:mime	application/x-pem-file
270	string	-----BEGIN\040ECDSA\040PRIVATE	PEM ECDSA private key
28!:mime	application/x-pem-file
29# From:		Joerg Jenderek
30# Reference:	https://github.com/openssl/openssl/blob/master/include/openssl/pem.h
310	string	-----BEGIN\040RSA\040PUBLIC\040KEY-----	PEM RSA public key
32#!:mime		text/plain
33!:mime		text/x-ssl-public-key
34!:ext		pub
35
36# From Luc Gommans
37# OpenSSL enc file (recognized by a magic string preceding the password's salt)
380	string	Salted__	openssl enc'd data with salted password
39# Using the -a or -base64 option, OpenSSL will base64-encode the data.
400	string U2FsdGVkX1	openssl enc'd data with salted password, base64 encoded
41