Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
d5bbead4
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看板
提交
d5bbead4
编写于
10月 14, 2008
作者:
B
Ben Laurie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add XMPP STARTTLS support.
上级
0f7efbc8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
31 addition
and
2 deletion
+31
-2
CHANGES
CHANGES
+3
-0
apps/s_client.c
apps/s_client.c
+28
-2
未找到文件。
CHANGES
浏览文件 @
d5bbead4
...
...
@@ -722,6 +722,9 @@
Changes between 0.9.8i and 0.9.8j [xx XXX xxxx]
*) Add support for XMPP STARTTLS in s_client.
[Philip Paeps <philip@freebsd.org>]
*) Change the server-side SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG behavior
to ensure that even with this option, only ciphersuites in the
server's preference list will be accepted. (Note that the option
...
...
apps/s_client.c
浏览文件 @
d5bbead4
...
...
@@ -325,7 +325,8 @@ static void sc_usage(void)
BIO_printf
(
bio_err
,
" -starttls prot - use the STARTTLS command before starting TLS
\n
"
);
BIO_printf
(
bio_err
,
" for those protocols that support it, where
\n
"
);
BIO_printf
(
bio_err
,
" 'prot' defines which one to assume. Currently,
\n
"
);
BIO_printf
(
bio_err
,
" only
\"
smtp
\"
,
\"
pop3
\"
,
\"
imap
\"
, and
\"
ftp
\"
are supported.
\n
"
);
BIO_printf
(
bio_err
,
" only
\"
smtp
\"
,
\"
pop3
\"
,
\"
imap
\"
,
\"
ftp
\"
and
\"
xmpp
\"\n
"
);
BIO_printf
(
bio_err
,
" are supported.
\n
"
);
#ifndef OPENSSL_NO_ENGINE
BIO_printf
(
bio_err
,
" -engine id - Initialise and use the specified engine
\n
"
);
#endif
...
...
@@ -368,7 +369,8 @@ enum
PROTO_SMTP
,
PROTO_POP3
,
PROTO_IMAP
,
PROTO_FTP
PROTO_FTP
,
PROTO_XMPP
,
};
int
MAIN
(
int
,
char
**
);
...
...
@@ -664,6 +666,8 @@ int MAIN(int argc, char **argv)
starttls_proto
=
PROTO_IMAP
;
else
if
(
strcmp
(
*
argv
,
"ftp"
)
==
0
)
starttls_proto
=
PROTO_FTP
;
else
if
(
strcmp
(
*
argv
,
"xmpp"
)
==
0
)
starttls_proto
=
PROTO_XMPP
;
else
goto
bad
;
}
...
...
@@ -1118,6 +1122,28 @@ SSL_set_tlsext_status_ids(con, ids);
BIO_printf
(
sbio
,
"AUTH TLS
\r\n
"
);
BIO_read
(
sbio
,
sbuf
,
BUFSIZZ
);
}
if
(
starttls_proto
==
PROTO_XMPP
)
{
int
seen
=
0
;
BIO_printf
(
sbio
,
"<stream:stream "
"xmlns:stream='http://etherx.jabber.org/streams' "
"xmlns='jabber:client' to='%s' version='1.0'>"
,
host
);
seen
=
BIO_read
(
sbio
,
mbuf
,
BUFSIZZ
);
mbuf
[
seen
]
=
0
;
while
(
!
strstr
(
mbuf
,
"<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'"
))
{
if
(
strstr
(
mbuf
,
"/stream:features>"
))
goto
shut
;
seen
=
BIO_read
(
sbio
,
mbuf
,
BUFSIZZ
);
mbuf
[
seen
]
=
0
;
}
BIO_printf
(
sbio
,
"<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>"
);
seen
=
BIO_read
(
sbio
,
sbuf
,
BUFSIZZ
);
sbuf
[
seen
]
=
0
;
if
(
!
strstr
(
sbuf
,
"<proceed"
))
goto
shut
;
mbuf
[
0
]
=
0
;
}
for
(;;)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录