Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
6f4a6a5c
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,发现更多精彩内容 >>
提交
6f4a6a5c
编写于
6月 24, 2016
作者:
R
Rich Salz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
RT4586: Remove RSA_memory_lock; unused, not needed
Reviewed-by:
N
Ben Laurie
<
ben@openssl.org
>
上级
56add338
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
0 addition
and
50 deletion
+0
-50
crypto/rsa/rsa_err.c
crypto/rsa/rsa_err.c
+0
-1
crypto/rsa/rsa_lib.c
crypto/rsa/rsa_lib.c
+0
-44
include/openssl/rsa.h
include/openssl/rsa.h
+0
-4
util/libcrypto.num
util/libcrypto.num
+0
-1
未找到文件。
crypto/rsa/rsa_err.c
浏览文件 @
6f4a6a5c
...
...
@@ -32,7 +32,6 @@ static ERR_STRING_DATA RSA_str_functs[] = {
{
ERR_FUNC
(
RSA_F_RSA_CHECK_KEY_EX
),
"RSA_check_key_ex"
},
{
ERR_FUNC
(
RSA_F_RSA_CMS_DECRYPT
),
"rsa_cms_decrypt"
},
{
ERR_FUNC
(
RSA_F_RSA_ITEM_VERIFY
),
"rsa_item_verify"
},
{
ERR_FUNC
(
RSA_F_RSA_MEMORY_LOCK
),
"RSA_memory_lock"
},
{
ERR_FUNC
(
RSA_F_RSA_METH_DUP
),
"RSA_meth_dup"
},
{
ERR_FUNC
(
RSA_F_RSA_METH_NEW
),
"RSA_meth_new"
},
{
ERR_FUNC
(
RSA_F_RSA_METH_SET1_NAME
),
"RSA_meth_set1_name"
},
...
...
crypto/rsa/rsa_lib.c
浏览文件 @
6f4a6a5c
...
...
@@ -180,50 +180,6 @@ void *RSA_get_ex_data(const RSA *r, int idx)
return
(
CRYPTO_get_ex_data
(
&
r
->
ex_data
,
idx
));
}
int
RSA_memory_lock
(
RSA
*
r
)
{
int
i
,
j
,
k
,
off
;
char
*
p
;
BIGNUM
*
bn
,
**
t
[
6
],
*
b
;
BN_ULONG
*
ul
;
if
(
r
->
d
==
NULL
)
return
(
1
);
t
[
0
]
=
&
r
->
d
;
t
[
1
]
=
&
r
->
p
;
t
[
2
]
=
&
r
->
q
;
t
[
3
]
=
&
r
->
dmp1
;
t
[
4
]
=
&
r
->
dmq1
;
t
[
5
]
=
&
r
->
iqmp
;
k
=
bn_sizeof_BIGNUM
()
*
6
;
off
=
k
/
sizeof
(
BN_ULONG
)
+
1
;
j
=
1
;
for
(
i
=
0
;
i
<
6
;
i
++
)
j
+=
bn_get_top
(
*
t
[
i
]);
if
((
p
=
OPENSSL_malloc
((
off
+
j
)
*
sizeof
(
*
p
)))
==
NULL
)
{
RSAerr
(
RSA_F_RSA_MEMORY_LOCK
,
ERR_R_MALLOC_FAILURE
);
return
(
0
);
}
memset
(
p
,
0
,
sizeof
(
*
p
)
*
(
off
+
j
));
bn
=
(
BIGNUM
*
)
p
;
ul
=
(
BN_ULONG
*
)
&
(
p
[
off
]);
for
(
i
=
0
;
i
<
6
;
i
++
)
{
b
=
*
(
t
[
i
]);
*
(
t
[
i
])
=
bn_array_el
(
bn
,
i
);
memcpy
(
bn_array_el
(
bn
,
i
),
b
,
bn_sizeof_BIGNUM
());
memcpy
(
ul
,
bn_get_words
(
b
),
sizeof
(
*
ul
)
*
bn_get_top
(
b
));
bn_set_static_words
(
bn_array_el
(
bn
,
i
),
ul
,
bn_get_top
(
b
));
ul
+=
bn_get_top
(
b
);
BN_clear_free
(
b
);
}
/* I should fix this so it can still be done */
r
->
flags
&=
~
(
RSA_FLAG_CACHE_PRIVATE
|
RSA_FLAG_CACHE_PUBLIC
);
r
->
bignum_data
=
p
;
return
(
1
);
}
int
RSA_security_bits
(
const
RSA
*
rsa
)
{
return
BN_security_bits
(
BN_num_bits
(
rsa
->
n
),
-
1
);
...
...
include/openssl/rsa.h
浏览文件 @
6f4a6a5c
...
...
@@ -226,9 +226,6 @@ const RSA_METHOD *RSA_get_default_method(void);
const
RSA_METHOD
*
RSA_get_method
(
const
RSA
*
rsa
);
int
RSA_set_method
(
RSA
*
rsa
,
const
RSA_METHOD
*
meth
);
/* This function needs the memory locking malloc callbacks to be installed */
int
RSA_memory_lock
(
RSA
*
r
);
/* these are the actual RSA functions */
const
RSA_METHOD
*
RSA_PKCS1_OpenSSL
(
void
);
...
...
@@ -477,7 +474,6 @@ void ERR_load_RSA_strings(void);
# define RSA_F_RSA_CHECK_KEY_EX 160
# define RSA_F_RSA_CMS_DECRYPT 159
# define RSA_F_RSA_ITEM_VERIFY 148
# define RSA_F_RSA_MEMORY_LOCK 130
# define RSA_F_RSA_METH_DUP 161
# define RSA_F_RSA_METH_NEW 162
# define RSA_F_RSA_METH_SET1_NAME 163
...
...
util/libcrypto.num
浏览文件 @
6f4a6a5c
...
...
@@ -1396,7 +1396,6 @@ SCT_set_timestamp 1380 1_1_0 EXIST::FUNCTION:CT
UI_new 1381 1_1_0 EXIST::FUNCTION:UI
TS_REQ_get_msg_imprint 1382 1_1_0 EXIST::FUNCTION:TS
i2d_PKCS12_BAGS 1383 1_1_0 EXIST::FUNCTION:
RSA_memory_lock 1384 1_1_0 EXIST::FUNCTION:RSA
CERTIFICATEPOLICIES_free 1385 1_1_0 EXIST::FUNCTION:
X509V3_get_section 1386 1_1_0 EXIST::FUNCTION:
BIO_parse_hostserv 1387 1_1_0 EXIST::FUNCTION:SOCK
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录