Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
2b8fa1d5
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看板
提交
2b8fa1d5
编写于
3月 02, 2016
作者:
K
Kurt Roeckx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Deprecate the use of version-specific methods
Reviewed-by:
N
Viktor Dukhovni
<
viktor@openssl.org
>
MR: #1824
上级
885e601d
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
191 addition
and
64 deletion
+191
-64
doc/ssl/SSL_CTX_new.pod
doc/ssl/SSL_CTX_new.pod
+3
-1
include/openssl/ssl.h
include/openssl/ssl.h
+18
-18
ssl/methods.c
ssl/methods.c
+144
-37
ssl/ssl_lib.c
ssl/ssl_lib.c
+1
-1
ssl/ssl_locl.h
ssl/ssl_locl.h
+19
-1
ssl/statem/statem_lib.c
ssl/statem/statem_lib.c
+6
-6
未找到文件。
doc/ssl/SSL_CTX_new.pod
浏览文件 @
2b8fa1d5
...
...
@@ -92,7 +92,7 @@ These are the general-purpose I<version-flexible> SSL/TLS methods.
The actual protocol version used will be negotiated to the highest version
mutually supported by the client and the server.
The supported protocols are SSLv3, TLSv1, TLSv1.1 and TLSv1.2.
Most applications should use these method, and avoid the version
specific
Applications should use these methods, and avoid the version-
specific
methods described below.
=item SSLv23_method(), SSLv23_server_method(), SSLv23_client_method()
...
...
@@ -196,6 +196,8 @@ SSLv23_method(), SSLv23_server_method() and SSLv23_client_method()
were deprecated and the preferred TLS_method(), TLS_server_method()
and TLS_client_method() functions were introduced in OpenSSL 1.1.0.
All version-specific methods were deprecated in OpenSSL 1.1.0.
=head1 SEE ALSO
L<SSL_CTX_set_options(3)>, L<SSL_CTX_free(3)>, L<SSL_accept(3)>,
...
...
include/openssl/ssl.h
浏览文件 @
2b8fa1d5
...
...
@@ -1642,9 +1642,9 @@ __owur const char *SSL_get_version(const SSL *s);
__owur
int
SSL_CTX_set_ssl_version
(
SSL_CTX
*
ctx
,
const
SSL_METHOD
*
meth
);
# ifndef OPENSSL_NO_SSL3_METHOD
__owur
const
SSL_METHOD
*
SSLv3_method
(
void
);
/* SSLv3 */
__owur
const
SSL_METHOD
*
SSLv3_server_method
(
void
);
/* SSLv3 */
__owur
const
SSL_METHOD
*
SSLv3_client_method
(
void
);
/* SSLv3 */
DEPRECATEDIN_1_1_0
(
__owur
const
SSL_METHOD
*
SSLv3_method
(
void
))
/* SSLv3 */
DEPRECATEDIN_1_1_0
(
__owur
const
SSL_METHOD
*
SSLv3_server_method
(
void
))
/* SSLv3 */
DEPRECATEDIN_1_1_0
(
__owur
const
SSL_METHOD
*
SSLv3_client_method
(
void
))
/* SSLv3 */
# endif
#define SSLv23_method TLS_method
...
...
@@ -1657,33 +1657,33 @@ __owur const SSL_METHOD *TLS_server_method(void);
__owur
const
SSL_METHOD
*
TLS_client_method
(
void
);
# ifndef OPENSSL_NO_TLS1_METHOD
__owur
const
SSL_METHOD
*
TLSv1_method
(
void
);
/* TLSv1.0 */
__owur
const
SSL_METHOD
*
TLSv1_server_method
(
void
);
/* TLSv1.0 */
__owur
const
SSL_METHOD
*
TLSv1_client_method
(
void
);
/* TLSv1.0 */
DEPRECATEDIN_1_1_0
(
__owur
const
SSL_METHOD
*
TLSv1_method
(
void
))
/* TLSv1.0 */
DEPRECATEDIN_1_1_0
(
__owur
const
SSL_METHOD
*
TLSv1_server_method
(
void
))
/* TLSv1.0 */
DEPRECATEDIN_1_1_0
(
__owur
const
SSL_METHOD
*
TLSv1_client_method
(
void
))
/* TLSv1.0 */
# endif
# ifndef OPENSSL_NO_TLS1_1_METHOD
__owur
const
SSL_METHOD
*
TLSv1_1_method
(
void
);
/* TLSv1.1 */
__owur
const
SSL_METHOD
*
TLSv1_1_server_method
(
void
);
/* TLSv1.1 */
__owur
const
SSL_METHOD
*
TLSv1_1_client_method
(
void
);
/* TLSv1.1 */
DEPRECATEDIN_1_1_0
(
__owur
const
SSL_METHOD
*
TLSv1_1_method
(
void
))
/* TLSv1.1 */
DEPRECATEDIN_1_1_0
(
__owur
const
SSL_METHOD
*
TLSv1_1_server_method
(
void
))
/* TLSv1.1 */
DEPRECATEDIN_1_1_0
(
__owur
const
SSL_METHOD
*
TLSv1_1_client_method
(
void
))
/* TLSv1.1 */
# endif
# ifndef OPENSSL_NO_TLS1_2_METHOD
__owur
const
SSL_METHOD
*
TLSv1_2_method
(
void
);
/* TLSv1.2 */
__owur
const
SSL_METHOD
*
TLSv1_2_server_method
(
void
);
/* TLSv1.2 */
__owur
const
SSL_METHOD
*
TLSv1_2_client_method
(
void
);
/* TLSv1.2 */
DEPRECATEDIN_1_1_0
(
__owur
const
SSL_METHOD
*
TLSv1_2_method
(
void
))
/* TLSv1.2 */
DEPRECATEDIN_1_1_0
(
__owur
const
SSL_METHOD
*
TLSv1_2_server_method
(
void
))
/* TLSv1.2 */
DEPRECATEDIN_1_1_0
(
__owur
const
SSL_METHOD
*
TLSv1_2_client_method
(
void
))
/* TLSv1.2 */
# endif
# ifndef OPENSSL_NO_DTLS1_METHOD
__owur
const
SSL_METHOD
*
DTLSv1_method
(
void
);
/* DTLSv1.0 */
__owur
const
SSL_METHOD
*
DTLSv1_server_method
(
void
);
/* DTLSv1.0 */
__owur
const
SSL_METHOD
*
DTLSv1_client_method
(
void
);
/* DTLSv1.0 */
DEPRECATEDIN_1_1_0
(
__owur
const
SSL_METHOD
*
DTLSv1_method
(
void
))
/* DTLSv1.0 */
DEPRECATEDIN_1_1_0
(
__owur
const
SSL_METHOD
*
DTLSv1_server_method
(
void
))
/* DTLSv1.0 */
DEPRECATEDIN_1_1_0
(
__owur
const
SSL_METHOD
*
DTLSv1_client_method
(
void
))
/* DTLSv1.0 */
# endif
# ifndef OPENSSL_NO_DTLS1_2_METHOD
__owur
const
SSL_METHOD
*
DTLSv1_2_method
(
void
);
/* DTLSv1.2 */
__owur
const
SSL_METHOD
*
DTLSv1_2_server_method
(
void
);
/* DTLSv1.2 */
__owur
const
SSL_METHOD
*
DTLSv1_2_client_method
(
void
);
/* DTLSv1.2 */
DEPRECATEDIN_1_1_0
(
__owur
const
SSL_METHOD
*
DTLSv1_2_method
(
void
))
/* DTLSv1.2 */
DEPRECATEDIN_1_1_0
(
__owur
const
SSL_METHOD
*
DTLSv1_2_server_method
(
void
))
/* DTLSv1.2 */
DEPRECATEDIN_1_1_0
(
__owur
const
SSL_METHOD
*
DTLSv1_2_client_method
(
void
))
/* DTLSv1.2 */
#endif
__owur
const
SSL_METHOD
*
DTLS_method
(
void
);
/* DTLS 1.0 and 1.2 */
...
...
ssl/methods.c
浏览文件 @
2b8fa1d5
...
...
@@ -107,7 +107,7 @@
* Hudson (tjh@cryptsoft.com).
*
*/
#include <stdio.h>
#include <openssl/objects.h>
#include "ssl_locl.h"
...
...
@@ -122,19 +122,19 @@ static const SSL_METHOD *tls1_get_method(int ver)
return
TLS_method
();
#ifndef OPENSSL_NO_TLS1_2
if
(
ver
==
TLS1_2_VERSION
)
return
TLS
v1_2_method
();
return
tls
v1_2_method
();
#endif
#ifndef OPENSSL_NO_TLS1_1
if
(
ver
==
TLS1_1_VERSION
)
return
TLS
v1_1_method
();
return
tls
v1_1_method
();
#endif
#ifndef OPENSSL_NO_TLS1
if
(
ver
==
TLS1_VERSION
)
return
TLS
v1_method
();
return
tls
v1_method
();
#endif
#ifndef OPENSSL_NO_SSL3
if
(
ver
==
SSL3_VERSION
)
return
(
SSL
v3_method
());
return
(
ssl
v3_method
());
else
#endif
return
NULL
;
...
...
@@ -147,27 +147,27 @@ IMPLEMENT_tls_meth_func(TLS_ANY_VERSION, 0, 0,
#ifndef OPENSSL_NO_TLS1_2_METHOD
IMPLEMENT_tls_meth_func
(
TLS1_2_VERSION
,
0
,
SSL_OP_NO_TLSv1_2
,
TLS
v1_2_method
,
tls
v1_2_method
,
ossl_statem_accept
,
ossl_statem_connect
,
tls1_get_method
,
TLSv1_2_enc_data
)
#endif
#ifndef OPENSSL_NO_TLS1_1_METHOD
IMPLEMENT_tls_meth_func
(
TLS1_1_VERSION
,
SSL_METHOD_NO_SUITEB
,
SSL_OP_NO_TLSv1_1
,
TLS
v1_1_method
,
tls
v1_1_method
,
ossl_statem_accept
,
ossl_statem_connect
,
tls1_get_method
,
TLSv1_1_enc_data
)
#endif
#ifndef OPENSSL_NO_TLS1_METHOD
IMPLEMENT_tls_meth_func
(
TLS1_VERSION
,
SSL_METHOD_NO_SUITEB
,
SSL_OP_NO_TLSv1
,
TLS
v1_method
,
tls
v1_method
,
ossl_statem_accept
,
ossl_statem_connect
,
tls1_get_method
,
TLSv1_enc_data
)
#endif
#ifndef OPENSSL_NO_SSL3_METHOD
IMPLEMENT_ssl3_meth_func
(
SSL
v3_method
,
ossl_statem_accept
,
ossl_statem_connect
,
IMPLEMENT_ssl3_meth_func
(
ssl
v3_method
,
ossl_statem_accept
,
ossl_statem_connect
,
tls1_get_method
)
#endif
...
...
@@ -182,19 +182,19 @@ static const SSL_METHOD *tls1_get_server_method(int ver)
return
TLS_server_method
();
#ifndef OPENSSL_NO_TLS1_2
if
(
ver
==
TLS1_2_VERSION
)
return
TLS
v1_2_server_method
();
return
tls
v1_2_server_method
();
#endif
#ifndef OPENSSL_NO_TLS1_1
if
(
ver
==
TLS1_1_VERSION
)
return
TLS
v1_1_server_method
();
return
tls
v1_1_server_method
();
#endif
#ifndef OPENSSL_NO_TLS1
if
(
ver
==
TLS1_VERSION
)
return
TLS
v1_server_method
();
return
tls
v1_server_method
();
#endif
#ifndef OPENSSL_NO_SSL3
if
(
ver
==
SSL3_VERSION
)
return
(
SSL
v3_server_method
());
return
(
ssl
v3_server_method
());
#endif
return
NULL
;
}
...
...
@@ -207,7 +207,7 @@ IMPLEMENT_tls_meth_func(TLS_ANY_VERSION, 0, 0,
#ifndef OPENSSL_NO_TLS1_2_METHOD
IMPLEMENT_tls_meth_func
(
TLS1_2_VERSION
,
0
,
SSL_OP_NO_TLSv1_2
,
TLS
v1_2_server_method
,
tls
v1_2_server_method
,
ossl_statem_accept
,
ssl_undefined_function
,
tls1_get_server_method
,
TLSv1_2_enc_data
)
...
...
@@ -215,7 +215,7 @@ IMPLEMENT_tls_meth_func(TLS1_2_VERSION, 0, SSL_OP_NO_TLSv1_2,
#ifndef OPENSSL_NO_TLS1_1_METHOD
IMPLEMENT_tls_meth_func
(
TLS1_1_VERSION
,
SSL_METHOD_NO_SUITEB
,
SSL_OP_NO_TLSv1_1
,
TLS
v1_1_server_method
,
tls
v1_1_server_method
,
ossl_statem_accept
,
ssl_undefined_function
,
tls1_get_server_method
,
TLSv1_1_enc_data
)
...
...
@@ -223,14 +223,14 @@ IMPLEMENT_tls_meth_func(TLS1_1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_TLSv1_1,
#ifndef OPENSSL_NO_TLS1_METHOD
IMPLEMENT_tls_meth_func
(
TLS1_VERSION
,
SSL_METHOD_NO_SUITEB
,
SSL_OP_NO_TLSv1
,
TLS
v1_server_method
,
tls
v1_server_method
,
ossl_statem_accept
,
ssl_undefined_function
,
tls1_get_server_method
,
TLSv1_enc_data
)
#endif
#ifndef OPENSSL_NO_SSL3_METHOD
IMPLEMENT_ssl3_meth_func
(
SSL
v3_server_method
,
IMPLEMENT_ssl3_meth_func
(
ssl
v3_server_method
,
ossl_statem_accept
,
ssl_undefined_function
,
tls1_get_server_method
)
#endif
...
...
@@ -246,19 +246,19 @@ static const SSL_METHOD *tls1_get_client_method(int ver)
return
TLS_client_method
();
#ifndef OPENSSL_NO_TLS1_2
if
(
ver
==
TLS1_2_VERSION
)
return
TLS
v1_2_client_method
();
return
tls
v1_2_client_method
();
#endif
#ifndef OPENSSL_NO_TLS1_1
if
(
ver
==
TLS1_1_VERSION
)
return
TLS
v1_1_client_method
();
return
tls
v1_1_client_method
();
#endif
#ifndef OPENSSL_NO_TLS1
if
(
ver
==
TLS1_VERSION
)
return
TLS
v1_client_method
();
return
tls
v1_client_method
();
#endif
#ifndef OPENSSL_NO_SSL3
if
(
ver
==
SSL3_VERSION
)
return
(
SSL
v3_client_method
());
return
(
ssl
v3_client_method
());
#endif
return
NULL
;
}
...
...
@@ -271,7 +271,7 @@ IMPLEMENT_tls_meth_func(TLS_ANY_VERSION, 0, 0,
#ifndef OPENSSL_NO_TLS1_2_METHOD
IMPLEMENT_tls_meth_func
(
TLS1_2_VERSION
,
0
,
SSL_OP_NO_TLSv1_2
,
TLS
v1_2_client_method
,
tls
v1_2_client_method
,
ssl_undefined_function
,
ossl_statem_connect
,
tls1_get_client_method
,
TLSv1_2_enc_data
)
...
...
@@ -279,7 +279,7 @@ IMPLEMENT_tls_meth_func(TLS1_2_VERSION, 0, SSL_OP_NO_TLSv1_2,
#ifndef OPENSSL_NO_TLS1_1_METHOD
IMPLEMENT_tls_meth_func
(
TLS1_1_VERSION
,
SSL_METHOD_NO_SUITEB
,
SSL_OP_NO_TLSv1_1
,
TLS
v1_1_client_method
,
tls
v1_1_client_method
,
ssl_undefined_function
,
ossl_statem_connect
,
tls1_get_client_method
,
TLSv1_1_enc_data
)
...
...
@@ -287,14 +287,14 @@ IMPLEMENT_tls_meth_func(TLS1_1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_TLSv1_1,
#ifndef OPENSSL_NO_TLS1_METHOD
IMPLEMENT_tls_meth_func
(
TLS1_VERSION
,
SSL_METHOD_NO_SUITEB
,
SSL_OP_NO_TLSv1
,
TLS
v1_client_method
,
tls
v1_client_method
,
ssl_undefined_function
,
ossl_statem_connect
,
tls1_get_client_method
,
TLSv1_enc_data
)
#endif
#ifndef OPENSSL_NO_SSL3_METHOD
IMPLEMENT_ssl3_meth_func
(
SSL
v3_client_method
,
IMPLEMENT_ssl3_meth_func
(
ssl
v3_client_method
,
ssl_undefined_function
,
ossl_statem_connect
,
tls1_get_client_method
)
#endif
...
...
@@ -309,11 +309,11 @@ static const SSL_METHOD *dtls1_get_method(int ver)
return
DTLS_method
();
#ifndef OPENSSL_NO_DTLS1
else
if
(
ver
==
DTLS1_VERSION
)
return
DTLS
v1_method
();
return
dtls
v1_method
();
#endif
#ifndef OPENSSL_NO_DTLS1_2
else
if
(
ver
==
DTLS1_2_VERSION
)
return
DTLS
v1_2_method
();
return
dtls
v1_2_method
();
#endif
else
return
NULL
;
...
...
@@ -321,7 +321,7 @@ static const SSL_METHOD *dtls1_get_method(int ver)
#ifndef OPENSSL_NO_DTLS1_METHOD
IMPLEMENT_dtls1_meth_func
(
DTLS1_VERSION
,
SSL_METHOD_NO_SUITEB
,
SSL_OP_NO_DTLSv1
,
DTLS
v1_method
,
dtls
v1_method
,
ossl_statem_accept
,
ossl_statem_connect
,
dtls1_get_method
,
DTLSv1_enc_data
)
...
...
@@ -329,7 +329,7 @@ IMPLEMENT_dtls1_meth_func(DTLS1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_DTLSv1,
#ifndef OPENSSL_NO_DTLS1_2_METHOD
IMPLEMENT_dtls1_meth_func
(
DTLS1_2_VERSION
,
0
,
SSL_OP_NO_DTLSv1_2
,
DTLS
v1_2_method
,
dtls
v1_2_method
,
ossl_statem_accept
,
ossl_statem_connect
,
dtls1_get_method
,
DTLSv1_2_enc_data
)
...
...
@@ -351,11 +351,11 @@ static const SSL_METHOD *dtls1_get_server_method(int ver)
return
DTLS_server_method
();
#ifndef OPENSSL_NO_DTLS1
else
if
(
ver
==
DTLS1_VERSION
)
return
DTLS
v1_server_method
();
return
dtls
v1_server_method
();
#endif
#ifndef OPENSSL_NO_DTLS1_2
else
if
(
ver
==
DTLS1_2_VERSION
)
return
DTLS
v1_2_server_method
();
return
dtls
v1_2_server_method
();
#endif
else
return
NULL
;
...
...
@@ -363,7 +363,7 @@ static const SSL_METHOD *dtls1_get_server_method(int ver)
#ifndef OPENSSL_NO_DTLS1_METHOD
IMPLEMENT_dtls1_meth_func
(
DTLS1_VERSION
,
SSL_METHOD_NO_SUITEB
,
SSL_OP_NO_DTLSv1
,
DTLS
v1_server_method
,
dtls
v1_server_method
,
ossl_statem_accept
,
ssl_undefined_function
,
dtls1_get_server_method
,
DTLSv1_enc_data
)
...
...
@@ -371,7 +371,7 @@ IMPLEMENT_dtls1_meth_func(DTLS1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_DTLSv1,
#ifndef OPENSSL_NO_DTLS1_2_METHOD
IMPLEMENT_dtls1_meth_func
(
DTLS1_2_VERSION
,
0
,
SSL_OP_NO_DTLSv1_2
,
DTLS
v1_2_server_method
,
dtls
v1_2_server_method
,
ossl_statem_accept
,
ssl_undefined_function
,
dtls1_get_server_method
,
DTLSv1_2_enc_data
)
...
...
@@ -394,11 +394,11 @@ static const SSL_METHOD *dtls1_get_client_method(int ver)
return
DTLS_client_method
();
#ifndef OPENSSL_NO_DTLS1
else
if
(
ver
==
DTLS1_VERSION
||
ver
==
DTLS1_BAD_VER
)
return
DTLS
v1_client_method
();
return
dtls
v1_client_method
();
#endif
#ifndef OPENSSL_NO_DTLS1_2
else
if
(
ver
==
DTLS1_2_VERSION
)
return
DTLS
v1_2_client_method
();
return
dtls
v1_2_client_method
();
#endif
else
return
NULL
;
...
...
@@ -406,7 +406,7 @@ static const SSL_METHOD *dtls1_get_client_method(int ver)
#ifndef OPENSSL_NO_DTLS1_METHOD
IMPLEMENT_dtls1_meth_func
(
DTLS1_VERSION
,
SSL_METHOD_NO_SUITEB
,
SSL_OP_NO_DTLSv1
,
DTLS
v1_client_method
,
dtls
v1_client_method
,
ssl_undefined_function
,
ossl_statem_connect
,
dtls1_get_client_method
,
DTLSv1_enc_data
)
...
...
@@ -414,7 +414,7 @@ IMPLEMENT_dtls1_meth_func(DTLS1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_DTLSv1,
#ifndef OPENSSL_NO_DTLS1_2_METHOD
IMPLEMENT_dtls1_meth_func
(
DTLS1_2_VERSION
,
0
,
SSL_OP_NO_DTLSv1_2
,
DTLS
v1_2_client_method
,
dtls
v1_2_client_method
,
ssl_undefined_function
,
ossl_statem_connect
,
dtls1_get_client_method
,
DTLSv1_2_enc_data
)
...
...
@@ -425,3 +425,110 @@ IMPLEMENT_dtls1_meth_func(DTLS_ANY_VERSION, 0, 0,
ssl_undefined_function
,
ossl_statem_connect
,
dtls1_get_client_method
,
DTLSv1_2_enc_data
)
#if OPENSSL_API_COMPAT < 0x10100000L
# ifndef OPENSSL_NO_TLS1_2_METHOD
const
SSL_METHOD
*
TLSv1_2_method
(
void
)
{
return
tlsv1_2_method
();
}
const
SSL_METHOD
*
TLSv1_2_server_method
(
void
)
{
return
tlsv1_2_server_method
();
}
const
SSL_METHOD
*
TLSv1_2_client_method
(
void
)
{
return
tlsv1_2_client_method
();
}
# endif
# ifndef OPENSSL_NO_TLS1_1_METHOD
const
SSL_METHOD
*
TLSv1_1_method
(
void
)
{
return
tlsv1_1_method
();
}
const
SSL_METHOD
*
TLSv1_1_server_method
(
void
)
{
return
tlsv1_1_server_method
();
}
const
SSL_METHOD
*
TLSv1_1_client_method
(
void
)
{
return
tlsv1_1_client_method
();
}
# endif
# ifndef OPENSSL_NO_TLS1_METHOD
const
SSL_METHOD
*
TLSv1_method
(
void
)
{
return
tlsv1_method
();
}
const
SSL_METHOD
*
TLSv1_server_method
(
void
)
{
return
tlsv1_server_method
();
}
const
SSL_METHOD
*
TLSv1_client_method
(
void
)
{
return
tlsv1_client_method
();
}
# endif
# ifndef OPENSSL_NO_SSL3_METHOD
const
SSL_METHOD
*
SSLv3_method
(
void
)
{
return
sslv3_method
();
}
const
SSL_METHOD
*
SSLv3_server_method
(
void
)
{
return
sslv3_server_method
();
}
const
SSL_METHOD
*
SSLv3_client_method
(
void
)
{
return
sslv3_client_method
();
}
# endif
# ifndef OPENSSL_NO_DTLS1_2_METHOD
const
SSL_METHOD
*
DTLSv1_2_method
(
void
)
{
return
dtlsv1_2_method
();
}
const
SSL_METHOD
*
DTLSv1_2_server_method
(
void
)
{
return
dtlsv1_2_server_method
();
}
const
SSL_METHOD
*
DTLSv1_2_client_method
(
void
)
{
return
dtlsv1_2_client_method
();
}
# endif
# ifndef OPENSSL_NO_DTLS1_METHOD
const
SSL_METHOD
*
DTLSv1_method
(
void
)
{
return
dtlsv1_method
();
}
const
SSL_METHOD
*
DTLSv1_server_method
(
void
)
{
return
dtlsv1_server_method
();
}
const
SSL_METHOD
*
DTLSv1_client_method
(
void
)
{
return
dtlsv1_client_method
();
}
# endif
#endif
ssl/ssl_lib.c
浏览文件 @
2b8fa1d5
...
...
@@ -3054,7 +3054,7 @@ int ssl_undefined_const_function(const SSL *s)
return
(
0
);
}
SSL_METHOD
*
ssl_bad_method
(
int
ver
)
const
SSL_METHOD
*
ssl_bad_method
(
int
ver
)
{
SSLerr
(
SSL_F_SSL_BAD_METHOD
,
ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED
);
return
(
NULL
);
...
...
ssl/ssl_locl.h
浏览文件 @
2b8fa1d5
...
...
@@ -1734,7 +1734,25 @@ typedef struct ssl3_comp_st {
extern
SSL3_ENC_METHOD
ssl3_undef_enc_method
;
SSL_METHOD
*
ssl_bad_method
(
int
ver
);
__owur
const
SSL_METHOD
*
ssl_bad_method
(
int
ver
);
__owur
const
SSL_METHOD
*
sslv3_method
(
void
);
__owur
const
SSL_METHOD
*
sslv3_server_method
(
void
);
__owur
const
SSL_METHOD
*
sslv3_client_method
(
void
);
__owur
const
SSL_METHOD
*
tlsv1_method
(
void
);
__owur
const
SSL_METHOD
*
tlsv1_server_method
(
void
);
__owur
const
SSL_METHOD
*
tlsv1_client_method
(
void
);
__owur
const
SSL_METHOD
*
tlsv1_1_method
(
void
);
__owur
const
SSL_METHOD
*
tlsv1_1_server_method
(
void
);
__owur
const
SSL_METHOD
*
tlsv1_1_client_method
(
void
);
__owur
const
SSL_METHOD
*
tlsv1_2_method
(
void
);
__owur
const
SSL_METHOD
*
tlsv1_2_server_method
(
void
);
__owur
const
SSL_METHOD
*
tlsv1_2_client_method
(
void
);
__owur
const
SSL_METHOD
*
dtlsv1_method
(
void
);
__owur
const
SSL_METHOD
*
dtlsv1_server_method
(
void
);
__owur
const
SSL_METHOD
*
dtlsv1_client_method
(
void
);
__owur
const
SSL_METHOD
*
dtlsv1_2_method
(
void
);
__owur
const
SSL_METHOD
*
dtlsv1_2_server_method
(
void
);
__owur
const
SSL_METHOD
*
dtlsv1_2_client_method
(
void
);
extern
const
SSL3_ENC_METHOD
TLSv1_enc_data
;
extern
const
SSL3_ENC_METHOD
TLSv1_1_enc_data
;
...
...
ssl/statem/statem_lib.c
浏览文件 @
2b8fa1d5
...
...
@@ -716,22 +716,22 @@ typedef struct {
static
const
version_info
tls_version_table
[]
=
{
#ifndef OPENSSL_NO_TLS1_2
{
TLS1_2_VERSION
,
TLSv1_2_client_method
,
TLS
v1_2_server_method
},
{
TLS1_2_VERSION
,
tlsv1_2_client_method
,
tls
v1_2_server_method
},
#else
{
TLS1_2_VERSION
,
NULL
,
NULL
},
#endif
#ifndef OPENSSL_NO_TLS1_1
{
TLS1_1_VERSION
,
TLSv1_1_client_method
,
TLS
v1_1_server_method
},
{
TLS1_1_VERSION
,
tlsv1_1_client_method
,
tls
v1_1_server_method
},
#else
{
TLS1_1_VERSION
,
NULL
,
NULL
},
#endif
#ifndef OPENSSL_NO_TLS1
{
TLS1_VERSION
,
TLSv1_client_method
,
TLS
v1_server_method
},
{
TLS1_VERSION
,
tlsv1_client_method
,
tls
v1_server_method
},
#else
{
TLS1_VERSION
,
NULL
,
NULL
},
#endif
#ifndef OPENSSL_NO_SSL3
{
SSL3_VERSION
,
SSLv3_client_method
,
SSL
v3_server_method
},
{
SSL3_VERSION
,
sslv3_client_method
,
ssl
v3_server_method
},
#else
{
SSL3_VERSION
,
NULL
,
NULL
},
#endif
...
...
@@ -744,12 +744,12 @@ static const version_info tls_version_table[] = {
static
const
version_info
dtls_version_table
[]
=
{
#ifndef OPENSSL_NO_DTLS1_2
{
DTLS1_2_VERSION
,
DTLSv1_2_client_method
,
DTLS
v1_2_server_method
},
{
DTLS1_2_VERSION
,
dtlsv1_2_client_method
,
dtls
v1_2_server_method
},
#else
{
DTLS1_2_VERSION
,
NULL
,
NULL
},
#endif
#ifndef OPENSSL_NO_DTLS1
{
DTLS1_VERSION
,
DTLSv1_client_method
,
DTLS
v1_server_method
},
{
DTLS1_VERSION
,
dtlsv1_client_method
,
dtls
v1_server_method
},
#else
{
DTLS1_VERSION
,
NULL
,
NULL
},
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录