- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
注意。我看过并读过Boost::asio::ssl OpenSSL not compiling
我在 linux fedora 64 上构建 boost 示例 ssl 服务器时遇到了一些问题,我认为它的版本是 15 或 16。这是一台大学机器,所以我们没有 root 访问权限,因为周末我通过 SSH 访问一台机器.我们没有 root,也没有安装 openssl。我在没有程序的情况下构建了 boost 库,并且示例服务器构建良好。然后我尝试从源代码构建最新的 openssl
库。我提取到 ~/Dev/opensslSource
Cd ~/Dev/opensslSource
./config --prefix=~/Dev/openssl --openssldir=~/Dev/openssl
Make
Make install
现在问题要么存在于那里,要么存在于我的包含和链接方式中。因此,在我的 bootexamples 文件夹中,我确实保存了示例 sslserver.cpp并使用以下内容进行构建。
g++ -I ~/Dev/boost_1_52_0/ -I ~/Dev/openssl/include -L ~/Dev/boost_1_52_0/stage/lib -L ~/Dev/openssl server.cpp -o server -lboost_system -lssl –lpthread
错误几乎无穷无尽。我什至都看不到他们。但我相信它们都只是未加密的引用。
d1_enc.c:(.text+0x10c): undefined reference to `EVP_MD_size'
d1_enc.c:(.text+0x12f): undefined reference to `EVP_CIPHER_CTX_cipher'
d1_enc.c:(.text+0x155): undefined reference to `EVP_CIPHER_block_size'
d1_enc.c:(.text+0x1b2): undefined reference to `EVP_Cipher'
d1_enc.c:(.text+0x2cf): undefined reference to `EVP_Cipher'
d1_enc.c:(.text+0x34b): undefined reference to `EVP_CIPHER_block_size'
d1_enc.c:(.text+0x363): undefined reference to `EVP_CIPHER_block_size'
d1_enc.c:(.text+0x375): undefined reference to `RAND_bytes'
所以在前几条评论之后,我将构建更改为。
g++ -I ~/Dev/boost_1_52_0/ -I ~/Dev/openssl/include -L ~/Dev/boost_1_52_0/stage/lib –L ~/Dev/openssl/lib server.cpp -o server -lboost_system -lssl -lcrypto -lpthread
现在出错。
/home/andrew/Dev/openssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
dso_dlfcn.c:(.text+0x1d): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x33): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x3d): undefined reference to `dlclose'
/home/andrew/Dev/openssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
dso_dlfcn.c:(.text+0x381): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x460): undefined reference to `dlerror'
/home/andrew/Dev/openssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':
dso_dlfcn.c:(.text+0x4e1): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x5c0): undefined reference to `dlerror'
/home/andrew/Dev/openssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
dso_dlfcn.c:(.text+0x637): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x6ae): undefined reference to `dlclose'
dso_dlfcn.c:(.text+0x6e5): undefined reference to `dlerror'
/home/andrew/Dev/openssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr':
dso_dlfcn.c:(.text+0x781): undefined reference to `dladdr'
dso_dlfcn.c:(.text+0x7e9): undefined reference to `dlerror'
/home/andrew/Dev/openssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload':
dso_dlfcn.c:(.text+0x84a): undefined reference to `dlclose'
collect2: ld returned 1 exit status
最佳答案
您的链接选项中缺少一些库:libssl 依赖于 libcrypto,而 libcrypto 又依赖于 libdl。总而言之,您将需要
-lboost_system -lssl -lcrypto -ldl -lpthread
。
关于c++ - 构建用于编译 boost 的 Openssl 源代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14674360/
如果我使用open ssl命令 sudo openssl genrsa -out privkey.pem 2048 要生成rsa key ,它仅生成1个文件。这是私钥。我如何获得公钥。 最佳答案 回答
三个不同版本的 openssl 正在同时更新 openssl.org : 0.98, 1.0.0, 1.0.1?它们之间有什么区别,我该如何选择要使用的版本? 最佳答案 https://en.wiki
我有以下命令用于 OpenSSL 生成私钥和公钥: openssl genrsa –aes-128-cbc –out priv.pem –passout pass:[privateKeyPass] 2
我正在尝试使用对应的 gcc (arm-none-eabi-5_4-2016q2) 为 cortex m3 机器交叉编译 openssl。机器应该有能力做 TCP 请求,我们希望在一天结束时做 HTT
我正在尝试使用 openssl dsa 实现,但我对以下细节感到非常困惑: 命令 openssl dsa .... 的选项“-text”:输出中的十六进制数字,我是否正确地假设这些是字节,因此它们是按
我正在尝试制作一个假 CA 并用它签署一个证书以与 stunnel 一起使用(这似乎只是调用 OpenSSL 例程,因此您可能不需要了解该程序来提供帮助:)。然而,stunnel 一直拒绝我的证书,说
不幸的是,Perl 在尝试安装 OpenSSL 的手册页(例如 OpenSSL_1_0_1g)时不知何故遇到了错误。因为我不需要它们 - 我只想使用 OpenSSL 作为 C 库,我想我可以通过完全跳
OpenSSL 中的 BIO 对到底是什么?它的用途是什么?我已经检查过 OpenSSL 文档,但任何细节都很少。 最佳答案 OpenSSL 中的 BIO 类似于文件句柄。您可以使用一对它们来安全地相
openssl ca 和 openssl x509 命令有什么区别?我正在使用它来创建和签署我的 root-ca、intermed-ca 和客户端证书,但是 openssl ca 命令不会在证书上注册
如何(如果有的话)为 OpenSSL 定义一个单一的可信证书文件在 Windows(Win-7,OpenSSL 1.0.1c)上使用 SSL_CERT_FILE 环境变量? 各种研究促使我下载了 Mo
我有一个自签名证书,其中显示了列出的基本约束,但从中生成的签名请求不显示这些属性,例如 [v3_req]。我怎样才能让它可见?我正在使用 openssl 生成证书。 场景: 我使用以下方法创建自签名证
这个问题在这里已经有了答案: Check if a connection is TLSv1 vs SSLv3 (SSL_CIPHER_description/SSL_CIPHER_get_name)
是否有更简单的方法来确定在构建 openssl 期间指定的选项,例如当时是否定义了 OPENSSL_NO_SRTP? 我只能从以下方面获得有限的信息: openssl 版本 -a 命令。但是,如果我只
我们正在与 AWS Nitro 合作,仅提供 3 小时的证书。 我们正在寻找一种可以跳过验证中的过期部分并仍然确认证书链有效的方法。 最佳答案 根据 openssl-verify 文档
嗨,我如何在 Easyphp 中启用 openssl,因为我收到错误消息无法发送。Mailer 错误:缺少扩展:opensslTime:使用 phpmailer 时。谢谢 最佳答案 在您的 php.i
我正在尝试以编程方式读取 OpenSSL 警报消息,但无法找到执行此操作的方法。 OpenSSL API 提供如下功能: const char *SSL_alert_type_string(int v
我跑了openssl speed在我的 Ubuntu 计算机上。一些结果: Doing md4 for 3s on 16 size blocks: 9063888 md4's in 3.00s Doi
我编译了带有cryptodev支持(即硬件加速)的OpenSSL,但不幸的是默认引擎仍然是软件。 time openssl speed -evp aes-128-cbc -engine cryptod
我需要从 RedHat Linux 服务器连接到 Microsoft Dynamics CRM 服务器。地址是xxx.api.crm4.dynamics.com。服务器接受 TLSv1 但不接受 1.
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 上个月关闭。 Improve thi
我是一名优秀的程序员,十分优秀!