Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
0c8a1281
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
8 个月 前同步成功
通知
8
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看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
0c8a1281
编写于
2月 21, 1999
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make RSA_NO_PADDING really use no padding.
Submitted by: Ulf Moeller <ulf@fitug.de>
上级
189b6a60
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
17 addition
and
19 deletion
+17
-19
CHANGES
CHANGES
+3
-0
crypto/rsa/rsa.err
crypto/rsa/rsa.err
+1
-1
crypto/rsa/rsa.h
crypto/rsa/rsa.h
+1
-1
crypto/rsa/rsa_err.c
crypto/rsa/rsa_err.c
+1
-1
crypto/rsa/rsa_none.c
crypto/rsa/rsa_none.c
+11
-16
未找到文件。
CHANGES
浏览文件 @
0c8a1281
...
...
@@ -5,6 +5,9 @@
Changes between 0.9.1c and 0.9.2
*) Make RSA_NO_PADDING really use no padding.
[Ulf Moeller <ulf@fitug.de>]
*) Generate errors when private/public key check is done.
[Ben Laurie]
...
...
crypto/rsa/rsa.err
浏览文件 @
0c8a1281
...
...
@@ -31,13 +31,13 @@
#define RSA_R_BAD_FIXED_HEADER_DECRYPT 102
#define RSA_R_BAD_PAD_BYTE_COUNT 103
#define RSA_R_BAD_SIGNATURE 104
#define RSA_R_BAD_ZERO_BYTE 105
#define RSA_R_BLOCK_TYPE_IS_NOT_01 106
#define RSA_R_BLOCK_TYPE_IS_NOT_02 107
#define RSA_R_DATA_GREATER_THAN_MOD_LEN 108
#define RSA_R_DATA_TOO_LARGE 109
#define RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 110
#define RSA_R_DATA_TOO_SMALL 111
#define RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE 122
#define RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY 112
#define RSA_R_KEY_SIZE_TOO_SMALL 120
#define RSA_R_NULL_BEFORE_BLOCK_MISSING 113
...
...
crypto/rsa/rsa.h
浏览文件 @
0c8a1281
...
...
@@ -338,13 +338,13 @@ char *RSA_get_ex_data();
#define RSA_R_BAD_FIXED_HEADER_DECRYPT 102
#define RSA_R_BAD_PAD_BYTE_COUNT 103
#define RSA_R_BAD_SIGNATURE 104
#define RSA_R_BAD_ZERO_BYTE 105
#define RSA_R_BLOCK_TYPE_IS_NOT_01 106
#define RSA_R_BLOCK_TYPE_IS_NOT_02 107
#define RSA_R_DATA_GREATER_THAN_MOD_LEN 108
#define RSA_R_DATA_TOO_LARGE 109
#define RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 110
#define RSA_R_DATA_TOO_SMALL 111
#define RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE 122
#define RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY 112
#define RSA_R_KEY_SIZE_TOO_SMALL 120
#define RSA_R_NULL_BEFORE_BLOCK_MISSING 113
...
...
crypto/rsa/rsa_err.c
浏览文件 @
0c8a1281
...
...
@@ -96,13 +96,13 @@ static ERR_STRING_DATA RSA_str_reasons[]=
{
RSA_R_BAD_FIXED_HEADER_DECRYPT
,
"bad fixed header decrypt"
},
{
RSA_R_BAD_PAD_BYTE_COUNT
,
"bad pad byte count"
},
{
RSA_R_BAD_SIGNATURE
,
"bad signature"
},
{
RSA_R_BAD_ZERO_BYTE
,
"bad zero byte"
},
{
RSA_R_BLOCK_TYPE_IS_NOT_01
,
"block type is not 01"
},
{
RSA_R_BLOCK_TYPE_IS_NOT_02
,
"block type is not 02"
},
{
RSA_R_DATA_GREATER_THAN_MOD_LEN
,
"data greater than mod len"
},
{
RSA_R_DATA_TOO_LARGE
,
"data too large"
},
{
RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE
,
"data too large for key size"
},
{
RSA_R_DATA_TOO_SMALL
,
"data too small"
},
{
RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE
,
"data too small for key size"
},
{
RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY
,
"digest too big for rsa key"
},
{
RSA_R_KEY_SIZE_TOO_SMALL
,
"key size too small"
},
{
RSA_R_NULL_BEFORE_BLOCK_MISSING
,
"null before block missing"
},
...
...
crypto/rsa/rsa_none.c
浏览文件 @
0c8a1281
...
...
@@ -68,13 +68,18 @@ int tlen;
unsigned
char
*
from
;
int
flen
;
{
if
(
flen
>
=
tlen
)
if
(
flen
>
tlen
)
{
RSAerr
(
RSA_F_RSA_PADDING_ADD_NONE
,
RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE
);
return
(
0
);
}
if
(
flen
<
tlen
)
{
RSAerr
(
RSA_F_RSA_PADDING_ADD_NONE
,
RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE
);
return
(
0
);
}
*
(
to
++
)
=
0
;
memcpy
(
to
,
from
,(
unsigned
int
)
flen
);
return
(
1
);
}
...
...
@@ -86,25 +91,15 @@ unsigned char *from;
int
flen
;
int
num
;
{
int
j
;
from
++
;
if
(
flen
+
1
>
tlen
)
if
(
flen
>
tlen
)
{
RSAerr
(
RSA_F_RSA_PADDING_CHECK_NONE
,
RSA_R_DATA_TOO_LARGE
);
return
(
-
1
);
}
if
(
flen
+
1
>=
num
)
{
RSAerr
(
RSA_F_RSA_PADDING_CHECK_NONE
,
RSA_R_BAD_ZERO_BYTE
);
return
(
-
1
);
}
/* scan over padding data */
j
=
flen
-
1
;
/* one for type and one for the prepended 0. */
memset
(
to
,
0
,
tlen
-
j
);
to
+=
(
tlen
-
j
);
memcpy
(
to
,
from
,
j
);
return
(
j
);
memset
(
to
,
0
,
tlen
-
flen
);
memcpy
(
to
+
tlen
-
flen
,
from
,
flen
);
return
(
tlen
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录