Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
b3339050
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
10
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看板
提交
b3339050
编写于
1月 02, 2012
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
incomplete provisional OAEP CMS decrypt support
上级
918fc30f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
40 addition
and
14 deletion
+40
-14
crypto/objects/obj_dat.h
crypto/objects/obj_dat.h
+15
-10
crypto/objects/obj_mac.h
crypto/objects/obj_mac.h
+6
-1
crypto/objects/obj_mac.num
crypto/objects/obj_mac.num
+2
-1
crypto/objects/objects.txt
crypto/objects/objects.txt
+1
-0
crypto/rsa/rsa_pmeth.c
crypto/rsa/rsa_pmeth.c
+16
-2
未找到文件。
crypto/objects/obj_dat.h
浏览文件 @
b3339050
...
@@ -62,12 +62,12 @@
...
@@ -62,12 +62,12 @@
* [including the GNU Public Licence.]
* [including the GNU Public Licence.]
*/
*/
#define NUM_NID 92
0
#define NUM_NID 92
1
#define NUM_SN 91
3
#define NUM_SN 91
4
#define NUM_LN 91
3
#define NUM_LN 91
4
#define NUM_OBJ 85
7
#define NUM_OBJ 85
8
static
const
unsigned
char
lvalues
[
59
78
]
=
{
static
const
unsigned
char
lvalues
[
59
87
]
=
{
0x00
,
/* [ 0] OBJ_undef */
0x00
,
/* [ 0] OBJ_undef */
0x2A
,
0x86
,
0x48
,
0x86
,
0xF7
,
0x0D
,
/* [ 1] OBJ_rsadsi */
0x2A
,
0x86
,
0x48
,
0x86
,
0xF7
,
0x0D
,
/* [ 1] OBJ_rsadsi */
0x2A
,
0x86
,
0x48
,
0x86
,
0xF7
,
0x0D
,
0x01
,
/* [ 7] OBJ_pkcs */
0x2A
,
0x86
,
0x48
,
0x86
,
0xF7
,
0x0D
,
0x01
,
/* [ 7] OBJ_pkcs */
...
@@ -924,7 +924,8 @@ static const unsigned char lvalues[5978]={
...
@@ -924,7 +924,8 @@ static const unsigned char lvalues[5978]={
0x55
,
0x1D
,
0x25
,
0x00
,
/* [5948] OBJ_anyExtendedKeyUsage */
0x55
,
0x1D
,
0x25
,
0x00
,
/* [5948] OBJ_anyExtendedKeyUsage */
0x2A
,
0x86
,
0x48
,
0x86
,
0xF7
,
0x0D
,
0x01
,
0x01
,
0x08
,
/* [5952] OBJ_mgf1 */
0x2A
,
0x86
,
0x48
,
0x86
,
0xF7
,
0x0D
,
0x01
,
0x01
,
0x08
,
/* [5952] OBJ_mgf1 */
0x2A
,
0x86
,
0x48
,
0x86
,
0xF7
,
0x0D
,
0x01
,
0x01
,
0x0A
,
/* [5961] OBJ_rsassaPss */
0x2A
,
0x86
,
0x48
,
0x86
,
0xF7
,
0x0D
,
0x01
,
0x01
,
0x0A
,
/* [5961] OBJ_rsassaPss */
0x2A
,
0x86
,
0x48
,
0xCE
,
0x3E
,
0x02
,
0x01
,
/* [5970] OBJ_dhpublicnumber */
0x2A
,
0x86
,
0x48
,
0x86
,
0xF7
,
0x0D
,
0x01
,
0x01
,
0x07
,
/* [5970] OBJ_rsaesOaep */
0x2A
,
0x86
,
0x48
,
0xCE
,
0x3E
,
0x02
,
0x01
,
/* [5979] OBJ_dhpublicnumber */
};
};
static
const
ASN1_OBJECT
nid_objs
[
NUM_NID
]
=
{
static
const
ASN1_OBJECT
nid_objs
[
NUM_NID
]
=
{
...
@@ -2405,7 +2406,8 @@ static const ASN1_OBJECT nid_objs[NUM_NID]={
...
@@ -2405,7 +2406,8 @@ static const ASN1_OBJECT nid_objs[NUM_NID]={
NID_aes_192_cbc_hmac_sha1
,
0
,
NULL
,
0
},
NID_aes_192_cbc_hmac_sha1
,
0
,
NULL
,
0
},
{
"AES-256-CBC-HMAC-SHA1"
,
"aes-256-cbc-hmac-sha1"
,
{
"AES-256-CBC-HMAC-SHA1"
,
"aes-256-cbc-hmac-sha1"
,
NID_aes_256_cbc_hmac_sha1
,
0
,
NULL
,
0
},
NID_aes_256_cbc_hmac_sha1
,
0
,
NULL
,
0
},
{
"dhpublicnumber"
,
"X9.42 DH"
,
NID_dhpublicnumber
,
7
,
&
(
lvalues
[
5970
]),
0
},
{
"RSAES-OAEP"
,
"rsaesOaep"
,
NID_rsaesOaep
,
9
,
&
(
lvalues
[
5970
]),
0
},
{
"dhpublicnumber"
,
"X9.42 DH"
,
NID_dhpublicnumber
,
7
,
&
(
lvalues
[
5979
]),
0
},
};
};
static
const
unsigned
int
sn_objs
[
NUM_SN
]
=
{
static
const
unsigned
int
sn_objs
[
NUM_SN
]
=
{
...
@@ -2573,6 +2575,7 @@ static const unsigned int sn_objs[NUM_SN]={
...
@@ -2573,6 +2575,7 @@ static const unsigned int sn_objs[NUM_SN]={
668
,
/* "RSA-SHA256" */
668
,
/* "RSA-SHA256" */
669
,
/* "RSA-SHA384" */
669
,
/* "RSA-SHA384" */
670
,
/* "RSA-SHA512" */
670
,
/* "RSA-SHA512" */
919
,
/* "RSAES-OAEP" */
912
,
/* "RSASSA-PSS" */
912
,
/* "RSASSA-PSS" */
777
,
/* "SEED-CBC" */
777
,
/* "SEED-CBC" */
779
,
/* "SEED-CFB" */
779
,
/* "SEED-CFB" */
...
@@ -2674,7 +2677,7 @@ static const unsigned int sn_objs[NUM_SN]={
...
@@ -2674,7 +2677,7 @@ static const unsigned int sn_objs[NUM_SN]={
107
,
/* "description" */
107
,
/* "description" */
871
,
/* "destinationIndicator" */
871
,
/* "destinationIndicator" */
28
,
/* "dhKeyAgreement" */
28
,
/* "dhKeyAgreement" */
9
19
,
/* "dhpublicnumber" */
9
20
,
/* "dhpublicnumber" */
382
,
/* "directory" */
382
,
/* "directory" */
887
,
/* "distinguishedName" */
887
,
/* "distinguishedName" */
892
,
/* "dmdName" */
892
,
/* "dmdName" */
...
@@ -3458,7 +3461,7 @@ static const unsigned int ln_objs[NUM_LN]={
...
@@ -3458,7 +3461,7 @@ static const unsigned int ln_objs[NUM_LN]={
85
,
/* "X509v3 Subject Alternative Name" */
85
,
/* "X509v3 Subject Alternative Name" */
769
,
/* "X509v3 Subject Directory Attributes" */
769
,
/* "X509v3 Subject Directory Attributes" */
82
,
/* "X509v3 Subject Key Identifier" */
82
,
/* "X509v3 Subject Key Identifier" */
9
19
,
/* "X9.42 DH" */
9
20
,
/* "X9.42 DH" */
184
,
/* "X9.57" */
184
,
/* "X9.57" */
185
,
/* "X9.57 CM ?" */
185
,
/* "X9.57 CM ?" */
478
,
/* "aRecord" */
478
,
/* "aRecord" */
...
@@ -4013,6 +4016,7 @@ static const unsigned int ln_objs[NUM_LN]={
...
@@ -4013,6 +4016,7 @@ static const unsigned int ln_objs[NUM_LN]={
6
,
/* "rsaEncryption" */
6
,
/* "rsaEncryption" */
644
,
/* "rsaOAEPEncryptionSET" */
644
,
/* "rsaOAEPEncryptionSET" */
377
,
/* "rsaSignature" */
377
,
/* "rsaSignature" */
919
,
/* "rsaesOaep" */
912
,
/* "rsassaPss" */
912
,
/* "rsassaPss" */
124
,
/* "run length compression" */
124
,
/* "run length compression" */
482
,
/* "sOARecord" */
482
,
/* "sOARecord" */
...
@@ -4615,7 +4619,7 @@ static const unsigned int obj_objs[NUM_OBJ]={
...
@@ -4615,7 +4619,7 @@ static const unsigned int obj_objs[NUM_OBJ]={
416
,
/* OBJ_ecdsa_with_SHA1 1 2 840 10045 4 1 */
416
,
/* OBJ_ecdsa_with_SHA1 1 2 840 10045 4 1 */
791
,
/* OBJ_ecdsa_with_Recommended 1 2 840 10045 4 2 */
791
,
/* OBJ_ecdsa_with_Recommended 1 2 840 10045 4 2 */
792
,
/* OBJ_ecdsa_with_Specified 1 2 840 10045 4 3 */
792
,
/* OBJ_ecdsa_with_Specified 1 2 840 10045 4 3 */
9
19
,
/* OBJ_dhpublicnumber 1 2 840 10046 2 1 */
9
20
,
/* OBJ_dhpublicnumber 1 2 840 10046 2 1 */
258
,
/* OBJ_id_pkix_mod 1 3 6 1 5 5 7 0 */
258
,
/* OBJ_id_pkix_mod 1 3 6 1 5 5 7 0 */
175
,
/* OBJ_id_pe 1 3 6 1 5 5 7 1 */
175
,
/* OBJ_id_pe 1 3 6 1 5 5 7 1 */
259
,
/* OBJ_id_qt 1 3 6 1 5 5 7 2 */
259
,
/* OBJ_id_qt 1 3 6 1 5 5 7 2 */
...
@@ -4831,6 +4835,7 @@ static const unsigned int obj_objs[NUM_OBJ]={
...
@@ -4831,6 +4835,7 @@ static const unsigned int obj_objs[NUM_OBJ]={
8
,
/* OBJ_md5WithRSAEncryption 1 2 840 113549 1 1 4 */
8
,
/* OBJ_md5WithRSAEncryption 1 2 840 113549 1 1 4 */
65
,
/* OBJ_sha1WithRSAEncryption 1 2 840 113549 1 1 5 */
65
,
/* OBJ_sha1WithRSAEncryption 1 2 840 113549 1 1 5 */
644
,
/* OBJ_rsaOAEPEncryptionSET 1 2 840 113549 1 1 6 */
644
,
/* OBJ_rsaOAEPEncryptionSET 1 2 840 113549 1 1 6 */
919
,
/* OBJ_rsaesOaep 1 2 840 113549 1 1 7 */
911
,
/* OBJ_mgf1 1 2 840 113549 1 1 8 */
911
,
/* OBJ_mgf1 1 2 840 113549 1 1 8 */
912
,
/* OBJ_rsassaPss 1 2 840 113549 1 1 10 */
912
,
/* OBJ_rsassaPss 1 2 840 113549 1 1 10 */
668
,
/* OBJ_sha256WithRSAEncryption 1 2 840 113549 1 1 11 */
668
,
/* OBJ_sha256WithRSAEncryption 1 2 840 113549 1 1 11 */
...
...
crypto/objects/obj_mac.h
浏览文件 @
b3339050
...
@@ -580,6 +580,11 @@
...
@@ -580,6 +580,11 @@
#define NID_sha1WithRSAEncryption 65
#define NID_sha1WithRSAEncryption 65
#define OBJ_sha1WithRSAEncryption OBJ_pkcs1,5L
#define OBJ_sha1WithRSAEncryption OBJ_pkcs1,5L
#define SN_rsaesOaep "RSAES-OAEP"
#define LN_rsaesOaep "rsaesOaep"
#define NID_rsaesOaep 919
#define OBJ_rsaesOaep OBJ_pkcs1,7L
#define SN_mgf1 "MGF1"
#define SN_mgf1 "MGF1"
#define LN_mgf1 "mgf1"
#define LN_mgf1 "mgf1"
#define NID_mgf1 911
#define NID_mgf1 911
...
@@ -4027,6 +4032,6 @@
...
@@ -4027,6 +4032,6 @@
#define SN_dhpublicnumber "dhpublicnumber"
#define SN_dhpublicnumber "dhpublicnumber"
#define LN_dhpublicnumber "X9.42 DH"
#define LN_dhpublicnumber "X9.42 DH"
#define NID_dhpublicnumber 9
19
#define NID_dhpublicnumber 9
20
#define OBJ_dhpublicnumber OBJ_ISO_US,10046L,2L,1L
#define OBJ_dhpublicnumber OBJ_ISO_US,10046L,2L,1L
crypto/objects/obj_mac.num
浏览文件 @
b3339050
...
@@ -916,4 +916,5 @@ rc4_hmac_md5 915
...
@@ -916,4 +916,5 @@ rc4_hmac_md5 915
aes_128_cbc_hmac_sha1 916
aes_128_cbc_hmac_sha1 916
aes_192_cbc_hmac_sha1 917
aes_192_cbc_hmac_sha1 917
aes_256_cbc_hmac_sha1 918
aes_256_cbc_hmac_sha1 918
dhpublicnumber 919
rsaesOaep 919
dhpublicnumber 920
crypto/objects/objects.txt
浏览文件 @
b3339050
...
@@ -166,6 +166,7 @@ pkcs1 3 : RSA-MD4 : md4WithRSAEncryption
...
@@ -166,6 +166,7 @@ pkcs1 3 : RSA-MD4 : md4WithRSAEncryption
pkcs1 4 : RSA-MD5 : md5WithRSAEncryption
pkcs1 4 : RSA-MD5 : md5WithRSAEncryption
pkcs1 5 : RSA-SHA1 : sha1WithRSAEncryption
pkcs1 5 : RSA-SHA1 : sha1WithRSAEncryption
# According to PKCS #1 version 2.1
# According to PKCS #1 version 2.1
pkcs1 7 : RSAES-OAEP : rsaesOaep
pkcs1 8 : MGF1 : mgf1
pkcs1 8 : MGF1 : mgf1
pkcs1 10 : RSASSA-PSS : rsassaPss
pkcs1 10 : RSASSA-PSS : rsassaPss
...
...
crypto/rsa/rsa_pmeth.c
浏览文件 @
b3339050
...
@@ -63,6 +63,9 @@
...
@@ -63,6 +63,9 @@
#include <openssl/rsa.h>
#include <openssl/rsa.h>
#include <openssl/bn.h>
#include <openssl/bn.h>
#include <openssl/evp.h>
#include <openssl/evp.h>
#ifndef OPENSSL_NO_CMS
#include <openssl/cms.h>
#endif
#include "evp_locl.h"
#include "evp_locl.h"
#include "rsa_locl.h"
#include "rsa_locl.h"
...
@@ -473,12 +476,23 @@ static int pkey_rsa_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
...
@@ -473,12 +476,23 @@ static int pkey_rsa_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
case
EVP_PKEY_CTRL_PKCS7_ENCRYPT
:
case
EVP_PKEY_CTRL_PKCS7_ENCRYPT
:
case
EVP_PKEY_CTRL_PKCS7_DECRYPT
:
case
EVP_PKEY_CTRL_PKCS7_DECRYPT
:
case
EVP_PKEY_CTRL_PKCS7_SIGN
:
case
EVP_PKEY_CTRL_PKCS7_SIGN
:
return
1
;
#ifndef OPENSSL_NO_CMS
#ifndef OPENSSL_NO_CMS
case
EVP_PKEY_CTRL_CMS_ENCRYPT
:
case
EVP_PKEY_CTRL_CMS_DECRYPT
:
case
EVP_PKEY_CTRL_CMS_DECRYPT
:
{
X509_ALGOR
*
alg
=
NULL
;
ASN1_OBJECT
*
encalg
=
NULL
;
if
(
p2
)
CMS_RecipientInfo_ktri_get0_algs
(
p2
,
NULL
,
NULL
,
&
alg
);
if
(
alg
)
X509_ALGOR_get0
(
&
encalg
,
NULL
,
NULL
,
alg
);
if
(
encalg
&&
OBJ_obj2nid
(
encalg
)
==
NID_rsaesOaep
)
rctx
->
pad_mode
=
RSA_PKCS1_OAEP_PADDING
;
}
case
EVP_PKEY_CTRL_CMS_ENCRYPT
:
case
EVP_PKEY_CTRL_CMS_SIGN
:
case
EVP_PKEY_CTRL_CMS_SIGN
:
#endif
return
1
;
return
1
;
#endif
case
EVP_PKEY_CTRL_PEER_KEY
:
case
EVP_PKEY_CTRL_PEER_KEY
:
RSAerr
(
RSA_F_PKEY_RSA_CTRL
,
RSAerr
(
RSA_F_PKEY_RSA_CTRL
,
RSA_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE
);
RSA_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录