Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
86d21d0b
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
10
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
86d21d0b
编写于
1月 09, 2015
作者:
M
Matt Caswell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Avoid deprecation problems in Visual Studio 13
Reviewed-by:
N
Andy Polyakov
<
appro@openssl.org
>
上级
964012dc
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
5 addition
and
60 deletion
+5
-60
crypto/rand/rand_win.c
crypto/rand/rand_win.c
+2
-59
e_os.h
e_os.h
+3
-1
未找到文件。
crypto/rand/rand_win.c
浏览文件 @
86d21d0b
...
...
@@ -198,12 +198,6 @@ int RAND_poll(void)
DWORD
w
;
int
good
=
0
;
/* Determine the OS version we are on so we can turn off things
* that do not work properly.
*/
OSVERSIONINFO
osverinfo
;
osverinfo
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFO
)
;
GetVersionEx
(
&
osverinfo
)
;
#if defined(OPENSSL_SYS_WINCE)
# if defined(_WIN32_WCE) && _WIN32_WCE>=300
...
...
@@ -283,56 +277,6 @@ int RAND_poll(void)
* at random times on Windows 2000. Reported by Jeffrey Altman.
* Only use it on NT.
*/
/* Wolfgang Marczy <WMarczy@topcall.co.at> reports that
* the RegQueryValueEx call below can hang on NT4.0 (SP6).
* So we don't use this at all for now. */
#if 0
if ( osverinfo.dwPlatformId == VER_PLATFORM_WIN32_NT &&
osverinfo.dwMajorVersion < 5)
{
/* Read Performance Statistics from NT/2000 registry
* The size of the performance data can vary from call
* to call so we must guess the size of the buffer to use
* and increase its size if we get an ERROR_MORE_DATA
* return instead of ERROR_SUCCESS.
*/
LONG rc=ERROR_MORE_DATA;
char * buf=NULL;
DWORD bufsz=0;
DWORD length;
while (rc == ERROR_MORE_DATA)
{
buf = realloc(buf,bufsz+8192);
if (!buf)
break;
bufsz += 8192;
length = bufsz;
rc = RegQueryValueEx(HKEY_PERFORMANCE_DATA, TEXT("Global"),
NULL, NULL, buf, &length);
}
if (rc == ERROR_SUCCESS)
{
/* For entropy count assume only least significant
* byte of each DWORD is random.
*/
RAND_add(&length, sizeof(length), 0);
RAND_add(buf, length, length / 4.0);
/* Close the Registry Key to allow Windows to cleanup/close
* the open handle
* Note: The 'HKEY_PERFORMANCE_DATA' key is implicitly opened
* when the RegQueryValueEx above is done. However, if
* it is not explicitly closed, it can cause disk
* partition manipulation problems.
*/
RegCloseKey(HKEY_PERFORMANCE_DATA);
}
if (buf)
free(buf);
}
#endif
if
(
advapi
)
{
...
...
@@ -385,7 +329,7 @@ int RAND_poll(void)
if
(
advapi
)
FreeLibrary
(
advapi
);
if
((
osverinfo
.
dwPlatformId
!=
VER_PLATFORM_WIN32_NT
||
if
((
!
check_winnt
()
||
!
OPENSSL_isservice
())
&&
(
user
=
LoadLibrary
(
TEXT
(
"USER32.DLL"
))))
{
...
...
@@ -409,8 +353,7 @@ int RAND_poll(void)
* on NT4 even though it exists in SP3 (or SP6) and
* higher.
*/
if
(
osverinfo
.
dwPlatformId
==
VER_PLATFORM_WIN32_NT
&&
osverinfo
.
dwMajorVersion
<
5
)
if
(
check_winnt
()
&&
!
check_win_minplat
(
5
))
cursor
=
0
;
}
if
(
cursor
)
...
...
e_os.h
浏览文件 @
86d21d0b
...
...
@@ -337,11 +337,13 @@ static __inline unsigned int _strlen31(const char *str)
# define DEFAULT_HOME "C:"
# endif
/* Avoid
Windows 8 SDK
GetVersion deprecated problems */
/* Avoid
Visual Studio 13
GetVersion deprecated problems */
#if defined(_MSC_VER) && _MSC_VER>=1800
# define check_winnt() (1)
# define check_win_minplat(x) (1)
#else
# define check_winnt() (GetVersion() < 0x80000000)
# define check_win_minplat(x) (LOBYTE(LOWORD(GetVersion())) >= (x))
#endif
#else
/* The non-microsoft world */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录