Tente isto:
# openssl x509 -in cert.pem -noout -hash
c59f9aac
Isso lhe dará o hash que o OpenSSL espera obter para um diretório de certificados.
de acordo com a manpage do stunnel4
the certificates in this directory should be named XXXXXXXX.0 where XXXXXXXX is the hash value of the DER encoded subject of the cert (the first 4 bytes of the MD5 hash in least significant byte order).
Como posso produzir uma coisa dessas?
Eu tentei, sem sucesso: s:
openssl x509 -in cert.crt -inform PEM -out cert.der -outform DER
então
openssl dgst cert.der
c_rehash
, openssl rehash
Veja man c_rehash
ou openssl rehash
:
On some platforms, the
openssl rehash
command is available as an external script calledc_rehash
. They are functionally equivalent, except for minor differences noted [in the manpages].