Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
d4f0339c
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
大约 1 年 前同步成功
通知
9
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d4f0339c
编写于
4月 26, 2009
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update from 1.0.0-stable.
上级
127186bf
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
94 addition
and
25 deletion
+94
-25
Configure
Configure
+5
-4
INSTALL.W32
INSTALL.W32
+3
-2
apps/apps.c
apps/apps.c
+6
-1
apps/dh.c
apps/dh.c
+6
-0
apps/dhparam.c
apps/dhparam.c
+6
-0
apps/dsa.c
apps/dsa.c
+8
-0
apps/dsaparam.c
apps/dsaparam.c
+6
-0
apps/gendh.c
apps/gendh.c
+6
-0
apps/gendsa.c
apps/gendsa.c
+6
-0
apps/req.c
apps/req.c
+2
-1
apps/rsa.c
apps/rsa.c
+2
-0
apps/rsautl.c
apps/rsautl.c
+6
-0
crypto/bio/bss_dgram.c
crypto/bio/bss_dgram.c
+2
-0
crypto/evp/pmeth_lib.c
crypto/evp/pmeth_lib.c
+6
-0
crypto/pem/pvkfmt.c
crypto/pem/pvkfmt.c
+2
-0
engines/e_capi.c
engines/e_capi.c
+1
-1
engines/e_gmp.c
engines/e_gmp.c
+2
-0
engines/e_ubsec.c
engines/e_ubsec.c
+8
-7
ms/do_ms.bat
ms/do_ms.bat
+11
-9
未找到文件。
Configure
浏览文件 @
d4f0339c
...
...
@@ -484,11 +484,11 @@ my %table=(
# Visual C targets
#
# Win64 targets, WIN64I denotes IA-64 and WIN64A - AMD64
"VC-WIN64I","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64I::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:ia64cpuid.o:ia64.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o:::::::ias:win32",
"VC-WIN64A","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:x86_64cpuid.o:bn_asm.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o:::wp-x86_64.o::ml64:win32",
"VC-WIN64I","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE
-D_CRT_NONSTDC_NO_DEPRECATE
:::WIN64I::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:ia64cpuid.o:ia64.o::aes_core.o aes_cbc.o aes-ia64.o::md5-ia64.o:sha1-ia64.o sha256-ia64.o sha512-ia64.o:::::::ias:win32",
"VC-WIN64A","cl:-W3 -Gs0 -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE
-D_CRT_NONSTDC_NO_DEPRECATE
:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:x86_64cpuid.o:bn_asm.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o:::wp-x86_64.o::ml64:win32",
# x86 Win32 target defaults to ANSI API, if you want UNICODE, complement
# 'perl Configure VC-WIN32' with '-DUNICODE -D_UNICODE'
"VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32",
"VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE
-D_CRT_NONSTDC_NO_DEPRECATE
:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32",
# Unified CE target
"VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${no_asm}:win32",
...
...
@@ -918,7 +918,8 @@ if (defined($disabled{"tls1"}))
$disabled{"tlsext"} = "forced";
}
if (defined($disabled{"ec"}))
if (defined($disabled{"ec"}) || defined($disabled{"dsa"})
|| defined($disabled{"dh"}))
{
$disabled{"gost"} = "forced";
}
...
...
INSTALL.W32
浏览文件 @
d4f0339c
...
...
@@ -27,7 +27,7 @@
- Netwide Assembler, a.k.a. NASM, available from http://nasm.sourceforge.net/
is required if you intend to utilize assembler modules. Note that NASM
is the only supported assembler.
is
now
the only supported assembler.
If you are compiling from a tarball or a CVS snapshot then the Win32 files
may well be not up to date. This may mean that some "tweaking" is required to
...
...
@@ -43,7 +43,7 @@
Firstly you should run Configure:
> perl Configure VC-WIN32 --prefix=c:
/some/openssl/
dir
> perl Configure VC-WIN32 --prefix=c:
\some\openssl\
dir
Where the prefix argument specifies where OpenSSL will be installed to.
...
...
@@ -56,6 +56,7 @@
- If you don't want to use the assembly language files at all then run:
> perl Configure VC-WIN32 no-asm --prefix=c:/some/openssl/dir
> ms\do_ms
If you get errors about things not having numbers assigned then check the
...
...
apps/apps.c
浏览文件 @
d4f0339c
...
...
@@ -921,11 +921,13 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin,
&
pkey
,
NULL
,
NULL
))
goto
end
;
}
#if !defined(OPENSSL_NO_RSA) && !defined(OPENSSL_NO_DSA)
else
if
(
format
==
FORMAT_MSBLOB
)
pkey
=
b2i_PrivateKey_bio
(
key
);
else
if
(
format
==
FORMAT_PVK
)
pkey
=
b2i_PVK_bio
(
key
,
(
pem_password_cb
*
)
password_callback
,
&
cb_data
);
#endif
else
{
BIO_printf
(
err
,
"bad input format specified for key file
\n
"
);
...
...
@@ -989,6 +991,7 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin,
{
pkey
=
d2i_PUBKEY_bio
(
key
,
NULL
);
}
#ifndef OPENSSL_NO_RSA
else
if
(
format
==
FORMAT_ASN1RSA
)
{
RSA
*
rsa
;
...
...
@@ -1018,7 +1021,7 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin,
else
pkey
=
NULL
;
}
#endif
else
if
(
format
==
FORMAT_PEM
)
{
pkey
=
PEM_read_bio_PUBKEY
(
key
,
NULL
,
...
...
@@ -1028,8 +1031,10 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin,
else
if
(
format
==
FORMAT_NETSCAPE
||
format
==
FORMAT_IISSGC
)
pkey
=
load_netscape_key
(
err
,
key
,
file
,
key_descrip
,
format
);
#endif
#if !defined(OPENSSL_NO_RSA) && !defined(OPENSSL_NO_DSA)
else
if
(
format
==
FORMAT_MSBLOB
)
pkey
=
b2i_PublicKey_bio
(
key
);
#endif
else
{
BIO_printf
(
err
,
"bad input format specified for key file
\n
"
);
...
...
apps/dh.c
浏览文件 @
d4f0339c
...
...
@@ -349,4 +349,10 @@ end:
apps_shutdown
();
OPENSSL_EXIT
(
ret
);
}
#else
/* !OPENSSL_NO_DH */
# if PEDANTIC
static
void
*
dummy
=&
dummy
;
# endif
#endif
apps/dhparam.c
浏览文件 @
d4f0339c
...
...
@@ -554,4 +554,10 @@ static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb)
return
1
;
}
#else
/* !OPENSSL_NO_DH */
# if PEDANTIC
static
void
*
dummy
=&
dummy
;
# endif
#endif
apps/dsa.c
浏览文件 @
d4f0339c
...
...
@@ -334,6 +334,7 @@ bad:
i
=
PEM_write_bio_DSA_PUBKEY
(
out
,
dsa
);
else
i
=
PEM_write_bio_DSAPrivateKey
(
out
,
dsa
,
enc
,
NULL
,
0
,
NULL
,
passout
);
#ifndef OPENSSL_NO_RSA
}
else
if
(
outformat
==
FORMAT_MSBLOB
||
outformat
==
FORMAT_PVK
)
{
EVP_PKEY
*
pk
;
pk
=
EVP_PKEY_new
();
...
...
@@ -345,6 +346,7 @@ bad:
else
i
=
i2b_PrivateKey_bio
(
out
,
pk
);
EVP_PKEY_free
(
pk
);
#endif
}
else
{
BIO_printf
(
bio_err
,
"bad output format specified for outfile
\n
"
);
goto
end
;
...
...
@@ -365,4 +367,10 @@ end:
apps_shutdown
();
OPENSSL_EXIT
(
ret
);
}
#else
/* !OPENSSL_NO_DSA */
# if PEDANTIC
static
void
*
dummy
=&
dummy
;
# endif
#endif
apps/dsaparam.c
浏览文件 @
d4f0339c
...
...
@@ -475,4 +475,10 @@ static int MS_CALLBACK dsa_cb(int p, int n, BN_GENCB *cb)
#endif
return
1
;
}
#else
/* !OPENSSL_NO_DSA */
# if PEDANTIC
static
void
*
dummy
=&
dummy
;
# endif
#endif
apps/gendh.c
浏览文件 @
d4f0339c
...
...
@@ -235,4 +235,10 @@ static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb)
#endif
return
1
;
}
#else
/* !OPENSSL_NO_DH */
# if PEDANTIC
static
void
*
dummy
=&
dummy
;
# endif
#endif
apps/gendsa.c
浏览文件 @
d4f0339c
...
...
@@ -279,4 +279,10 @@ end:
apps_shutdown
();
OPENSSL_EXIT
(
ret
);
}
#else
/* !OPENSSL_NO_DSA */
# if PEDANTIC
static
void
*
dummy
=&
dummy
;
# endif
#endif
apps/req.c
浏览文件 @
d4f0339c
...
...
@@ -1715,7 +1715,7 @@ static EVP_PKEY_CTX *set_keygen_ctx(BIO *err, const char *gstr, int *pkey_type,
ERR_print_errors
(
err
);
return
NULL
;
}
#ifndef OPENSSL_NO_RSA
if
((
*
pkey_type
==
EVP_PKEY_RSA
)
&&
(
keylen
!=
-
1
))
{
if
(
EVP_PKEY_CTX_set_rsa_keygen_bits
(
gctx
,
keylen
)
<=
0
)
...
...
@@ -1726,6 +1726,7 @@ static EVP_PKEY_CTX *set_keygen_ctx(BIO *err, const char *gstr, int *pkey_type,
return
NULL
;
}
}
#endif
return
gctx
;
}
...
...
apps/rsa.c
浏览文件 @
d4f0339c
...
...
@@ -409,6 +409,7 @@ bad:
}
else
i
=
PEM_write_bio_RSAPrivateKey
(
out
,
rsa
,
enc
,
NULL
,
0
,
NULL
,
passout
);
#ifndef OPENSSL_NO_DSA
}
else
if
(
outformat
==
FORMAT_MSBLOB
||
outformat
==
FORMAT_PVK
)
{
EVP_PKEY
*
pk
;
pk
=
EVP_PKEY_new
();
...
...
@@ -420,6 +421,7 @@ bad:
else
i
=
i2b_PrivateKey_bio
(
out
,
pk
);
EVP_PKEY_free
(
pk
);
#endif
}
else
{
BIO_printf
(
bio_err
,
"bad output format specified for outfile
\n
"
);
goto
end
;
...
...
apps/rsautl.c
浏览文件 @
d4f0339c
...
...
@@ -342,4 +342,10 @@ static void usage()
}
#else
/* !OPENSSL_NO_RSA */
# if PEDANTIC
static
void
*
dummy
=&
dummy
;
# endif
#endif
crypto/bio/bss_dgram.c
浏览文件 @
d4f0339c
...
...
@@ -61,7 +61,9 @@
#include <stdio.h>
#include <errno.h>
#ifdef OPENSSL_SYS_VMS
#include <sys/time.h>
#endif
#define USE_SOCKETS
#include "cryptlib.h"
...
...
crypto/evp/pmeth_lib.c
浏览文件 @
d4f0339c
...
...
@@ -77,9 +77,15 @@ extern const EVP_PKEY_METHOD ec_pkey_meth, hmac_pkey_meth;
static
const
EVP_PKEY_METHOD
*
standard_methods
[]
=
{
#ifndef OPENSSL_NO_RSA
&
rsa_pkey_meth
,
#endif
#ifndef OPENSSL_NO_DH
&
dh_pkey_meth
,
#endif
#ifndef OPENSSL_NO_DSA
&
dsa_pkey_meth
,
#endif
#ifndef OPENSSL_NO_EC
&
ec_pkey_meth
,
#endif
...
...
crypto/pem/pvkfmt.c
浏览文件 @
d4f0339c
...
...
@@ -63,6 +63,7 @@
#include <openssl/pem.h>
#include <openssl/rand.h>
#include <openssl/bn.h>
#if !defined(OPENSSL_NO_RSA) && !defined(OPENSSL_NO_DSA)
#include <openssl/dsa.h>
#include <openssl/rsa.h>
...
...
@@ -933,3 +934,4 @@ int i2b_PVK_bio(BIO *out, EVP_PKEY *pk, int enclevel,
}
return
-
1
;
}
#endif
engines/e_capi.c
浏览文件 @
d4f0339c
...
...
@@ -56,12 +56,12 @@
#include <string.h>
#include <openssl/crypto.h>
#include <openssl/buffer.h>
#include <openssl/rsa.h>
#include <openssl/bn.h>
#ifdef OPENSSL_SYS_WIN32
#ifndef OPENSSL_NO_CAPIENG
#include <openssl/rsa.h>
#include <windows.h>
...
...
engines/e_gmp.c
浏览文件 @
d4f0339c
...
...
@@ -85,7 +85,9 @@
#include <openssl/crypto.h>
#include <openssl/buffer.h>
#include <openssl/engine.h>
#ifndef OPENSSL_NO_RSA
#include <openssl/rsa.h>
#endif
#include <openssl/bn.h>
#ifndef OPENSSL_NO_HW
...
...
engines/e_ubsec.c
浏览文件 @
d4f0339c
...
...
@@ -95,14 +95,14 @@ static int ubsec_finish(ENGINE *e);
static
int
ubsec_ctrl
(
ENGINE
*
e
,
int
cmd
,
long
i
,
void
*
p
,
void
(
*
f
)(
void
));
static
int
ubsec_mod_exp
(
BIGNUM
*
r
,
const
BIGNUM
*
a
,
const
BIGNUM
*
p
,
const
BIGNUM
*
m
,
BN_CTX
*
ctx
);
#ifndef OPENSSL_NO_RSA
static
int
ubsec_mod_exp_crt
(
BIGNUM
*
r
,
const
BIGNUM
*
a
,
const
BIGNUM
*
p
,
const
BIGNUM
*
q
,
const
BIGNUM
*
dp
,
const
BIGNUM
*
dq
,
const
BIGNUM
*
qinv
,
BN_CTX
*
ctx
);
#ifndef OPENSSL_NO_RSA
static
int
ubsec_rsa_mod_exp
(
BIGNUM
*
r0
,
const
BIGNUM
*
I
,
RSA
*
rsa
,
BN_CTX
*
ctx
);
#endif
static
int
ubsec_mod_exp_mont
(
BIGNUM
*
r
,
const
BIGNUM
*
a
,
const
BIGNUM
*
p
,
const
BIGNUM
*
m
,
BN_CTX
*
ctx
,
BN_MONT_CTX
*
m_ctx
);
#endif
#ifndef OPENSSL_NO_DSA
#ifdef NOT_USED
static
int
ubsec_dsa_mod_exp
(
DSA
*
dsa
,
BIGNUM
*
rr
,
BIGNUM
*
a1
,
...
...
@@ -302,10 +302,10 @@ static t_UBSEC_diffie_hellman_generate_ioctl
*
p_UBSEC_diffie_hellman_generate_ioctl
=
NULL
;
static
t_UBSEC_diffie_hellman_agree_ioctl
*
p_UBSEC_diffie_hellman_agree_ioctl
=
NULL
;
#endif
/* #ifndef OPENSSL_NO_RSA */
static
t_UBSEC_rsa_mod_exp_ioctl
*
p_UBSEC_rsa_mod_exp_ioctl
=
NULL
;
#ifndef OPENSSL_NO_RSA
static
t_UBSEC_rsa_mod_exp_crt_ioctl
*
p_UBSEC_rsa_mod_exp_crt_ioctl
=
NULL
;
/* #endif */
#endif
#ifndef OPENSSL_NO_DSA
static
t_UBSEC_dsa_sign_ioctl
*
p_UBSEC_dsa_sign_ioctl
=
NULL
;
static
t_UBSEC_dsa_verify_ioctl
*
p_UBSEC_dsa_verify_ioctl
=
NULL
;
...
...
@@ -624,7 +624,6 @@ static int ubsec_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx)
err:
return
to_return
;
}
#endif
static
int
ubsec_mod_exp_crt
(
BIGNUM
*
r
,
const
BIGNUM
*
a
,
const
BIGNUM
*
p
,
const
BIGNUM
*
q
,
const
BIGNUM
*
dp
,
...
...
@@ -672,6 +671,7 @@ static int ubsec_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
r
->
top
=
(
BN_num_bits
(
p
)
+
BN_num_bits
(
q
)
+
BN_BITS2
-
1
)
/
BN_BITS2
;
return
1
;
}
#endif
#ifndef OPENSSL_NO_DSA
#ifdef NOT_USED
...
...
@@ -704,6 +704,8 @@ static int ubsec_mod_exp_dsa(DSA *dsa, BIGNUM *r, BIGNUM *a,
#endif
#endif
#ifndef OPENSSL_NO_RSA
/*
* This function is aliased to mod_exp (with the mont stuff dropped).
*/
...
...
@@ -712,7 +714,6 @@ static int ubsec_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
{
int
ret
=
0
;
#ifndef OPENSSL_NO_RSA
/* Do in software if the key is too large for the hardware. */
if
(
BN_num_bits
(
m
)
>
max_key_len
)
{
...
...
@@ -720,13 +721,13 @@ static int ubsec_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
ret
=
(
*
meth
->
bn_mod_exp
)(
r
,
a
,
p
,
m
,
ctx
,
m_ctx
);
}
else
#endif
{
ret
=
ubsec_mod_exp
(
r
,
a
,
p
,
m
,
ctx
);
}
return
ret
;
}
#endif
#ifndef OPENSSL_NO_DH
/* This function is aliased to mod_exp (with the dh and mont dropped). */
...
...
ms/do_ms.bat
浏览文件 @
d4f0339c
perl
util
\mkfiles.pl
>
MINFO
perl
util
\mk1mf.pl
no
-asm
VC
-WIN
32
>
ms
\nt.mak
perl
util
\mk1mf.pl
dll
no
-asm
VC
-WIN
32
>
ms
\ntdll.mak
perl
util
\mk1mf.pl
no
-asm
VC
-CE
>
ms
\ce.mak
perl
util
\mk1mf.pl
dll
no
-asm
VC
-CE
>
ms
\cedll.mak
perl
util
\mkdef.pl
32
libeay
>
ms
\libeay32.def
perl
util
\mkdef.pl
32
ssleay
>
ms
\ssleay32.def
perl
util
\mkfiles.pl
>
MINFO
perl
util
\mk1mf.pl
no
-asm
VC
-WIN
32
>
ms
\nt.mak
perl
util
\mk1mf.pl
dll
no
-asm
VC
-WIN
32
>
ms
\ntdll.mak
if
x
%OSVERSION%
==
x
goto
skipce
perl
util
\mk1mf.pl
no
-asm
VC
-CE
>
ms
\ce.mak
perl
util
\mk1mf.pl
dll
no
-asm
VC
-CE
>
ms
\cedll.mak
:skipce
perl
util
\mkdef.pl
32
libeay
>
ms
\libeay32.def
perl
util
\mkdef.pl
32
ssleay
>
ms
\ssleay32.def
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录