Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows CE 6.0上的ASN1_时间错误_C_Ssl_Openssl_Windows Ce_X509 - Fatal编程技术网

Windows CE 6.0上的ASN1_时间错误

Windows CE 6.0上的ASN1_时间错误,c,ssl,openssl,windows-ce,x509,C,Ssl,Openssl,Windows Ce,X509,我在Windows7和WindowsEmbeddedCE6.0(ARMV4I平台)上使用OpenSSL 为此,我自己编译了OpenSSL,最初是针对Windows 7和我的ARMV4I平台的0.9.8w版本。执行openssl.exe在两台机器上都可以正常工作 我使用以前构建的libeay32.dll进行编译 在我的Windows 7机器上,一切正常,证书颁发正确。但是在ARMV4I设备上,我注意到日期(X509\u get\u notBefore(x)和X509\u get\u notAfte

我在Windows7和WindowsEmbeddedCE6.0(ARMV4I平台)上使用OpenSSL

为此,我自己编译了OpenSSL,最初是针对Windows 7和我的ARMV4I平台的0.9.8w版本。执行
openssl.exe
在两台机器上都可以正常工作

我使用以前构建的
libeay32.dll
进行编译

在我的Windows 7机器上,一切正常,证书颁发正确。但是在ARMV4I设备上,我注意到日期(
X509\u get\u notBefore(x)
X509\u get\u notAfter(x)
)是错误的:

  • Windows 7-
    X509\u get\u notBefore(x)
    值为
    150710093249Z
  • CE 6.0-
    X509\u get\u notBefore(x)
    39150810093249Z
而差值总是值
39000100000000
。这导致Windows CE上的有效性差异,现在是
Aug 10 09:32:49 3915 GMT
,而不是
Jul 10 09:32:49 2015 GMT

后来我编译了OpenSSL 1.0.2c并执行了相同的代码,但问题仍然存在

你知道为什么会发生这种情况,以及如何解决它吗

(一种可能的修复方法是手动调整Windows CE上的ASN1_时间:

\ifdef在下
X509时间调整(不在-39000100000000之前);
X509时间调整(不晚于-39000100000000);
#恩迪夫
这需要在不同的步骤中进行,因为
X509\u gmtime\u adj()
只接受long类型的值作为第二个参数:

ASN1_时间*X509_gmtime_调整(ASN1_时间*s,长调整);

我使用的是Microsoft Visual Studio 2008版本3.5 SP1。

此问题可以通过以下修复程序解决:

此问题可通过以下修复程序解决:

Windows CE设备上的时钟设置是否正确?谢谢提示。是的,时钟设置正确。Windows CE设备上的时钟设置是否正确?谢谢提示。是的,时钟设置正确。