如何找出openssl可信证书的路径? [英] how to find out the path for openssl trusted certificate?
本文介绍了如何找出openssl可信证书的路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何找到,我的openssl安装在哪里寻找已安装的证书(受信任)?
它有时是/ etc / ssl / cert,但我有一个新的系统,它不工作在这条路径。
how can I find out, where my openssl installed is looking for installed certificates (trusted)? it is sometimes /etc/ssl/cert but I have here a new system and it is not working with this path.
thx!
regards,chris
thx! regards,chris
推荐答案
这个C snippet根据OpenSSL编译,会告诉你:
This C snippet, compiled against OpenSSL, will tell you:
#include <stdlib.h>
#include <stdio.h>
#include <openssl/x509.h>
int main()
{
const char *dir;
dir = getenv(X509_get_default_cert_dir_env());
if (!dir)
dir = X509_get_default_cert_dir();
puts(dir);
return 0;
}
这篇关于如何找出openssl可信证书的路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文