Tag: ca

具有ECDHE密钥和证书的服务器无法正常工作

我使用下面的server.c源码,我生成了 有罪的宿主cert.pem 罪孽深重,host.key 如下所述: 椭圆曲线CA指南 运行程序时会出现以下错误: 140722397161136:错误:10071065:椭圆曲线例程:func(113):reason(101):ec_lib.c:995:140722397161136:错误:0B080075:x509证书例程:func(128):reason(117):x509_cmp.c: 346: 我编译使用: gcc server.c -ldl -lcrypto -lssl -o Server 我认为错误发生在这一行 if (SSL_CTX_use_PrivateKey_file(ctx, KeyFile, SSL_FILETYPE_PEM) <= 0) server.c #include #include #include #include #include #include #include #include #include #include “openssl/ssl.h” #include “openssl/err.h” #define FAIL -1 int OpenListener(int port) { int sd; struct sockaddr_in addr; sd = socket(PF_INET, SOCK_STREAM, 0); bzero(&addr, […]