我正在遵循有关如何导入a certificate with its whole chain into a keystore的说明。我面临的问题是我的系统上没有c_rehash:
user@hostanme$ c_rehash ./certs
-bash: c_rehash: command not found我已经找到了-subject_hash option of openssl x509,但我不确定如何使用它来复制c_rehash所做的任何事情。
如何在没有c_rehash命令/脚本的情况下对证书目录进行散列?
发布于 2015-01-05 14:26:47
c_rehash需要"perl“才能执行。如果您不能运行c_rehase,请在下面尝试。
在Shell文件中使用“openssl
for file in *.pem; do ln -s "$file" "$(openssl x509 -hash -noout -in "$file")".0; done发布于 2018-05-24 10:13:57
openssl-perl包中提供了c_rehash命令
来源:在RHEL7上验证的https://bugzilla.redhat.com/show_bug.cgi?id=461123
发布于 2014-09-25 13:35:34
证书user@hostanme$ c_rehash ./
-bash: c_rehash:找不到命令
您要么需要安装OpenSSL (可能是开发人员版本),要么需要将其bin/目录放在path下:
$ find /usr -iname c_rehash
/usr/bin/c_rehash
/usr/local/ssl/darwin/bin/c_rehash
/usr/local/ssl/macosx-x64/bin/c_rehash
/usr/local/ssl/macosx-x86/bin/c_rehash确保你使用的是正确的。如果我没记错的话,OpenSSL 0.9.8使用MD5,而OpenSSL 1.0.0及更高版本使用SHA1。
https://stackoverflow.com/questions/25889341
复制相似问题