#------------------------------------------------------------------------------
# $File: ssl,v 1.7 2024/06/10 23:23:55 christos Exp $
# ssl:  file(1) magic for SSL file formats

# Type: OpenSSL certificates/key files
# From: Nicolas Collignon <tsointsoin@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
# Update:	Joerg Jenderek
# Reference:	https://github.com/openssl/openssl/blob/master/include/openssl/pem.h
#		http://mark0.net/download/triddefs_xml.7z/defs/k/key-rsa-pvt.trid.xml
# Note:		called "ASCII armored RSA Private Key" by TrID
0	string	-----BEGIN\040RSA\040PRIVATE	PEM RSA private key
#!:mime		text/plain
!:mime		text/x-ssl-private-key
!:ext		key/priv
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:		Joerg Jenderek
# Reference:	https://github.com/openssl/openssl/blob/master/include/openssl/pem.h
0	string	-----BEGIN\040RSA\040PUBLIC\040KEY-----	PEM RSA public key
#!:mime		text/plain
!:mime		text/x-ssl-public-key
!:ext		pub

# From Luc Gommans
# OpenSSL enc file (recognized by a magic string preceding the password's salt)
0	string	Salted__	openssl enc'd data with salted password
# Using the -a or -base64 option, OpenSSL will base64-encode the data.
0	string U2FsdGVkX1	openssl enc'd data with salted password, base64 encoded