Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
c1cd88a0
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c1cd88a0
编写于
9月 08, 1999
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Oops... forgot the other RSA_NULL patches...
上级
4a61a64f
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
19 addition
and
5 deletion
+19
-5
apps/speed.c
apps/speed.c
+2
-0
crypto/rsa/Makefile.ssl
crypto/rsa/Makefile.ssl
+2
-2
crypto/rsa/rsa.h
crypto/rsa/rsa.h
+5
-1
crypto/rsa/rsa_eay.c
crypto/rsa/rsa_eay.c
+3
-1
crypto/rsa/rsa_err.c
crypto/rsa/rsa_err.c
+3
-1
crypto/rsa/rsa_lib.c
crypto/rsa/rsa_lib.c
+4
-0
未找到文件。
apps/speed.c
浏览文件 @
c1cd88a0
...
...
@@ -435,12 +435,14 @@ int MAIN(int argc, char **argv)
}
else
#endif
#ifndef RSA_NULL
if
(
strcmp
(
*
argv
,
"openssl"
)
==
0
)
{
RSA_set_default_method
(
RSA_PKCS1_SSLeay
());
j
--
;
}
else
#endif
#endif
/* !NO_RSA */
if
(
strcmp
(
*
argv
,
"dsa512"
)
==
0
)
dsa_doit
[
R_DSA_512
]
=
2
;
else
if
(
strcmp
(
*
argv
,
"dsa1024"
)
==
0
)
dsa_doit
[
R_DSA_1024
]
=
2
;
...
...
crypto/rsa/Makefile.ssl
浏览文件 @
c1cd88a0
...
...
@@ -23,9 +23,9 @@ APPS=
LIB
=
$(TOP)
/libcrypto.a
LIBSRC
=
rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_saos.c rsa_err.c
\
rsa_pk1.c rsa_ssl.c rsa_none.c rsa_oaep.c rsa_chk.c
rsa_pk1.c rsa_ssl.c rsa_none.c rsa_oaep.c rsa_chk.c
rsa_null.c
LIBOBJ
=
rsa_eay.o rsa_gen.o rsa_lib.o rsa_sign.o rsa_saos.o rsa_err.o
\
rsa_pk1.o rsa_ssl.o rsa_none.o rsa_oaep.o rsa_chk.o
rsa_pk1.o rsa_ssl.o rsa_none.o rsa_oaep.o rsa_chk.o
rsa_null.o
SRC
=
$(LIBSRC)
...
...
crypto/rsa/rsa.h
浏览文件 @
c1cd88a0
...
...
@@ -181,6 +181,8 @@ RSA_METHOD *RSA_PKCS1_RSAref(void);
/* these are the actual SSLeay RSA functions */
RSA_METHOD
*
RSA_PKCS1_SSLeay
(
void
);
RSA_METHOD
*
RSA_null_method
(
void
);
void
ERR_load_RSA_strings
(
void
);
RSA
*
d2i_RSAPublicKey
(
RSA
**
a
,
unsigned
char
**
pp
,
long
length
);
...
...
@@ -262,6 +264,7 @@ char *RSA_get_ex_data(RSA *r, int idx);
#define RSA_F_RSA_EAY_PUBLIC_ENCRYPT 104
#define RSA_F_RSA_GENERATE_KEY 105
#define RSA_F_RSA_NEW_METHOD 106
#define RSA_F_RSA_NULL 124
#define RSA_F_RSA_PADDING_ADD_NONE 107
#define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP 121
#define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_1 108
...
...
@@ -292,10 +295,10 @@ char *RSA_get_ex_data(RSA *r, int idx);
#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_D_E_NOT_CONGRUENT_TO_1 123
#define RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY 112
#define RSA_R_DMP1_NOT_CONGRUENT_TO_D 124
#define RSA_R_DMQ1_NOT_CONGRUENT_TO_D 125
#define RSA_R_D_E_NOT_CONGRUENT_TO_1 123
#define RSA_R_IQMP_NOT_INVERSE_OF_Q 126
#define RSA_R_KEY_SIZE_TOO_SMALL 120
#define RSA_R_NULL_BEFORE_BLOCK_MISSING 113
...
...
@@ -304,6 +307,7 @@ char *RSA_get_ex_data(RSA *r, int idx);
#define RSA_R_PADDING_CHECK_FAILED 114
#define RSA_R_P_NOT_PRIME 128
#define RSA_R_Q_NOT_PRIME 129
#define RSA_R_RSA_OPERATIONS_NOT_SUPPORTED 130
#define RSA_R_SSLV3_ROLLBACK_ATTACK 115
#define RSA_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 116
#define RSA_R_UNKNOWN_ALGORITHM_TYPE 117
...
...
crypto/rsa/rsa_eay.c
浏览文件 @
c1cd88a0
...
...
@@ -62,6 +62,8 @@
#include <openssl/rsa.h>
#include <openssl/rand.h>
#ifndef RSA_NULL
static
int
RSA_eay_public_encrypt
(
int
flen
,
unsigned
char
*
from
,
unsigned
char
*
to
,
RSA
*
rsa
,
int
padding
);
static
int
RSA_eay_private_encrypt
(
int
flen
,
unsigned
char
*
from
,
...
...
@@ -486,4 +488,4 @@ static int RSA_eay_finish(RSA *rsa)
return
(
1
);
}
#endif
crypto/rsa/rsa_err.c
浏览文件 @
c1cd88a0
...
...
@@ -73,6 +73,7 @@ static ERR_STRING_DATA RSA_str_functs[]=
{
ERR_PACK
(
0
,
RSA_F_RSA_EAY_PUBLIC_ENCRYPT
,
0
),
"RSA_EAY_PUBLIC_ENCRYPT"
},
{
ERR_PACK
(
0
,
RSA_F_RSA_GENERATE_KEY
,
0
),
"RSA_generate_key"
},
{
ERR_PACK
(
0
,
RSA_F_RSA_NEW_METHOD
,
0
),
"RSA_new_method"
},
{
ERR_PACK
(
0
,
RSA_F_RSA_NULL
,
0
),
"RSA_NULL"
},
{
ERR_PACK
(
0
,
RSA_F_RSA_PADDING_ADD_NONE
,
0
),
"RSA_padding_add_none"
},
{
ERR_PACK
(
0
,
RSA_F_RSA_PADDING_ADD_PKCS1_OAEP
,
0
),
"RSA_padding_add_PKCS1_OAEP"
},
{
ERR_PACK
(
0
,
RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_1
,
0
),
"RSA_padding_add_PKCS1_type_1"
},
...
...
@@ -106,10 +107,10 @@ static ERR_STRING_DATA RSA_str_reasons[]=
{
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_D_E_NOT_CONGRUENT_TO_1
,
"d e not congruent to 1"
},
{
RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY
,
"digest too big for rsa key"
},
{
RSA_R_DMP1_NOT_CONGRUENT_TO_D
,
"dmp1 not congruent to d"
},
{
RSA_R_DMQ1_NOT_CONGRUENT_TO_D
,
"dmq1 not congruent to d"
},
{
RSA_R_D_E_NOT_CONGRUENT_TO_1
,
"d e not congruent to 1"
},
{
RSA_R_IQMP_NOT_INVERSE_OF_Q
,
"iqmp not inverse of q"
},
{
RSA_R_KEY_SIZE_TOO_SMALL
,
"key size too small"
},
{
RSA_R_NULL_BEFORE_BLOCK_MISSING
,
"null before block missing"
},
...
...
@@ -118,6 +119,7 @@ static ERR_STRING_DATA RSA_str_reasons[]=
{
RSA_R_PADDING_CHECK_FAILED
,
"padding check failed"
},
{
RSA_R_P_NOT_PRIME
,
"p not prime"
},
{
RSA_R_Q_NOT_PRIME
,
"q not prime"
},
{
RSA_R_RSA_OPERATIONS_NOT_SUPPORTED
,
"rsa operations not supported"
},
{
RSA_R_SSLV3_ROLLBACK_ATTACK
,
"sslv3 rollback attack"
},
{
RSA_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD
,
"the asn1 object identifier is not known for this md"
},
{
RSA_R_UNKNOWN_ALGORITHM_TYPE
,
"unknown algorithm type"
},
...
...
crypto/rsa/rsa_lib.c
浏览文件 @
c1cd88a0
...
...
@@ -105,10 +105,14 @@ RSA *RSA_new_method(RSA_METHOD *meth)
if
(
default_RSA_meth
==
NULL
)
{
#ifdef RSA_NULL
default_RSA_meth
=
RSA_null_method
();
#else
#ifdef RSAref
default_RSA_meth
=
RSA_PKCS1_RSAref
();
#else
default_RSA_meth
=
RSA_PKCS1_SSLeay
();
#endif
#endif
}
ret
=
(
RSA
*
)
Malloc
(
sizeof
(
RSA
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录