Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
253e893c
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看板
提交
253e893c
编写于
9月 27, 2003
作者:
R
Richard Levitte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Include the instance in the Kerberos ticket information.
In s_server, print the received Kerberos information. PR: 693
上级
0ad2c4f8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
34 addition
and
11 deletion
+34
-11
apps/s_server.c
apps/s_server.c
+7
-1
ssl/kssl.c
ssl/kssl.c
+26
-9
ssl/kssl.h
ssl/kssl.h
+1
-1
未找到文件。
apps/s_server.c
浏览文件 @
253e893c
...
...
@@ -1347,7 +1347,13 @@ static int init_ssl_connection(SSL *con)
if
(
SSL_ctrl
(
con
,
SSL_CTRL_GET_FLAGS
,
0
,
NULL
)
&
TLS1_FLAGS_TLS_PADDING_BUG
)
BIO_printf
(
bio_s_out
,
"Peer has incorrect TLSv1 block padding
\n
"
);
#ifndef OPENSSL_NO_KRB5
if
(
con
->
kssl_ctx
->
client_princ
!=
NULL
)
{
BIO_printf
(
bio_s_out
,
"Kerberos peer principal is %s
\n
"
,
con
->
kssl_ctx
->
client_princ
);
}
#endif
/* OPENSSL_NO_KRB5 */
return
(
1
);
}
...
...
ssl/kssl.c
浏览文件 @
253e893c
...
...
@@ -1496,8 +1496,9 @@ kssl_sget_tkt( /* UPDATE */ KSSL_CTX *kssl_ctx,
"bad ticket from krb5_rd_req.
\n
"
);
}
else
if
(
kssl_ctx_setprinc
(
kssl_ctx
,
KSSL_CLIENT
,
&
krb5ticket
->
enc_part2
->
client
->
realm
,
krb5ticket
->
enc_part2
->
client
->
data
))
&
krb5ticket
->
enc_part2
->
client
->
realm
,
krb5ticket
->
enc_part2
->
client
->
data
,
krb5ticket
->
enc_part2
->
client
->
length
))
{
kssl_err_set
(
kssl_err
,
SSL_R_KRB5_S_BAD_TICKET
,
"kssl_ctx_setprinc() fails.
\n
"
);
...
...
@@ -1564,16 +1565,17 @@ kssl_ctx_free(KSSL_CTX *kssl_ctx)
}
/* Given a (krb5_data *) entity (and optional realm),
/* Given a
n array of
(krb5_data *) entity (and optional realm),
** set the plain (char *) client_princ or service_host member
** of the kssl_ctx struct.
*/
krb5_error_code
kssl_ctx_setprinc
(
KSSL_CTX
*
kssl_ctx
,
int
which
,
krb5_data
*
realm
,
krb5_data
*
entity
)
krb5_data
*
realm
,
krb5_data
*
entity
,
int
nentities
)
{
char
**
princ
;
int
length
;
int
i
;
if
(
kssl_ctx
==
NULL
||
entity
==
NULL
)
return
KSSL_CTX_ERR
;
...
...
@@ -1585,18 +1587,33 @@ kssl_ctx_setprinc(KSSL_CTX *kssl_ctx, int which,
}
if
(
*
princ
)
free
(
*
princ
);
length
=
entity
->
length
+
((
realm
)
?
realm
->
length
+
2
:
1
);
/* Add up all the entity->lengths */
length
=
0
;
for
(
i
=
0
;
i
<
nentities
;
i
++
)
{
length
+=
entity
[
i
].
length
;
}
/* Add in space for the '/' character(s) (if any) */
length
+=
nentities
-
1
;
/* Space for the ('@'+realm+NULL | NULL) */
length
+=
((
realm
)
?
realm
->
length
+
2
:
1
);
if
((
*
princ
=
calloc
(
1
,
length
))
==
NULL
)
return
KSSL_CTX_ERR
;
else
{
strncpy
(
*
princ
,
entity
->
data
,
entity
->
length
);
(
*
princ
)[
entity
->
length
]
=
'\0'
;
{
for
(
i
=
0
;
i
<
nentities
;
i
++
)
{
strncat
(
*
princ
,
entity
[
i
].
data
,
entity
[
i
].
length
);
if
(
i
<
nentities
-
1
)
{
strcat
(
*
princ
,
"/"
);
}
}
if
(
realm
)
{
strcat
(
*
princ
,
"@"
);
(
void
)
strncat
(
*
princ
,
realm
->
data
,
realm
->
length
);
(
*
princ
)[
entity
->
length
+
1
+
realm
->
length
]
=
'\0'
;
}
}
...
...
ssl/kssl.h
浏览文件 @
253e893c
...
...
@@ -149,7 +149,7 @@ KSSL_CTX *kssl_ctx_new(void);
KSSL_CTX
*
kssl_ctx_free
(
KSSL_CTX
*
kssl_ctx
);
void
kssl_ctx_show
(
KSSL_CTX
*
kssl_ctx
);
krb5_error_code
kssl_ctx_setprinc
(
KSSL_CTX
*
kssl_ctx
,
int
which
,
krb5_data
*
realm
,
krb5_data
*
entity
);
krb5_data
*
realm
,
krb5_data
*
entity
,
int
nentities
);
krb5_error_code
kssl_cget_tkt
(
KSSL_CTX
*
kssl_ctx
,
krb5_data
**
enc_tktp
,
krb5_data
*
authenp
,
KSSL_ERR
*
kssl_err
);
krb5_error_code
kssl_sget_tkt
(
KSSL_CTX
*
kssl_ctx
,
krb5_data
*
indata
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录