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

时间:2016-07-18 12:12:46

标签: c build openssl openvpn

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

我的问题是,如果我没有OpenSSL的任何来源以及某些自定义OpenSSL的预编译二进制文件,该怎么办?如何用这样的二进制文件编译OpenVPN。很抱歉,如果这个问题已被多次回答 - 我无法找到问题的答案。

1 个答案:

答案 0 :(得分:1)

  

我的问题是如果我没有OpenSSL的任何来源以及某些自定义OpenSSL的预编译二进制文件。如何使用这些二进制文件编译OpenVPN。

您无法针对[private] OpenSSL构建OpenVPN,因为您需要OpenSSL头文件。

可能能够使用strings确定[私有] OpenSSL库的版本,然后从OpenSSL download page上的OpenSSL包中获取标头(be如果需要,一定要访问/source/old。以下是从源代码构建并在本地安装的OpenSSL 1.0.2的示例。

如果您想要复制丢失的头文件,请确保运行./config以生成openssl/opensslconf.hopenssl/bn.h

尝试复制丢失的标头有点冒险,而且真的想要[私有] OpenSSL库中的openssl/opensslconf.hopenssl/bn.h

$ 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