Calculate the hash of .pem certificate files for Sendmail

Hello, I'll ask separately here.
I have several root certificate files in .pem format.How can I calculate the hash of these files to get a list of symlinks to these files, adding them to the directory specified in the variable?

define(`confCACERT_PATH', `/usr/local/etc/ssl/ROOT')dnl

/usr/local/etc/ssl/ROOT (exapmle)
b74d2bd5.0 -> emSign_ECC_Root_CA_-_G3.pem
869fbf79.0 -> emSign_ECC_Root_CA_-_C3.pem
 
duck duck go of "using openssl to generate a hash of a file" generates lots of links, pretty much all talk about "openssl dgst" Make sure you use your desired hash algorithm like sha256 or others. You'll need to figure out the output of the command so you can create the symlinks.
 
Yes, yes!
I initially use port the p11-kit port tools to generate the basic list mentioned above for Sendmail from ca-root-nss.crt (port ca_root_nss). This is done with the command:

p11-kit extract --format=openssl-directory --filter=ca-anchors --overwrite /usr/local/etc/ssl/ROOT/

And everything works fine with this basic list. I'd like to add a few additional certificates to it, having first generated hashes with a symlink.Unfortunately, I don't know exactly which hashing algorithm p11-kit uses when splitting the ca-root-nss.crt file.
 
I found p11-kit, a library for working with PKCS #11 modules that uses the C and C++ programming languages.But I could be wrong.
 
Back
Top