Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
340daf6a
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看板
提交
340daf6a
编写于
6月 29, 2014
作者:
R
Rich Salz
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of git.openssl.org:openssl
上级
327f3c04
44724bee
变更
27
隐藏空白更改
内联
并排
Showing
27 changed file
with
86 addition
and
58 deletion
+86
-58
apps/ca.c
apps/ca.c
+2
-0
apps/ciphers.c
apps/ciphers.c
+0
-6
apps/progs.h
apps/progs.h
+4
-4
apps/progs.pl
apps/progs.pl
+1
-1
crypto/aes/asm/aesni-mb-x86_64.pl
crypto/aes/asm/aesni-mb-x86_64.pl
+2
-2
crypto/aes/asm/aesni-sha1-x86_64.pl
crypto/aes/asm/aesni-sha1-x86_64.pl
+1
-1
crypto/aes/asm/aesni-sha256-x86_64.pl
crypto/aes/asm/aesni-sha256-x86_64.pl
+2
-2
crypto/asn1/asn1_lib.c
crypto/asn1/asn1_lib.c
+8
-2
crypto/bn/asm/rsaz-avx2.pl
crypto/bn/asm/rsaz-avx2.pl
+5
-3
crypto/bn/asm/rsaz-x86_64.pl
crypto/bn/asm/rsaz-x86_64.pl
+5
-0
crypto/evp/evp_pbe.c
crypto/evp/evp_pbe.c
+1
-1
crypto/idea/ideatest.c
crypto/idea/ideatest.c
+3
-3
crypto/modes/asm/aesni-gcm-x86_64.pl
crypto/modes/asm/aesni-gcm-x86_64.pl
+2
-2
crypto/modes/asm/ghash-x86_64.pl
crypto/modes/asm/ghash-x86_64.pl
+2
-2
crypto/sha/asm/sha1-586.pl
crypto/sha/asm/sha1-586.pl
+2
-2
crypto/sha/asm/sha1-mb-x86_64.pl
crypto/sha/asm/sha1-mb-x86_64.pl
+2
-2
crypto/sha/asm/sha1-x86_64.pl
crypto/sha/asm/sha1-x86_64.pl
+2
-2
crypto/sha/asm/sha256-586.pl
crypto/sha/asm/sha256-586.pl
+2
-2
crypto/sha/asm/sha256-mb-x86_64.pl
crypto/sha/asm/sha256-mb-x86_64.pl
+2
-2
crypto/sha/asm/sha512-x86_64.pl
crypto/sha/asm/sha512-x86_64.pl
+2
-2
doc/crypto/BIO_push.pod
doc/crypto/BIO_push.pod
+1
-1
doc/ssl/SSL_CTX_new.pod
doc/ssl/SSL_CTX_new.pod
+24
-10
doc/ssl/SSL_CTX_set_cipher_list.pod
doc/ssl/SSL_CTX_set_cipher_list.pod
+4
-0
ssl/s3_pkt.c
ssl/s3_pkt.c
+1
-1
ssl/ssl_stat.c
ssl/ssl_stat.c
+1
-4
ssl/t1_enc.c
ssl/t1_enc.c
+1
-1
ssl/t1_lib.c
ssl/t1_lib.c
+4
-0
未找到文件。
apps/ca.c
浏览文件 @
340daf6a
...
@@ -1628,12 +1628,14 @@ static int certify(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
...
@@ -1628,12 +1628,14 @@ static int certify(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,
{
{
ok
=
0
;
ok
=
0
;
BIO_printf
(
bio_err
,
"Signature verification problems....
\n
"
);
BIO_printf
(
bio_err
,
"Signature verification problems....
\n
"
);
ERR_print_errors
(
bio_err
);
goto
err
;
goto
err
;
}
}
if
(
i
==
0
)
if
(
i
==
0
)
{
{
ok
=
0
;
ok
=
0
;
BIO_printf
(
bio_err
,
"Signature did not match the certificate request
\n
"
);
BIO_printf
(
bio_err
,
"Signature did not match the certificate request
\n
"
);
ERR_print_errors
(
bio_err
);
goto
err
;
goto
err
;
}
}
else
else
...
...
apps/ciphers.c
浏览文件 @
340daf6a
...
@@ -100,13 +100,7 @@ int MAIN(int argc, char **argv)
...
@@ -100,13 +100,7 @@ int MAIN(int argc, char **argv)
char
buf
[
512
];
char
buf
[
512
];
BIO
*
STDout
=
NULL
;
BIO
*
STDout
=
NULL
;
#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
meth
=
SSLv23_server_method
();
meth
=
SSLv23_server_method
();
#elif !defined(OPENSSL_NO_SSL3)
meth
=
SSLv3_server_method
();
#elif !defined(OPENSSL_NO_SSL2)
meth
=
SSLv2_server_method
();
#endif
apps_startup
();
apps_startup
();
...
...
apps/progs.h
浏览文件 @
340daf6a
...
@@ -107,16 +107,16 @@ FUNCTION functions[] = {
...
@@ -107,16 +107,16 @@ FUNCTION functions[] = {
{
FUNC_TYPE_GENERAL
,
"gendsa"
,
gendsa_main
},
{
FUNC_TYPE_GENERAL
,
"gendsa"
,
gendsa_main
},
#endif
#endif
{
FUNC_TYPE_GENERAL
,
"genpkey"
,
genpkey_main
},
{
FUNC_TYPE_GENERAL
,
"genpkey"
,
genpkey_main
},
#if !defined(OPENSSL_NO_SOCK)
&& !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
#if !defined(OPENSSL_NO_SOCK)
{
FUNC_TYPE_GENERAL
,
"s_server"
,
s_server_main
},
{
FUNC_TYPE_GENERAL
,
"s_server"
,
s_server_main
},
#endif
#endif
#if !defined(OPENSSL_NO_SOCK)
&& !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
#if !defined(OPENSSL_NO_SOCK)
{
FUNC_TYPE_GENERAL
,
"s_client"
,
s_client_main
},
{
FUNC_TYPE_GENERAL
,
"s_client"
,
s_client_main
},
#endif
#endif
#ifndef OPENSSL_NO_SPEED
#ifndef OPENSSL_NO_SPEED
{
FUNC_TYPE_GENERAL
,
"speed"
,
speed_main
},
{
FUNC_TYPE_GENERAL
,
"speed"
,
speed_main
},
#endif
#endif
#if !defined(OPENSSL_NO_SOCK)
&& !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
#if !defined(OPENSSL_NO_SOCK)
{
FUNC_TYPE_GENERAL
,
"s_time"
,
s_time_main
},
{
FUNC_TYPE_GENERAL
,
"s_time"
,
s_time_main
},
#endif
#endif
{
FUNC_TYPE_GENERAL
,
"version"
,
version_main
},
{
FUNC_TYPE_GENERAL
,
"version"
,
version_main
},
...
@@ -126,7 +126,7 @@ FUNCTION functions[] = {
...
@@ -126,7 +126,7 @@ FUNCTION functions[] = {
#endif
#endif
{
FUNC_TYPE_GENERAL
,
"crl2pkcs7"
,
crl2pkcs7_main
},
{
FUNC_TYPE_GENERAL
,
"crl2pkcs7"
,
crl2pkcs7_main
},
{
FUNC_TYPE_GENERAL
,
"sess_id"
,
sess_id_main
},
{
FUNC_TYPE_GENERAL
,
"sess_id"
,
sess_id_main
},
#if !defined(OPENSSL_NO_SOCK)
&& !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
#if !defined(OPENSSL_NO_SOCK)
{
FUNC_TYPE_GENERAL
,
"ciphers"
,
ciphers_main
},
{
FUNC_TYPE_GENERAL
,
"ciphers"
,
ciphers_main
},
#endif
#endif
{
FUNC_TYPE_GENERAL
,
"nseq"
,
nseq_main
},
{
FUNC_TYPE_GENERAL
,
"nseq"
,
nseq_main
},
...
...
apps/progs.pl
浏览文件 @
340daf6a
...
@@ -32,7 +32,7 @@ foreach (@ARGV)
...
@@ -32,7 +32,7 @@ foreach (@ARGV)
push
(
@files
,
$_
);
push
(
@files
,
$_
);
$str
=
"
\t
{FUNC_TYPE_GENERAL,
\"
$_
\"
,
${_}
_main},
\n
";
$str
=
"
\t
{FUNC_TYPE_GENERAL,
\"
$_
\"
,
${_}
_main},
\n
";
if
((
$_
=~
/^s_/
)
||
(
$_
=~
/^ciphers$/
))
if
((
$_
=~
/^s_/
)
||
(
$_
=~
/^ciphers$/
))
{
print
"
#if !defined(OPENSSL_NO_SOCK)
&& !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
\n
${str}
#endif
\n
";
}
{
print
"
#if !defined(OPENSSL_NO_SOCK)
\n
${str}
#endif
\n
";
}
elsif
(
(
$_
=~
/^speed$/
))
elsif
(
(
$_
=~
/^speed$/
))
{
print
"
#ifndef OPENSSL_NO_SPEED
\n
${str}
#endif
\n
";
}
{
print
"
#ifndef OPENSSL_NO_SPEED
\n
${str}
#endif
\n
";
}
elsif
(
(
$_
=~
/^engine$/
))
elsif
(
(
$_
=~
/^engine$/
))
...
...
crypto/aes/asm/aesni-mb-x86_64.pl
浏览文件 @
340daf6a
...
@@ -63,8 +63,8 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
...
@@ -63,8 +63,8 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
$avx
=
(
$
1
>=
10
)
+
(
$
1
>=
11
);
$avx
=
(
$
1
>=
10
)
+
(
$
1
>=
11
);
}
}
if
(
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
LLVM
([3-9]\.[0-9]+)/
)
{
if
(
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
(^clang version|based on LLVM)
([3-9]\.[0-9]+)/
)
{
$avx
=
(
$
1
>=
3.0
)
+
(
$
1
>=
3.1
);
$avx
=
(
$
2
>=
3.0
)
+
(
$
2
>
3.0
);
}
}
open
OUT
,"
|
\"
$^X
\"
$xlate
$flavour
$output
";
open
OUT
,"
|
\"
$^X
\"
$xlate
$flavour
$output
";
...
...
crypto/aes/asm/aesni-sha1-x86_64.pl
浏览文件 @
340daf6a
...
@@ -94,7 +94,7 @@ $avx=1 if (!$avx && $win64 && ($flavour =~ /nasm/ || $ENV{ASM} =~ /nasm/) &&
...
@@ -94,7 +94,7 @@ $avx=1 if (!$avx && $win64 && ($flavour =~ /nasm/ || $ENV{ASM} =~ /nasm/) &&
$avx
=
1
if
(
!
$avx
&&
$win64
&&
(
$flavour
=~
/masm/
||
$ENV
{
ASM
}
=~
/ml64/
)
&&
$avx
=
1
if
(
!
$avx
&&
$win64
&&
(
$flavour
=~
/masm/
||
$ENV
{
ASM
}
=~
/ml64/
)
&&
`
ml64 2>&1
`
=~
/Version ([0-9]+)\./
&&
`
ml64 2>&1
`
=~
/Version ([0-9]+)\./
&&
$
1
>=
10
);
$
1
>=
10
);
$avx
=
1
if
(
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
LLVM ([3-9]\.[0-9]+)/
&&
$
1
>=
3.0
);
$avx
=
1
if
(
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
(^clang version|based on LLVM) ([3-9]\.[0-9]+)/
&&
$
2
>=
3.0
);
$shaext
=
1
;
### set to zero if compiling for 1.0.1
$shaext
=
1
;
### set to zero if compiling for 1.0.1
...
...
crypto/aes/asm/aesni-sha256-x86_64.pl
浏览文件 @
340daf6a
...
@@ -59,8 +59,8 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
...
@@ -59,8 +59,8 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
$avx
=
(
$
1
>=
10
)
+
(
$
1
>=
11
);
$avx
=
(
$
1
>=
10
)
+
(
$
1
>=
11
);
}
}
if
(
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
LLVM
([3-9]\.[0-9]+)/
)
{
if
(
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
(^clang version|based on LLVM)
([3-9]\.[0-9]+)/
)
{
$avx
=
(
$
1
>=
3.0
)
+
(
$
1
>=
3.1
);
$avx
=
(
$
2
>=
3.0
)
+
(
$
2
>
3.0
);
}
}
$shaext
=
$avx
;
### set to zero if compiling for 1.0.1
$shaext
=
$avx
;
### set to zero if compiling for 1.0.1
...
...
crypto/asn1/asn1_lib.c
浏览文件 @
340daf6a
...
@@ -170,14 +170,20 @@ static int asn1_get_length(const unsigned char **pp, int *inf, long *rl, int max
...
@@ -170,14 +170,20 @@ static int asn1_get_length(const unsigned char **pp, int *inf, long *rl, int max
i
=
*
p
&
0x7f
;
i
=
*
p
&
0x7f
;
if
(
*
(
p
++
)
&
0x80
)
if
(
*
(
p
++
)
&
0x80
)
{
{
if
(
max
<
(
int
)
i
)
return
0
;
/* Skip leading zeroes */
while
(
i
&&
*
p
==
0
)
{
p
++
;
i
--
;
}
if
(
i
>
sizeof
(
long
))
if
(
i
>
sizeof
(
long
))
return
0
;
return
0
;
if
(
max
--
==
0
)
return
(
0
);
while
(
i
--
>
0
)
while
(
i
--
>
0
)
{
{
ret
<<=
8L
;
ret
<<=
8L
;
ret
|=
*
(
p
++
);
ret
|=
*
(
p
++
);
if
(
max
--
==
0
)
return
(
0
);
}
}
}
}
else
else
...
...
crypto/bn/asm/rsaz-avx2.pl
浏览文件 @
340daf6a
...
@@ -93,9 +93,10 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
...
@@ -93,9 +93,10 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
$addx
=
(
$
1
>=
11
);
$addx
=
(
$
1
>=
11
);
}
}
if
(
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/LLVM ([3-9]\.[0-9]+)/
)
{
if
(
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/(^clang version|based on LLVM) ([3-9])\.([0-9]+)/
)
{
$avx
=
(
$
1
>=
3.0
)
+
(
$
1
>=
3.1
);
my
$ver
=
$
2
+
$
3
/
100.0
;
# 3.1->3.01, 3.10->3.10
$addx
=
0
;
$avx
=
(
$ver
>=
3.0
)
+
(
$ver
>=
3.01
);
$addx
=
(
$ver
>=
3.03
);
}
}
open
OUT
,"
| $^X
$xlate
$flavour
$output
";
open
OUT
,"
| $^X
$xlate
$flavour
$output
";
...
@@ -991,6 +992,7 @@ $code.=<<___;
...
@@ -991,6 +992,7 @@ $code.=<<___;
vmovdqu .Land_mask(%rip), $AND_MASK
vmovdqu .Land_mask(%rip), $AND_MASK
mov \$9, $i
mov \$9, $i
vmovdqu $ACC9, 32*9-128($rp) # $ACC9 is zero after vzeroall
jmp .Loop_mul_1024
jmp .Loop_mul_1024
.align 32
.align 32
...
...
crypto/bn/asm/rsaz-x86_64.pl
浏览文件 @
340daf6a
...
@@ -113,6 +113,11 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
...
@@ -113,6 +113,11 @@ if (!$addx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
$addx
=
(
$
1
>=
11
);
$addx
=
(
$
1
>=
11
);
}
}
if
(
!
$addx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/(^clang version|based on LLVM) ([3-9])\.([0-9]+)/
)
{
my
$ver
=
$
2
+
$
3
/
100.0
;
# 3.1->3.01, 3.10->3.10
$addx
=
(
$ver
>=
3.03
);
}
(
$out
,
$inp
,
$mod
)
=
("
%rdi
",
"
%rsi
",
"
%rbp
");
# common internal API
(
$out
,
$inp
,
$mod
)
=
("
%rdi
",
"
%rsi
",
"
%rbp
");
# common internal API
{
{
my
(
$out
,
$inp
,
$mod
,
$n0
,
$times
)
=
("
%rdi
","
%rsi
","
%rdx
","
%rcx
","
%r8d
");
my
(
$out
,
$inp
,
$mod
,
$n0
,
$times
)
=
("
%rdi
","
%rsi
","
%rdx
","
%rcx
","
%r8d
");
...
...
crypto/evp/evp_pbe.c
浏览文件 @
340daf6a
...
@@ -259,7 +259,7 @@ int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
...
@@ -259,7 +259,7 @@ int EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
{
{
int
cipher_nid
,
md_nid
;
int
cipher_nid
,
md_nid
;
if
(
cipher
)
if
(
cipher
)
cipher_nid
=
EVP_CIPHER_
type
(
cipher
);
cipher_nid
=
EVP_CIPHER_
nid
(
cipher
);
else
else
cipher_nid
=
-
1
;
cipher_nid
=
-
1
;
if
(
md
)
if
(
md
)
...
...
crypto/idea/ideatest.c
浏览文件 @
340daf6a
...
@@ -199,10 +199,10 @@ static int cfb64_test(unsigned char *cfb_cipher)
...
@@ -199,10 +199,10 @@ static int cfb64_test(unsigned char *cfb_cipher)
}
}
memcpy
(
cfb_tmp
,
cfb_iv
,
8
);
memcpy
(
cfb_tmp
,
cfb_iv
,
8
);
n
=
0
;
n
=
0
;
idea_cfb64_encrypt
(
cfb_buf1
,
cfb_buf2
,(
long
)
1
7
,
&
eks
,
idea_cfb64_encrypt
(
cfb_buf1
,
cfb_buf2
,(
long
)
1
3
,
&
eks
,
cfb_tmp
,
&
n
,
IDEA_DECRYPT
);
cfb_tmp
,
&
n
,
IDEA_DECRYPT
);
idea_cfb64_encrypt
(
&
(
cfb_buf1
[
1
7
]),
&
(
cfb_buf2
[
17
]),
idea_cfb64_encrypt
(
&
(
cfb_buf1
[
1
3
]),
&
(
cfb_buf2
[
13
]),
(
long
)
CFB_TEST_SIZE
-
1
7
,
&
d
ks
,
(
long
)
CFB_TEST_SIZE
-
1
3
,
&
e
ks
,
cfb_tmp
,
&
n
,
IDEA_DECRYPT
);
cfb_tmp
,
&
n
,
IDEA_DECRYPT
);
if
(
memcmp
(
plain
,
cfb_buf2
,
CFB_TEST_SIZE
)
!=
0
)
if
(
memcmp
(
plain
,
cfb_buf2
,
CFB_TEST_SIZE
)
!=
0
)
{
{
...
...
crypto/modes/asm/aesni-gcm-x86_64.pl
浏览文件 @
340daf6a
...
@@ -53,8 +53,8 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
...
@@ -53,8 +53,8 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
$avx
=
(
$
1
>=
10
)
+
(
$
1
>=
11
);
$avx
=
(
$
1
>=
10
)
+
(
$
1
>=
11
);
}
}
if
(
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
LLVM
([3-9]\.[0-9]+)/
)
{
if
(
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
(^clang version|based on LLVM)
([3-9]\.[0-9]+)/
)
{
$avx
=
(
$
1
>=
3.0
)
+
(
$
1
>=
3.1
);
$avx
=
(
$
2
>=
3.0
)
+
(
$
2
>
3.0
);
}
}
open
OUT
,"
|
\"
$^X
\"
$xlate
$flavour
$output
";
open
OUT
,"
|
\"
$^X
\"
$xlate
$flavour
$output
";
...
...
crypto/modes/asm/ghash-x86_64.pl
浏览文件 @
340daf6a
...
@@ -102,8 +102,8 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
...
@@ -102,8 +102,8 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
$avx
=
(
$
1
>=
10
)
+
(
$
1
>=
11
);
$avx
=
(
$
1
>=
10
)
+
(
$
1
>=
11
);
}
}
if
(
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
LLVM
([3-9]\.[0-9]+)/
)
{
if
(
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
(^clang version|based on LLVM)
([3-9]\.[0-9]+)/
)
{
$avx
=
(
$
1
>=
3.0
)
+
(
$
1
>=
3.1
);
$avx
=
(
$
2
>=
3.0
)
+
(
$
2
>
3.0
);
}
}
open
OUT
,"
|
\"
$^X
\"
$xlate
$flavour
$output
";
open
OUT
,"
|
\"
$^X
\"
$xlate
$flavour
$output
";
...
...
crypto/sha/asm/sha1-586.pl
浏览文件 @
340daf6a
...
@@ -128,8 +128,8 @@ $ymm=1 if ($xmm && !$ymm && $ARGV[0] eq "win32" &&
...
@@ -128,8 +128,8 @@ $ymm=1 if ($xmm && !$ymm && $ARGV[0] eq "win32" &&
`
ml 2>&1
`
=~
/Version ([0-9]+)\./
&&
`
ml 2>&1
`
=~
/Version ([0-9]+)\./
&&
$
1
>=
10
);
# first version supporting AVX
$
1
>=
10
);
# first version supporting AVX
$ymm
=
1
if
(
$xmm
&&
!
$ymm
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
LLVM
([3-9]\.[0-9]+)/
&&
$ymm
=
1
if
(
$xmm
&&
!
$ymm
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
(^clang version|based on LLVM)
([3-9]\.[0-9]+)/
&&
$
1
>=
3.0
);
# first version supporting AVX
$
2
>=
3.0
);
# first version supporting AVX
$shaext
=
$xmm
;
### set to zero if compiling for 1.0.1
$shaext
=
$xmm
;
### set to zero if compiling for 1.0.1
...
...
crypto/sha/asm/sha1-mb-x86_64.pl
浏览文件 @
340daf6a
...
@@ -58,8 +58,8 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
...
@@ -58,8 +58,8 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
$avx
=
(
$
1
>=
10
)
+
(
$
1
>=
11
);
$avx
=
(
$
1
>=
10
)
+
(
$
1
>=
11
);
}
}
if
(
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
LLVM
([3-9]\.[0-9]+)/
)
{
if
(
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
(^clang version|based on LLVM)
([3-9]\.[0-9]+)/
)
{
$avx
=
(
$
1
>=
3.0
)
+
(
$
1
>=
3.1
);
$avx
=
(
$
2
>=
3.0
)
+
(
$
2
>
3.0
);
}
}
open
OUT
,"
|
\"
$^X
\"
$xlate
$flavour
$output
";
open
OUT
,"
|
\"
$^X
\"
$xlate
$flavour
$output
";
...
...
crypto/sha/asm/sha1-x86_64.pl
浏览文件 @
340daf6a
...
@@ -107,8 +107,8 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
...
@@ -107,8 +107,8 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
$avx
=
(
$
1
>=
10
)
+
(
$
1
>=
11
);
$avx
=
(
$
1
>=
10
)
+
(
$
1
>=
11
);
}
}
if
(
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
LLVM
([2-9]\.[0-9]+)/
)
{
if
(
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
(^clang version|based on LLVM)
([2-9]\.[0-9]+)/
)
{
$avx
=
(
$
1
>=
3.0
)
+
(
$
1
>=
3.1
);
$avx
=
(
$
2
>=
3.0
)
+
(
$
2
>
3.0
);
}
}
$shaext
=
1
;
### set to zero if compiling for 1.0.1
$shaext
=
1
;
### set to zero if compiling for 1.0.1
...
...
crypto/sha/asm/sha256-586.pl
浏览文件 @
340daf6a
...
@@ -82,8 +82,8 @@ if ($xmm && !$avx && $ARGV[0] eq "win32" &&
...
@@ -82,8 +82,8 @@ if ($xmm && !$avx && $ARGV[0] eq "win32" &&
$avx
=
(
$
1
>=
10
)
+
(
$
1
>=
11
);
$avx
=
(
$
1
>=
10
)
+
(
$
1
>=
11
);
}
}
if
(
$xmm
&&
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
LLVM
([3-9]\.[0-9]+)/
)
{
if
(
$xmm
&&
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
(^clang version|based on LLVM)
([3-9]\.[0-9]+)/
)
{
$avx
=
(
$
1
>=
3.0
)
+
(
$
1
>=
3.1
);
$avx
=
(
$
2
>=
3.0
)
+
(
$
2
>
3.0
);
}
}
$shaext
=
$xmm
;
### set to zero if compiling for 1.0.1
$shaext
=
$xmm
;
### set to zero if compiling for 1.0.1
...
...
crypto/sha/asm/sha256-mb-x86_64.pl
浏览文件 @
340daf6a
...
@@ -59,8 +59,8 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
...
@@ -59,8 +59,8 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
$avx
=
(
$
1
>=
10
)
+
(
$
1
>=
11
);
$avx
=
(
$
1
>=
10
)
+
(
$
1
>=
11
);
}
}
if
(
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
LLVM
([3-9]\.[0-9]+)/
)
{
if
(
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
(^clang version|based on LLVM)
([3-9]\.[0-9]+)/
)
{
$avx
=
(
$
1
>=
3.0
)
+
(
$
1
>=
3.1
);
$avx
=
(
$
2
>=
3.0
)
+
(
$
2
>
3.0
);
}
}
open
OUT
,"
|
\"
$^X
\"
$xlate
$flavour
$output
";
open
OUT
,"
|
\"
$^X
\"
$xlate
$flavour
$output
";
...
...
crypto/sha/asm/sha512-x86_64.pl
浏览文件 @
340daf6a
...
@@ -123,8 +123,8 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
...
@@ -123,8 +123,8 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
$avx
=
(
$
1
>=
10
)
+
(
$
1
>=
11
);
$avx
=
(
$
1
>=
10
)
+
(
$
1
>=
11
);
}
}
if
(
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
LLVM
([3-9]\.[0-9]+)/
)
{
if
(
!
$avx
&&
`
$ENV
{CC} -v 2>&1
`
=~
/
(^clang version|based on LLVM)
([3-9]\.[0-9]+)/
)
{
$avx
=
(
$
1
>=
3.0
)
+
(
$
1
>=
3.1
);
$avx
=
(
$
2
>=
3.0
)
+
(
$
2
>
3.0
);
}
}
$shaext
=
1
;
### set to zero if compiling for 1.0.1
$shaext
=
1
;
### set to zero if compiling for 1.0.1
...
...
doc/crypto/BIO_push.pod
浏览文件 @
340daf6a
...
@@ -40,7 +40,7 @@ If the call:
...
@@ -40,7 +40,7 @@ If the call:
BIO_push(b64, f);
BIO_push(b64, f);
is made then the new chain will be B<b64-
chain
>. After making the calls
is made then the new chain will be B<b64-
f
>. After making the calls
BIO_push(md2, b64);
BIO_push(md2, b64);
BIO_push(md1, md2);
BIO_push(md1, md2);
...
...
doc/ssl/SSL_CTX_new.pod
浏览文件 @
340daf6a
...
@@ -62,22 +62,36 @@ SSLv3 client hello messages.
...
@@ -62,22 +62,36 @@ SSLv3 client hello messages.
=item SSLv23_method(void), SSLv23_server_method(void), SSLv23_client_method(void)
=item SSLv23_method(void), SSLv23_server_method(void), SSLv23_client_method(void)
A TLS/SSL connection established with these methods will understand the SSLv2,
A TLS/SSL connection established with these methods may understand the SSLv2,
SSLv3, and TLSv1 protocol. A client will send out SSLv2 client hello messages
SSLv3, TLSv1, TLSv1.1 and TLSv1.2 protocols.
and will indicate that it also understands SSLv3 and TLSv1. A server will
understand SSLv2, SSLv3, and TLSv1 client hello messages. This is the best
If the cipher list does not contain any SSLv2 ciphersuites (the default
choice when compatibility is a concern.
cipher list does not) or extensions are required (for example server name)
a client will send out TLSv1 client hello messages including extensions and
will indicate that it also understands TLSv1.1, TLSv1.2 and permits a
fallback to SSLv3. A server will support SSLv3, TLSv1, TLSv1.1 and TLSv1.2
protocols. This is the best choice when compatibility is a concern.
If any SSLv2 ciphersuites are included in the cipher list and no extensions
are required then SSLv2 compatible client hellos will be used by clients and
SSLv2 will be accepted by servers. This is B<not> recommended due to the
insecurity of SSLv2 and the limited nature of the SSLv2 client hello
prohibiting the use of extensions.
=back
=back
The list of protocols available can later be limited using the SSL_OP_NO_SSLv2,
The list of protocols available can later be limited using the SSL_OP_NO_SSLv2,
SSL_OP_NO_SSLv3, SSL_OP_NO_TLSv1 options of the B<SSL_CTX_set_options()> or
SSL_OP_NO_SSLv3, SSL_OP_NO_TLSv1, SSL_OP_NO_TLSv1_1 and SSL_OP_NO_TLSv1_2
B<SSL_set_options()> functions. Using these options it is possible to choose
options of the SSL_CTX_set_options() or SSL_set_options() functions.
e.g. SSLv23_server_method() and be able to negotiate with all possible
Using these options it is possible to choose e.g. SSLv23_server_method() and
clients, but to only allow newer protocols like SSLv3 or TLSv1.
be able to negotiate with all possible clients, but to only allow newer
protocols like TLSv1, TLSv1.1 or TLS v1.2.
Applications which never want to support SSLv2 (even is the cipher string
is configured to use SSLv2 ciphersuites) can set SSL_OP_NO_SSLv2.
SSL_CTX_new() initializes the list of ciphers, the session cache setting,
SSL_CTX_new() initializes the list of ciphers, the session cache setting,
the callbacks, the keys and certificates
,
and the options to its default
the callbacks, the keys and certificates and the options to its default
values.
values.
=head1 RETURN VALUES
=head1 RETURN VALUES
...
...
doc/ssl/SSL_CTX_set_cipher_list.pod
浏览文件 @
340daf6a
...
@@ -54,6 +54,10 @@ of 512 bits and the server is not configured to use temporary RSA
...
@@ -54,6 +54,10 @@ of 512 bits and the server is not configured to use temporary RSA
keys), the "no shared cipher" (SSL_R_NO_SHARED_CIPHER) error is generated
keys), the "no shared cipher" (SSL_R_NO_SHARED_CIPHER) error is generated
and the handshake will fail.
and the handshake will fail.
If the cipher list does not contain any SSLv2 cipher suites (this is the
default) then SSLv2 is effectively disabled and neither clients nor servers
will attempt to use SSLv2.
=head1 RETURN VALUES
=head1 RETURN VALUES
SSL_CTX_set_cipher_list() and SSL_set_cipher_list() return 1 if any cipher
SSL_CTX_set_cipher_list() and SSL_set_cipher_list() return 1 if any cipher
...
...
ssl/s3_pkt.c
浏览文件 @
340daf6a
...
@@ -1247,7 +1247,7 @@ int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek)
...
@@ -1247,7 +1247,7 @@ int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek)
if
(
!
ssl3_setup_read_buffer
(
s
))
if
(
!
ssl3_setup_read_buffer
(
s
))
return
(
-
1
);
return
(
-
1
);
if
((
type
&&
(
type
!=
SSL3_RT_APPLICATION_DATA
)
&&
(
type
!=
SSL3_RT_HANDSHAKE
)
&&
type
)
||
if
((
type
&&
(
type
!=
SSL3_RT_APPLICATION_DATA
)
&&
(
type
!=
SSL3_RT_HANDSHAKE
))
||
(
peek
&&
(
type
!=
SSL3_RT_APPLICATION_DATA
)))
(
peek
&&
(
type
!=
SSL3_RT_APPLICATION_DATA
)))
{
{
SSLerr
(
SSL_F_SSL3_READ_BYTES
,
ERR_R_INTERNAL_ERROR
);
SSLerr
(
SSL_F_SSL3_READ_BYTES
,
ERR_R_INTERNAL_ERROR
);
...
...
ssl/ssl_stat.c
浏览文件 @
340daf6a
...
@@ -220,7 +220,6 @@ case SSL3_ST_SR_SUPPLEMENTAL_DATA_A: str="SSLv3 server read supplemental data A"
...
@@ -220,7 +220,6 @@ case SSL3_ST_SR_SUPPLEMENTAL_DATA_A: str="SSLv3 server read supplemental data A"
case
SSL3_ST_SR_SUPPLEMENTAL_DATA_B
:
str
=
"SSLv3 client read supplemental data B"
;
break
;
case
SSL3_ST_SR_SUPPLEMENTAL_DATA_B
:
str
=
"SSLv3 client read supplemental data B"
;
break
;
#endif
#endif
#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
/* SSLv2/v3 compatibility states */
/* SSLv2/v3 compatibility states */
/* client */
/* client */
case
SSL23_ST_CW_CLNT_HELLO_A
:
str
=
"SSLv2/v3 write client hello A"
;
break
;
case
SSL23_ST_CW_CLNT_HELLO_A
:
str
=
"SSLv2/v3 write client hello A"
;
break
;
...
@@ -230,7 +229,6 @@ case SSL23_ST_CR_SRVR_HELLO_B: str="SSLv2/v3 read server hello B"; break;
...
@@ -230,7 +229,6 @@ case SSL23_ST_CR_SRVR_HELLO_B: str="SSLv2/v3 read server hello B"; break;
/* server */
/* server */
case
SSL23_ST_SR_CLNT_HELLO_A
:
str
=
"SSLv2/v3 read client hello A"
;
break
;
case
SSL23_ST_SR_CLNT_HELLO_A
:
str
=
"SSLv2/v3 read client hello A"
;
break
;
case
SSL23_ST_SR_CLNT_HELLO_B
:
str
=
"SSLv2/v3 read client hello B"
;
break
;
case
SSL23_ST_SR_CLNT_HELLO_B
:
str
=
"SSLv2/v3 read client hello B"
;
break
;
#endif
/* DTLS */
/* DTLS */
case
DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A
:
str
=
"DTLS1 read hello verify request A"
;
break
;
case
DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A
:
str
=
"DTLS1 read hello verify request A"
;
break
;
...
@@ -374,7 +372,6 @@ case SSL3_ST_SR_CERT_VRFY_A: str="3RCV_A"; break;
...
@@ -374,7 +372,6 @@ case SSL3_ST_SR_CERT_VRFY_A: str="3RCV_A"; break;
case
SSL3_ST_SR_CERT_VRFY_B
:
str
=
"3RCV_B"
;
break
;
case
SSL3_ST_SR_CERT_VRFY_B
:
str
=
"3RCV_B"
;
break
;
#endif
#endif
#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
/* SSLv2/v3 compatibility states */
/* SSLv2/v3 compatibility states */
/* client */
/* client */
case
SSL23_ST_CW_CLNT_HELLO_A
:
str
=
"23WCHA"
;
break
;
case
SSL23_ST_CW_CLNT_HELLO_A
:
str
=
"23WCHA"
;
break
;
...
@@ -384,7 +381,7 @@ case SSL23_ST_CR_SRVR_HELLO_B: str="23RSHA"; break;
...
@@ -384,7 +381,7 @@ case SSL23_ST_CR_SRVR_HELLO_B: str="23RSHA"; break;
/* server */
/* server */
case
SSL23_ST_SR_CLNT_HELLO_A
:
str
=
"23RCHA"
;
break
;
case
SSL23_ST_SR_CLNT_HELLO_A
:
str
=
"23RCHA"
;
break
;
case
SSL23_ST_SR_CLNT_HELLO_B
:
str
=
"23RCHB"
;
break
;
case
SSL23_ST_SR_CLNT_HELLO_B
:
str
=
"23RCHB"
;
break
;
#endif
/* DTLS */
/* DTLS */
case
DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A
:
str
=
"DRCHVA"
;
break
;
case
DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A
:
str
=
"DRCHVA"
;
break
;
case
DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B
:
str
=
"DRCHVB"
;
break
;
case
DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B
:
str
=
"DRCHVB"
;
break
;
...
...
ssl/t1_enc.c
浏览文件 @
340daf6a
...
@@ -1165,7 +1165,7 @@ int tls1_export_keying_material(SSL *s, unsigned char *out, size_t olen,
...
@@ -1165,7 +1165,7 @@ int tls1_export_keying_material(SSL *s, unsigned char *out, size_t olen,
int
rv
;
int
rv
;
#ifdef KSSL_DEBUG
#ifdef KSSL_DEBUG
printf
(
"tls1_export_keying_material(%p,%p,%d,%s,%d,%p,%d)
\n
"
,
s
,
out
,
olen
,
label
,
llen
,
p
,
p
len
);
printf
(
"tls1_export_keying_material(%p,%p,%d,%s,%d,%p,%d)
\n
"
,
s
,
out
,
olen
,
label
,
llen
,
context
,
context
len
);
#endif
/* KSSL_DEBUG */
#endif
/* KSSL_DEBUG */
buff
=
OPENSSL_malloc
(
olen
);
buff
=
OPENSSL_malloc
(
olen
);
...
...
ssl/t1_lib.c
浏览文件 @
340daf6a
...
@@ -3455,7 +3455,11 @@ static int tls_decrypt_ticket(SSL *s, const unsigned char *etick, int eticklen,
...
@@ -3455,7 +3455,11 @@ static int tls_decrypt_ticket(SSL *s, const unsigned char *etick, int eticklen,
}
}
EVP_DecryptUpdate
(
&
ctx
,
sdec
,
&
slen
,
p
,
eticklen
);
EVP_DecryptUpdate
(
&
ctx
,
sdec
,
&
slen
,
p
,
eticklen
);
if
(
EVP_DecryptFinal
(
&
ctx
,
sdec
+
slen
,
&
mlen
)
<=
0
)
if
(
EVP_DecryptFinal
(
&
ctx
,
sdec
+
slen
,
&
mlen
)
<=
0
)
{
EVP_CIPHER_CTX_cleanup
(
&
ctx
);
OPENSSL_free
(
sdec
);
return
2
;
return
2
;
}
slen
+=
mlen
;
slen
+=
mlen
;
EVP_CIPHER_CTX_cleanup
(
&
ctx
);
EVP_CIPHER_CTX_cleanup
(
&
ctx
);
p
=
sdec
;
p
=
sdec
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录