Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
1875e6db
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
接近 2 年 前同步成功
通知
12
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看板
提交
1875e6db
编写于
7月 05, 2005
作者:
A
Andy Polyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Pull up Win64 support from 0.9.8.
上级
0962fbbf
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
146 addition
and
7 deletion
+146
-7
Configure
Configure
+2
-2
INSTALL.W32
INSTALL.W32
+1
-0
INSTALL.W64
INSTALL.W64
+66
-0
crypto/cryptlib.c
crypto/cryptlib.c
+1
-1
crypto/mem_dbg.c
crypto/mem_dbg.c
+8
-0
e_os.h
e_os.h
+19
-0
ms/do_win64a.bat
ms/do_win64a.bat
+9
-0
ms/do_win64i.bat
ms/do_win64i.bat
+9
-0
util/mk1mf.pl
util/mk1mf.pl
+5
-2
util/pl/VC-32.pl
util/pl/VC-32.pl
+26
-2
未找到文件。
Configure
浏览文件 @
1875e6db
...
...
@@ -456,8 +456,8 @@ my %table=(
"OS390-Unix","c89.sh:-O -DB_ENDIAN -DCHARSET_EBCDIC -DNO_SYS_PARAM_H -D_ALL_SOURCE::(unknown):::THIRTY_TWO_BIT DES_PTR DES_UNROLL MD2_CHAR RC4_INDEX RC4_CHAR BF_PTR:::",
# Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64
"VC-WIN64I","cl::::WIN64I::SIXTY_FOUR_BIT EXPORT_VAR_AS_FN:${no_asm}:win32",
"VC-WIN64A","cl::::WIN64A::SIXTY_FOUR_BIT EXPORT_VAR_AS_FN:${no_asm}:win32",
"VC-WIN64I","cl::::WIN64I::SIXTY_FOUR_BIT
RC4_CHUNK_LL DES_INT
EXPORT_VAR_AS_FN:${no_asm}:win32",
"VC-WIN64A","cl::::WIN64A::SIXTY_FOUR_BIT
RC4_CHUNK_LL DES_INT
EXPORT_VAR_AS_FN:${no_asm}:win32",
# Visual C targets
"VC-NT","cl::::WINNT::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${no_asm}:win32",
...
...
INSTALL.W32
浏览文件 @
1875e6db
...
...
@@ -3,6 +3,7 @@
----------------------------------
[Instructions for building for Windows CE can be found in INSTALL.WCE]
[Instructions for building for Win64 can be found in INSTALL.W64]
Heres a few comments about building OpenSSL in Windows environments. Most
of this is tested on Win32 but it may also work in Win 3.1 with some
...
...
INSTALL.W64
0 → 100644
浏览文件 @
1875e6db
INSTALLATION ON THE WIN64 PLATFORM
----------------------------------
Caveat lector
-------------
As of moment of this writing Win64 support is classified "initial"
for the following reasons.
- No assembler modules are engaged upon initial 0.9.8 release.
- API might change within 0.9.8 life-span, *but* in a manner which
doesn't break backward binary compatibility. Or in other words,
application programs compiled with initial 0.9.8 headers will
be expected to work with future minor release .DLL without need
to re-compile, even if future minor release features modified API.
- Above mentioned API modifications have everything to do with
elimination of a number of limitations, which are normally
considered inherent to 32-bit platforms. Which in turn is why they
are treated as limitations on 64-bit platform such as Win64:-)
The current list comprises [but not necessarily limited to]:
- null-terminated strings may not be longer than 2G-1 bytes,
longer strings are treated as zero-length;
- dynamically and *internally* allocated chunks can't be larger
than 2G-1 bytes;
- inability to encrypt/decrypt chunks of data larger than 4GB
[it's possibly to *hash* chunks of arbitrary size through];
Neither of these is actually big deal and hardly encountered
in real-life applications.
Compiling procedure
-------------------
You will need Perl. You can run under Cygwin or you can download
ActiveState Perl from http://www.activestate.com/ActivePerl.
You will need Microsoft Platform SDK, available for download at
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/. As per
April 2005 Platform SDK is equipped with Win64 compilers, as well
as assemblers, but it might change in the future.
To build for Win64/x64:
> perl Configure VC-WIN64A
> ms\do_win64a
> nmake -f ms\ntdll.mak
> cd out32dll
> ..\ms\test
To build for Win64/IA64:
> perl Configure VC-WIN64I
> ms\do_win64i
> nmake -f ms\ntdll.mak
> cd out32dll
> ..\ms\test
Naturally test-suite itself has to be executed on the target platform.
Installation
------------
TBD, for now see INSTALL.W32.
crypto/cryptlib.c
浏览文件 @
1875e6db
...
...
@@ -545,7 +545,6 @@ const char *CRYPTO_get_lock_name(int type)
unsigned
long
OPENSSL_ia32cap_P
=
0
;
unsigned
long
*
OPENSSL_ia32cap_loc
(
void
)
{
return
&
OPENSSL_ia32cap_P
;
}
int
OPENSSL_NONPIC_relocated
=
0
;
#if defined(OPENSSL_CPUID_OBJ) && !defined(OPENSSL_NO_ASM) && !defined(I386_ONLY)
#define OPENSSL_CPUID_SETUP
...
...
@@ -572,6 +571,7 @@ void OPENSSL_cpuid_setup(void)
#else
unsigned
long
*
OPENSSL_ia32cap_loc
(
void
)
{
return
NULL
;
}
#endif
int
OPENSSL_NONPIC_relocated
=
0
;
#if !defined(OPENSSL_CPUID_SETUP)
void
OPENSSL_cpuid_setup
(
void
)
{}
#endif
...
...
crypto/mem_dbg.c
浏览文件 @
1875e6db
...
...
@@ -252,8 +252,16 @@ long CRYPTO_dbg_get_options(void)
/* static int mem_cmp(MEM *a, MEM *b) */
static
int
mem_cmp
(
const
void
*
a_void
,
const
void
*
b_void
)
{
#ifdef _WIN64
const
char
*
a
=
(
const
char
*
)((
const
MEM
*
)
a_void
)
->
addr
,
*
b
=
(
const
char
*
)((
const
MEM
*
)
b_void
)
->
addr
;
if
(
a
==
b
)
return
0
;
else
if
(
a
>
b
)
return
1
;
else
return
-
1
;
#else
return
((
const
char
*
)((
const
MEM
*
)
a_void
)
->
addr
-
(
const
char
*
)((
const
MEM
*
)
b_void
)
->
addr
);
#endif
}
/* static unsigned long mem_hash(MEM *a) */
...
...
e_os.h
浏览文件 @
1875e6db
...
...
@@ -266,6 +266,16 @@ extern "C" {
# include <stddef.h>
# include <errno.h>
# include <string.h>
# ifdef _WIN64
# define strlen(s) _strlen31(s)
/* cut strings to 2GB */
static
unsigned
int
_strlen31
(
const
char
*
str
)
{
unsigned
int
len
=
0
;
while
(
*
str
&&
len
<
0x80000000U
)
str
++
,
len
++
;
return
len
&
0x7FFFFFFF
;
}
# endif
# include <malloc.h>
# endif
# include <io.h>
...
...
@@ -426,6 +436,15 @@ extern "C" {
# elif !defined(__DJGPP__)
# include <winsock.h>
extern
HINSTANCE
_hInstance
;
# ifdef _WIN64
/*
* Even though sizeof(SOCKET) is 8, it's safe to cast it to int, because
* the value constitutes an index in per-process table of limited size
* and not a real pointer.
*/
# define socket(d,t,p) ((int)socket(d,t,p))
# define accept(s,f,l) ((int)accept(s,f,l))
# endif
# define SSLeay_Write(a,b,c) send((a),(b),(c),0)
# define SSLeay_Read(a,b,c) recv((a),(b),(c),0)
# define SHUTDOWN(fd) { shutdown((fd),0); closesocket(fd); }
...
...
ms/do_win64a.bat
0 → 100755
浏览文件 @
1875e6db
perl
util
\mkfiles.pl
>
MINFO
perl
ms
\uplink.pl
win64a
>
ms
\uptable.asm
ml64
-c -Foms
\uptable.obj
ms
\uptable.asm
perl
util
\mk1mf.pl
no
-asm
VC
-WIN
64
A
>
ms
\nt.mak
perl
util
\mk1mf.pl
dll
no
-asm
VC
-WIN
64
A
>
ms
\ntdll.mak
perl
util
\mkdef.pl
32
libeay
>
ms
\libeay32.def
perl
util
\mkdef.pl
32
ssleay
>
ms
\ssleay32.def
ms/do_win64i.bat
0 → 100755
浏览文件 @
1875e6db
perl
util
\mkfiles.pl
>
MINFO
perl
ms
\uplink.pl
win64i
>
ms
\uptable.asm
ias
-o
ms
\uptable.obj
ms
\uptable.asm
perl
util
\mk1mf.pl
no
-asm
VC
-WIN
64
I
>
ms
\nt.mak
perl
util
\mk1mf.pl
dll
no
-asm
VC
-WIN
64
I
>
ms
\ntdll.mak
perl
util
\mkdef.pl
32
libeay
>
ms
\libeay32.def
perl
util
\mkdef.pl
32
ssleay
>
ms
\ssleay32.def
util/mk1mf.pl
浏览文件 @
1875e6db
...
...
@@ -24,6 +24,8 @@ $infile="MINFO";
%ops
=
(
"
VC-WIN32
",
"
Microsoft Visual C++ [4-6] - Windows NT or 9X
",
"
VC-WIN64I
",
"
Microsoft C/C++ - Win64/IA-64
",
"
VC-WIN64A
",
"
Microsoft C/C++ - Win64/x64
",
"
VC-CE
",
"
Microsoft eMbedded Visual C++ 3.0 - Windows CE ONLY
",
"
VC-NT
",
"
Microsoft Visual C++ [4-6] - Windows NT ONLY
",
"
Mingw32
",
"
GNU C++ - Windows NT or 9x
",
...
...
@@ -120,9 +122,10 @@ $bin_dir=(defined($VARS{'BIN'}))?$VARS{'BIN'}:'';
$NT
=
0
;
push
(
@INC
,"
util/pl
","
pl
");
if
((
$platform
eq
"
VC-WIN32
")
||
(
$platform
eq
"
VC-NT
"
))
if
((
$platform
=~
/VC-(.+)/
))
{
$NT
=
1
if
$platform
eq
"
VC-NT
";
$FLAVOR
=
$
1
;
$NT
=
1
if
$
1
eq
"
NT
";
require
'
VC-32.pl
';
}
elsif
(
$platform
eq
"
VC-CE
")
...
...
util/pl/VC-32.pl
浏览文件 @
1875e6db
...
...
@@ -11,8 +11,27 @@ $rm='del';
# C compiler stuff
$cc
=
'
cl
';
$cflags
=
'
/MD /W3 /WX /G5 /Ox /O2 /Ob2 /Gs0 /GF /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32
';
$lflags
=
"
/nologo /subsystem:console /machine:I386 /opt:ref
";
if
(
$FLAVOR
=~
/WIN64/
)
{
# Note that we currently don't have /WX on Win64! There is a lot of
# warnings, but only of two types:
#
# C4344: conversion from '__int64' to 'int/long', possible loss of data
# C4267: conversion from 'size_t' to 'int/long', possible loss of data
#
# Amount of latter type is minimized by aliasing strlen to function of
# own desing and limiting its return value to 2GB-1 (see e_os.h). As
# per 0.9.8 release remaining warnings were explicitly examines and
# considered safe to ignore.
#
$cflags
=
'
/MD /W3 /Ox /Gs0 /GF /Gy /nologo -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DOPENSSL_SYSNAME_WIN32 -DOPENSSL_SYSNAME_WINNT -DUNICODE -D_UNICODE
';
$lflags
=
"
/nologo /subsystem:console /opt:ref
";
}
else
{
$cflags
=
'
/MD /W3 /WX /G5 /Ox /O2 /Ob2 /Gs0 /GF /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32
';
$lflags
=
"
/nologo /subsystem:console /machine:I386 /opt:ref
";
}
$mlflags
=
'';
$out_def
=
"
out32
";
...
...
@@ -38,6 +57,7 @@ $exep='.exe';
if
(
$no_sock
)
{
$ex_libs
=
"";
}
else
{
$ex_libs
=
"
wsock32.lib user32.lib gdi32.lib
";
}
$ex_libs
=
"
$ex_libs
bufferoverflowu.lib
"
if
(
$FLAVOR
=~
/WIN64/
);
# static library stuff
$mklib
=
'
lib
';
...
...
@@ -115,6 +135,9 @@ EXHEADER= $(EXHEADER) $(INCO_D)\applink.c
LIBS_DEP=$(LIBS_DEP) $(OBJ_D)\applink.obj
CRYPTOOBJ=$(OBJ_D)\uplink.obj $(CRYPTOOBJ)
___
$banner
.=<<
'
___
'
if
(
$FLAVOR
=~
/WIN64/
);
CRYPTOOBJ
=
ms
\
uptable
.
obj
$
(
CRYPTOOBJ
)
___
}
...
...
@@ -140,6 +163,7 @@ sub do_lib_rule
{
local
(
$ex
)
=
(
$target
=~
/O_SSL/
)?'
$(L_CRYPTO)
':'';
$ex
.=
'
wsock32.lib gdi32.lib advapi32.lib user32.lib
';
$ex
.=
'
bufferoverflowu.lib
'
if
(
$FLAVOR
=~
/WIN64/
);
$ret
.=
"
\t\$
(LINK)
\$
(MLFLAGS)
$efile$target
/def:ms/
${Name}
.def @<<
\n
\$
(SHLIB_EX_OBJ)
$objs
$ex
\n
<<
\n
";
}
$ret
.=
"
\n
";
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录