在WAMP / Apache的openssl.exe中找不到序数372

我使用的PHP框架需要OpenSSL的各种function,但是在执行任何与OpenSSL相关的任务时,出现以下错误:“无法在DLL文件C:\ wamp64 \ bin \ apache \ apache2.4.17 \ bin中find序号372 \ openssl.exe”。

我不知道该怎么改正这个问题,我已经到处看了。 我会很感激的帮助,因为我不知道如何解决这个问题。

Solutions Collecting From Web of "在WAMP / Apache的openssl.exe中找不到序数372"

要解决这个问题,需要两件事情:

1)确保您的Apache bin目录中没有libeay32.dll和ssleay32.dll的符号链接(例如,我的是:C:\ wamp64 \ bin \ apache \ apache2.4.23 \ bin)

如果你有符号链接(即文件大小为0字节),你需要从Apache Lounge下载DLL。 例如,我从https://www.apachelounge.com/download/获取了64位版本的Apache 2.4.23中的两个.dll文件

2)一旦你有实际的.dll文件恢复,你需要确保Wampserver不覆盖它们。 Wampserver 3有一个配置脚本,每次启动时都会运行。 在该脚本中,它将用符号链接覆盖这些.dll文件。 您必须禁用该功能。 为此,注释掉这两个文件的引用:C:\ wamp64 \ scripts \ config.inc.php(我的位置在133和139行)。

这应该允许你在Apache中启用mod_ssl模块。 在启用mod_ssl正确启动Apache之后,还需要取消注释“Include conf / extra / httpd-ssl.conf”。 (但是,您可能需要删除那里的大部分内容,并重新开始,因为它包含大量的硬编码路径和错误)

…“在DLL文件C:\ wamp64 \ bin \ apache \ apache2.4.17 \ bin \ openssl.exe中找不到序号372”

我从OpenSSL 1.0.2推测它的PEM_SealInitSSL_CONF_cmd_argv ; 或来自OpenSSL 1.1.0的ASN1_i2d_fpSSL_SESSION_set1_id_context

 # OpenSSL 1.1.0 $ find $PWD -type f -iname '*.num' -exec grep " 372" {} \; ASN1_i2d_fp 372 1_1_0 EXIST::FUNCTION:STDIO SSL_SESSION_set1_id_context 372 1_1_0 EXIST::FUNCTION: ... # OpenSSL 1.0.2 $ find $PWD -type f -iname '*.num' -exec grep " 372" {} \; PEM_SealInit 372 EXIST::FUNCTION:RSA SSL_CONF_cmd_argv 372 EXIST::FUNCTION: ... 

您需要使用dumpbin或Dependency Walker来验证它。 另请参阅如何从序号(由序号导出)找到导出的函数名称? 在堆栈溢出。


序号是使用<openssl src>\util\mkdef.pl 。 你可以看到来自OpenSSL的GitHub存在的源代码。 这里是1.0.2 , 这里是1.1.0 。

以下是该文件的注释:

 #!/usr/local/bin/perl -w # # generate a .def file # # It does this by parsing the header files and looking for the # prototyped functions: it then prunes the output. # # Intermediary files are created, call libcrypto.num and libssl.num, # The format of these files is: # # routine-name nnnn vers info # # The "nnnn" and "vers" fields are the numeric id and version for the symbol # respectively. The "info" part is actually a colon-separated string of fields # with the following meaning: # # existence:platform:kind:algorithms # # - "existence" can be "EXIST" or "NOEXIST" depending on if the symbol is # found somewhere in the source, # - "platforms" is empty if it exists on all platforms, otherwise it contains # comma-separated list of the platform, just as they are if the symbol exists # for those platforms, or prepended with a "!" if not. This helps resolve # symbol name variants for platforms where the names are too long for the # compiler or linker, or if the systems is case insensitive and there is a # clash, or the symbol is implemented differently (see # EXPORT_VAR_AS_FUNCTION). This script assumes renaming of symbols is found # in the file crypto/symhacks.h. # The semantics for the platforms is that every item is checked against the # environment. For the negative items ("!FOO"), if any of them is false # (ie "FOO" is true) in the environment, the corresponding symbol can't be # used. For the positive itms, if all of them are false in the environment, # the corresponding symbol can't be used. Any combination of positive and # negative items are possible, and of course leave room for some redundancy. # - "kind" is "FUNCTION" or "VARIABLE". The meaning of that is obvious. # - "algorithms" is a comma-separated list of algorithm names. This helps # exclude symbols that are part of an algorithm that some user wants to # exclude.