certificate - 如何找出openssl可信证书的路径?

标签 certificate openssl

我怎么知道我的openssl安装在哪里寻找已安装的证书(受信任的)?
它有时是/ etc / ssl / cert,但是我在这里有一个新系统,它不能使用此路径。

谢谢!
问候,克里斯

最佳答案

针对OpenSSL编译的C代码片段将告诉您:

#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;
}

关于certificate - 如何找出openssl可信证书的路径?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4138139/

相关文章:

android - https 的自签名证书

ssl - 如何在 OpenSSL 中的 SSL 握手后获取客户端的 IP

python - "ERROR:root:code for hash md5 was not found"使用任何 hg mercurial 命令时

c - OPENSSL 和私钥

java - 正在使用哪个cacert?

ios - xcodebuild - 通过命令行设置证书

python - x5t JWT 指纹 Python 转换

带有 OpenSSL 签名证书的 PHP Websocket SSL Stunnel "bad certificate"

git - 如何让 git 告诉 curl 使用 openssl 而不是 gnutls 而无需重建包?

java - 将 CertStore 转换为 X509Certificate[ ] 数组 JAVA