Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
20b431e3
O
openssl
项目概览
btwise
/
openssl
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
20b431e3
编写于
11月 22, 2012
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add support for printing out and retrieving EC point formats extension.
上级
e83aefb3
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
64 addition
and
0 deletion
+64
-0
CHANGES
CHANGES
+4
-0
apps/s_apps.h
apps/s_apps.h
+1
-0
apps/s_cb.c
apps/s_cb.c
+41
-0
apps/s_server.c
apps/s_server.c
+1
-0
ssl/s3_lib.c
ssl/s3_lib.c
+13
-0
ssl/ssl.h
ssl/ssl.h
+4
-0
未找到文件。
CHANGES
浏览文件 @
20b431e3
...
...
@@ -4,6 +4,10 @@
Changes between 1.0.x and 1.1.0 [xx XXX xxxx]
*) New ctrl and macro to retrieve supported points extensions.
Print out extension in s_server.
[Steve Henson]
*) New function ASN1_TIME_diff to calculate the difference between two
ASN1_TIME structures or one structure and the current time.
[Steve Henson]
...
...
apps/s_apps.h
浏览文件 @
20b431e3
...
...
@@ -161,6 +161,7 @@ int set_cert_key_and_authz(SSL_CTX *ctx, X509 *cert, EVP_PKEY *key,
unsigned
char
*
authz
,
size_t
authz_length
);
# endif
int
ssl_print_sigalgs
(
BIO
*
out
,
SSL
*
s
);
int
ssl_print_point_formats
(
BIO
*
out
,
SSL
*
s
);
int
ssl_print_curves
(
BIO
*
out
,
SSL
*
s
,
int
noshared
);
#endif
int
ssl_print_tmp_key
(
BIO
*
out
,
SSL
*
s
);
...
...
apps/s_cb.c
浏览文件 @
20b431e3
...
...
@@ -424,6 +424,44 @@ int ssl_print_sigalgs(BIO *out, SSL *s)
return
1
;
}
int
ssl_print_point_formats
(
BIO
*
out
,
SSL
*
s
)
{
int
i
,
nformats
;
const
char
*
pformats
;
nformats
=
SSL_get0_ec_point_formats
(
s
,
&
pformats
);
if
(
nformats
<=
0
)
return
1
;
BIO_puts
(
out
,
"Supported Elliptic Curve Point Formats: "
);
for
(
i
=
0
;
i
<
nformats
;
i
++
,
pformats
++
)
{
if
(
i
)
BIO_puts
(
out
,
":"
);
switch
(
*
pformats
)
{
case
TLSEXT_ECPOINTFORMAT_uncompressed
:
BIO_puts
(
out
,
"uncompressed"
);
break
;
case
TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime
:
BIO_puts
(
out
,
"ansiX962_compressed_prime"
);
break
;
case
TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2
:
BIO_puts
(
out
,
"ansiX962_compressed_char2"
);
break
;
default:
BIO_printf
(
out
,
"unknown(%d)"
,
(
int
)
*
pformats
);
break
;
}
}
if
(
nformats
<=
0
)
BIO_puts
(
out
,
"NONE"
);
BIO_puts
(
out
,
"
\n
"
);
return
1
;
}
int
ssl_print_curves
(
BIO
*
out
,
SSL
*
s
,
int
noshared
)
{
int
i
,
ncurves
,
*
curves
,
nid
;
...
...
@@ -1528,7 +1566,10 @@ void print_ssl_summary(BIO *bio, SSL *s)
if
(
peer
)
X509_free
(
peer
);
if
(
SSL_is_server
(
s
))
{
ssl_print_point_formats
(
bio
,
s
);
ssl_print_curves
(
bio
,
s
,
1
);
}
else
ssl_print_tmp_key
(
bio
,
s
);
}
...
...
apps/s_server.c
浏览文件 @
20b431e3
...
...
@@ -2558,6 +2558,7 @@ static int init_ssl_connection(SSL *con)
BIO_printf
(
bio_s_out
,
"Shared ciphers:%s
\n
"
,
buf
);
str
=
SSL_CIPHER_get_name
(
SSL_get_current_cipher
(
con
));
ssl_print_sigalgs
(
bio_s_out
,
con
);
ssl_print_point_formats
(
bio_s_out
,
con
);
ssl_print_curves
(
bio_s_out
,
con
,
0
);
BIO_printf
(
bio_s_out
,
"CIPHER is %s
\n
"
,(
str
!=
NULL
)
?
str
:
"(NONE)"
);
...
...
ssl/s3_lib.c
浏览文件 @
20b431e3
...
...
@@ -3530,6 +3530,19 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg)
return
0
;
}
case
SSL_CTRL_GET_EC_POINT_FORMATS
:
if
(
!
s
->
server
)
return
0
;
else
{
SSL_SESSION
*
sess
=
s
->
session
;
const
unsigned
char
**
pformat
=
parg
;
if
(
!
sess
||
!
sess
->
tlsext_ecpointformatlist
)
return
0
;
*
pformat
=
sess
->
tlsext_ecpointformatlist
;
return
(
int
)
sess
->
tlsext_ecpointformatlist_length
;
}
default:
break
;
}
...
...
ssl/ssl.h
浏览文件 @
20b431e3
...
...
@@ -1720,6 +1720,7 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION)
#define SSL_CTRL_GET_PEER_SIGNATURE_NID 108
#define SSL_CTRL_GET_SERVER_TMP_KEY 109
#define SSL_CTRL_GET_RAW_CIPHERLIST 110
#define SSL_CTRL_GET_EC_POINT_FORMATS 111
#define DTLSv1_get_timeout(ssl, arg) \
SSL_ctrl(ssl,DTLS_CTRL_GET_TIMEOUT,0, (void *)arg)
...
...
@@ -1853,6 +1854,9 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION)
#define SSL_get0_raw_cipherlist(s, plst) \
SSL_ctrl(s,SSL_CTRL_GET_RAW_CIPHERLIST,0,plst)
#define SSL_get0_ec_point_formats(s, plst) \
SSL_ctrl(s,SSL_CTRL_GET_EC_POINT_FORMATS,0,plst)
#ifndef OPENSSL_NO_BIO
BIO_METHOD
*
BIO_f_ssl
(
void
);
BIO
*
BIO_new_ssl
(
SSL_CTX
*
ctx
,
int
client
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录