Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
9725bda7
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看板
提交
9725bda7
编写于
9月 24, 2013
作者:
B
Ben Laurie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Show useful errors.
Conflicts: apps/s_server.c
上级
3cd8547a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
15 addition
and
4 deletion
+15
-4
apps/s_server.c
apps/s_server.c
+3
-0
ssl/ssl.h
ssl/ssl.h
+4
-0
ssl/ssl_err.c
ssl/ssl_err.c
+4
-0
ssl/ssl_rsa.c
ssl/ssl_rsa.c
+4
-4
未找到文件。
apps/s_server.c
浏览文件 @
9725bda7
...
...
@@ -1970,7 +1970,10 @@ bad:
#ifndef OPENSSL_NO_TLSEXT
if
(
s_serverinfo_file
!=
NULL
&&
!
SSL_CTX_use_serverinfo_file
(
ctx
,
s_serverinfo_file
))
{
ERR_print_errors
(
bio_err
);
goto
end
;
}
if
(
c_auth
)
{
SSL_CTX_set_custom_srv_ext
(
ctx
,
TLSEXT_TYPE_client_authz
,
authz_tlsext_cb
,
authz_tlsext_generate_cb
,
bio_err
);
...
...
ssl/ssl.h
浏览文件 @
9725bda7
...
...
@@ -2749,6 +2749,7 @@ void ERR_load_SSL_strings(void);
#define SSL_R_BAD_AUTHENTICATION_TYPE 102
#define SSL_R_BAD_CHANGE_CIPHER_SPEC 103
#define SSL_R_BAD_CHECKSUM 104
#define SSL_R_BAD_DATA 390
#define SSL_R_BAD_DATA_RETURNED_BY_CALLBACK 106
#define SSL_R_BAD_DECOMPRESSION 107
#define SSL_R_BAD_DH_G_LENGTH 108
...
...
@@ -2897,6 +2898,7 @@ void ERR_load_SSL_strings(void);
#define SSL_R_NO_COMPRESSION_SPECIFIED 187
#define SSL_R_NO_GOST_CERTIFICATE_SENT_BY_PEER 330
#define SSL_R_NO_METHOD_SPECIFIED 188
#define SSL_R_NO_PEM_EXTENSIONS 389
#define SSL_R_NO_PRIVATEKEY 189
#define SSL_R_NO_PRIVATE_KEY_ASSIGNED 190
#define SSL_R_NO_PROTOCOLS_AVAILABLE 191
...
...
@@ -2924,6 +2926,8 @@ void ERR_load_SSL_strings(void);
#define SSL_R_PEER_ERROR_NO_CERTIFICATE 202
#define SSL_R_PEER_ERROR_NO_CIPHER 203
#define SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE 204
#define SSL_R_PEM_NAME_BAD_PREFIX 391
#define SSL_R_PEM_NAME_TOO_SHORT 392
#define SSL_R_PRE_MAC_LENGTH_TOO_LONG 205
#define SSL_R_PROBLEMS_MAPPING_CIPHER_FUNCTIONS 206
#define SSL_R_PROTOCOL_IS_SHUTDOWN 207
...
...
ssl/ssl_err.c
浏览文件 @
9725bda7
...
...
@@ -313,6 +313,7 @@ static ERR_STRING_DATA SSL_str_reasons[]=
{
ERR_REASON
(
SSL_R_BAD_AUTHENTICATION_TYPE
),
"bad authentication type"
},
{
ERR_REASON
(
SSL_R_BAD_CHANGE_CIPHER_SPEC
),
"bad change cipher spec"
},
{
ERR_REASON
(
SSL_R_BAD_CHECKSUM
)
,
"bad checksum"
},
{
ERR_REASON
(
SSL_R_BAD_DATA
)
,
"bad data"
},
{
ERR_REASON
(
SSL_R_BAD_DATA_RETURNED_BY_CALLBACK
),
"bad data returned by callback"
},
{
ERR_REASON
(
SSL_R_BAD_DECOMPRESSION
)
,
"bad decompression"
},
{
ERR_REASON
(
SSL_R_BAD_DH_G_LENGTH
)
,
"bad dh g length"
},
...
...
@@ -461,6 +462,7 @@ static ERR_STRING_DATA SSL_str_reasons[]=
{
ERR_REASON
(
SSL_R_NO_COMPRESSION_SPECIFIED
),
"no compression specified"
},
{
ERR_REASON
(
SSL_R_NO_GOST_CERTIFICATE_SENT_BY_PEER
),
"Peer haven't sent GOST certificate, required for selected ciphersuite"
},
{
ERR_REASON
(
SSL_R_NO_METHOD_SPECIFIED
)
,
"no method specified"
},
{
ERR_REASON
(
SSL_R_NO_PEM_EXTENSIONS
)
,
"no pem extensions"
},
{
ERR_REASON
(
SSL_R_NO_PRIVATEKEY
)
,
"no privatekey"
},
{
ERR_REASON
(
SSL_R_NO_PRIVATE_KEY_ASSIGNED
),
"no private key assigned"
},
{
ERR_REASON
(
SSL_R_NO_PROTOCOLS_AVAILABLE
),
"no protocols available"
},
...
...
@@ -488,6 +490,8 @@ static ERR_STRING_DATA SSL_str_reasons[]=
{
ERR_REASON
(
SSL_R_PEER_ERROR_NO_CERTIFICATE
),
"peer error no certificate"
},
{
ERR_REASON
(
SSL_R_PEER_ERROR_NO_CIPHER
)
,
"peer error no cipher"
},
{
ERR_REASON
(
SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE
),
"peer error unsupported certificate type"
},
{
ERR_REASON
(
SSL_R_PEM_NAME_BAD_PREFIX
)
,
"pem name bad prefix"
},
{
ERR_REASON
(
SSL_R_PEM_NAME_TOO_SHORT
)
,
"pem name too short"
},
{
ERR_REASON
(
SSL_R_PRE_MAC_LENGTH_TOO_LONG
),
"pre mac length too long"
},
{
ERR_REASON
(
SSL_R_PROBLEMS_MAPPING_CIPHER_FUNCTIONS
),
"problems mapping cipher functions"
},
{
ERR_REASON
(
SSL_R_PROTOCOL_IS_SHUTDOWN
)
,
"protocol is shutdown"
},
...
...
ssl/ssl_rsa.c
浏览文件 @
9725bda7
...
...
@@ -1012,7 +1012,7 @@ int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file)
/* There must be at least one extension in this file */
if
(
num_extensions
==
0
)
{
SSLerr
(
SSL_F_SSL_CTX_USE_SERVERINFO_FILE
,
ERR_R_PEM_LIB
);
SSLerr
(
SSL_F_SSL_CTX_USE_SERVERINFO_FILE
,
SSL_R_NO_PEM_EXTENSIONS
);
goto
end
;
}
else
/* End of file, we're done */
...
...
@@ -1021,18 +1021,18 @@ int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file)
/* Check that PEM name starts with "BEGIN SERVERINFO FOR " */
if
(
strlen
(
name
)
<
strlen
(
namePrefix
))
{
SSLerr
(
SSL_F_SSL_CTX_USE_SERVERINFO_FILE
,
ERR_R_PEM_LIB
);
SSLerr
(
SSL_F_SSL_CTX_USE_SERVERINFO_FILE
,
SSL_R_PEM_NAME_TOO_SHORT
);
goto
end
;
}
if
(
strncmp
(
name
,
namePrefix
,
strlen
(
namePrefix
))
!=
0
)
{
SSLerr
(
SSL_F_SSL_CTX_USE_SERVERINFO_FILE
,
ERR_R_PEM_LIB
);
SSLerr
(
SSL_F_SSL_CTX_USE_SERVERINFO_FILE
,
SSL_R_PEM_NAME_BAD_PREFIX
);
goto
end
;
}
/* Check that the decoded PEM data is plausible (valid length field) */
if
(
extension_length
<
4
||
(
extension
[
2
]
<<
8
)
+
extension
[
3
]
!=
extension_length
-
4
)
{
SSLerr
(
SSL_F_SSL_CTX_USE_SERVERINFO_FILE
,
ERR_R_PEM_LIB
);
SSLerr
(
SSL_F_SSL_CTX_USE_SERVERINFO_FILE
,
SSL_R_BAD_DATA
);
goto
end
;
}
/* Append the decoded extension to the serverinfo buffer */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录