c - 使用自定义 openssl 二进制文件构建 OpenVPN(无源)

标签 c build openssl openvpn

我看过有关使用自定义 OpenSSL 版本编译 OpenVPN 的帖子。我尝试了它们,它们与最新版本的 OpenVPN-2.3.11 和 OpenSSL 1.0.2h 完美配合。然而,在所有这些情况下,OpenSSL 的源代码都是可用的。

我的问题是,如果我没有任何 OpenSSL 源并且只有一些自定义 OpenSSL 的预编译二进制文件怎么办。我怎样才能用这样的二进制文件编译 OpenVPN。抱歉,如果这个问题已被多次回答 - 我只是找不到我的问题的任何答案。

最佳答案

My question is what if I don't have any sources of OpenSSL and only precompiled binaries of some customized OpenSSL. How can I compile OpenVPN with such binaries.

您不能针对 [私有(private)] OpenSSL 构建 OpenVPN,因为您需要 OpenSSL 头文件。

可能能够使用strings 确定[私有(private)] OpenSSL 库的版本,然后从OpenSSL download page 上的OpenSSL 包中获取 header 。 (如果需要,请务必访问 /source/old)。下面是从源构建并在本地安装的 OpenSSL 1.0.2 的示例。

如果您尝试复制缺少的头文件,请务必运行 ./config 以生成 openssl/opensslconf.hopenssl/bn。 h.

尝试复制丢失的 header 有点冒险,您真的想要 openssl/opensslconf.hopenssl/bn.h 来自 [私有(private)] OpenSSL 库。


$ strings /usr/local/ssl/lib/libcrypto.so | grep OpenSSL
OpenSSLDie
ECDSA_OpenSSL
ECDH_OpenSSL
OpenSSL_add_all_ciphers
OpenSSL_add_all_digests
UI_OpenSSL
%s(%d): OpenSSL internal error, assertion failed: %s
OpenSSL 1.0.2h  3 May 2016
MD4 part of OpenSSL 1.0.2h  3 May 2016
MD5 part of OpenSSL 1.0.2h  3 May 2016
SHA part of OpenSSL 1.0.2h  3 May 2016
SHA1 part of OpenSSL 1.0.2h  3 May 2016
SHA-256 part of OpenSSL 1.0.2h  3 May 2016
SHA-512 part of OpenSSL 1.0.2h  3 May 2016
OpenSSL HMAC method
RIPE-MD160 part of OpenSSL 1.0.2h  3 May 2016
DES part of OpenSSL 1.0.2h  3 May 2016
libdes part of OpenSSL 1.0.2h  3 May 2016
AES part of OpenSSL 1.0.2h  3 May 2016
RC2 part of OpenSSL 1.0.2h  3 May 2016
IDEA part of OpenSSL 1.0.2h  3 May 2016
Blowfish part of OpenSSL 1.0.2h  3 May 2016
CAST part of OpenSSL 1.0.2h  3 May 2016
CAMELLIA part of OpenSSL 1.0.2h  3 May 2016
Big Number part of OpenSSL 1.0.2h  3 May 2016
EC part of OpenSSL 1.0.2h  3 May 2016
OpenSSL EC algorithm
RSA part of OpenSSL 1.0.2h  3 May 2016
OpenSSL RSA method
DSA part of OpenSSL 1.0.2h  3 May 2016
OpenSSL DSA method
ECDSA part of OpenSSL 1.0.2h  3 May 2016
OpenSSL ECDSA method
OpenSSL DH Method
Diffie-Hellman part of OpenSSL 1.0.2h  3 May 2016
OpenSSL X9.42 DH method
OpenSSL PKCS#3 DH method
ECDH part of OpenSSL 1.0.2h  3 May 2016
OpenSSL ECDH method
OpenSSL 'dlfcn' shared library method
Stack part of OpenSSL 1.0.2h  3 May 2016
lhash part of OpenSSL 1.0.2h  3 May 2016
You need to read the OpenSSL FAQ, http://www.openssl.org/support/faq.html
RAND part of OpenSSL 1.0.2h  3 May 2016
EVP part of OpenSSL 1.0.2h  3 May 2016
ASN.1 part of OpenSSL 1.0.2h  3 May 2016
PEM part of OpenSSL 1.0.2h  3 May 2016
X.509 part of OpenSSL 1.0.2h  3 May 2016
CONF part of OpenSSL 1.0.2h  3 May 2016
OpenSSL default
CONF_def part of OpenSSL 1.0.2h  3 May 2016
TXT_DB part of OpenSSL 1.0.2h  3 May 2016
OpenSSL default user interface
OpenSSL CMAC method
ECDH_OpenSSL
ECDSA_OpenSSL
DSA_OpenSSL
OpenSSLDie
DH_OpenSSL
OpenSSL_add_all_digests
UI_OpenSSL
OpenSSL_add_all_ciphers

关于c - 使用自定义 openssl 二进制文件构建 OpenVPN(无源),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38436416/

相关文章:

bash - Debian:使用 TCP 的 Bash 电子邮件

ssl - 使用新 SSL 证书时出现 "tlsv1 alert unknown ca"错误

c++ - 代码中变量旁边的 % 是什么意思?

C - 函数内的动态分配/重定位

javascript - 使用 vue-cli-service Electron :build 构建后的 Electron 空白屏幕

Gradle 多项目自定义 build.gradle 文件名

java - 编译 Java 和 JAR

linux - 如何在非阻塞套接字上处理 OpenSSL SSL_ERROR_WANT_READ/WANT_WRITE

c - 如何打印 C 目录中新创建的文件的名称?

c - 如何在 32 位运行 Microsoft 的 FourQ 库?