Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
ac4e2577
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看板
提交
ac4e2577
编写于
8月 16, 2016
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
constify X509_ALGOR_get0()
Reviewed-by:
N
Richard Levitte
<
levitte@openssl.org
>
上级
0c800648
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
32 addition
and
32 deletion
+32
-32
apps/pkcs12.c
apps/pkcs12.c
+3
-3
crypto/asn1/x_algor.c
crypto/asn1/x_algor.c
+2
-2
crypto/cms/cms_lib.c
crypto/cms/cms_lib.c
+2
-2
crypto/cms/cms_sd.c
crypto/cms/cms_sd.c
+1
-1
crypto/dh/dh_ameth.c
crypto/dh/dh_ameth.c
+7
-7
crypto/dsa/dsa_ameth.c
crypto/dsa/dsa_ameth.c
+4
-4
crypto/ec/ec_ameth.c
crypto/ec/ec_ameth.c
+8
-8
crypto/pkcs12/p12_mutl.c
crypto/pkcs12/p12_mutl.c
+1
-1
doc/crypto/X509_ALGOR_dup.pod
doc/crypto/X509_ALGOR_dup.pod
+2
-2
include/openssl/x509.h
include/openssl/x509.h
+2
-2
未找到文件。
apps/pkcs12.c
浏览文件 @
ac4e2577
...
...
@@ -523,7 +523,7 @@ int pkcs12_main(int argc, char **argv)
if
((
options
&
INFO
)
&&
PKCS12_mac_present
(
p12
))
{
ASN1_INTEGER
*
tmaciter
;
X509_ALGOR
*
macalgid
;
ASN1_OBJECT
*
macobj
;
const
ASN1_OBJECT
*
macobj
;
PKCS12_get0_mac
(
NULL
,
&
macalgid
,
NULL
,
&
tmaciter
,
p12
);
X509_ALGOR_get0
(
&
macobj
,
NULL
,
NULL
,
macalgid
);
BIO_puts
(
bio_err
,
"MAC:"
);
...
...
@@ -743,8 +743,8 @@ end:
static
int
alg_print
(
X509_ALGOR
*
alg
)
{
int
pbenid
,
aparamtype
;
ASN1_OBJECT
*
aoid
;
void
*
aparam
;
const
ASN1_OBJECT
*
aoid
;
const
void
*
aparam
;
PBEPARAM
*
pbe
=
NULL
;
X509_ALGOR_get0
(
&
aoid
,
&
aparamtype
,
&
aparam
,
alg
);
...
...
crypto/asn1/x_algor.c
浏览文件 @
ac4e2577
...
...
@@ -50,8 +50,8 @@ int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval)
return
1
;
}
void
X509_ALGOR_get0
(
ASN1_OBJECT
**
paobj
,
int
*
pptype
,
void
**
ppval
,
X509_ALGOR
*
algor
)
void
X509_ALGOR_get0
(
const
ASN1_OBJECT
**
paobj
,
int
*
pptype
,
const
void
**
ppval
,
const
X509_ALGOR
*
algor
)
{
if
(
paobj
)
*
paobj
=
algor
->
algorithm
;
...
...
crypto/cms/cms_lib.c
浏览文件 @
ac4e2577
...
...
@@ -286,7 +286,7 @@ int CMS_set_detached(CMS_ContentInfo *cms, int detached)
BIO
*
cms_DigestAlgorithm_init_bio
(
X509_ALGOR
*
digestAlgorithm
)
{
BIO
*
mdbio
=
NULL
;
ASN1_OBJECT
*
digestoid
;
const
ASN1_OBJECT
*
digestoid
;
const
EVP_MD
*
digest
;
X509_ALGOR_get0
(
&
digestoid
,
NULL
,
NULL
,
digestAlgorithm
);
digest
=
EVP_get_digestbyobj
(
digestoid
);
...
...
@@ -312,7 +312,7 @@ int cms_DigestAlgorithm_find_ctx(EVP_MD_CTX *mctx, BIO *chain,
X509_ALGOR
*
mdalg
)
{
int
nid
;
ASN1_OBJECT
*
mdoid
;
const
ASN1_OBJECT
*
mdoid
;
X509_ALGOR_get0
(
&
mdoid
,
NULL
,
NULL
,
mdalg
);
nid
=
OBJ_obj2nid
(
mdoid
);
/* Look for digest type to match signature */
...
...
crypto/cms/cms_sd.c
浏览文件 @
ac4e2577
...
...
@@ -285,7 +285,7 @@ CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms,
/* See if digest is present in digestAlgorithms */
for
(
i
=
0
;
i
<
sk_X509_ALGOR_num
(
sd
->
digestAlgorithms
);
i
++
)
{
ASN1_OBJECT
*
aoid
;
const
ASN1_OBJECT
*
aoid
;
alg
=
sk_X509_ALGOR_value
(
sd
->
digestAlgorithms
,
i
);
X509_ALGOR_get0
(
&
aoid
,
NULL
,
NULL
,
alg
);
if
(
OBJ_obj2nid
(
aoid
)
==
EVP_MD_type
(
md
))
...
...
crypto/dh/dh_ameth.c
浏览文件 @
ac4e2577
...
...
@@ -47,8 +47,8 @@ static int dh_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey)
const
unsigned
char
*
p
,
*
pm
;
int
pklen
,
pmlen
;
int
ptype
;
void
*
pval
;
ASN1_STRING
*
pstr
;
const
void
*
pval
;
const
ASN1_STRING
*
pstr
;
X509_ALGOR
*
palg
;
ASN1_INTEGER
*
public_key
=
NULL
;
...
...
@@ -152,8 +152,8 @@ static int dh_priv_decode(EVP_PKEY *pkey, PKCS8_PRIV_KEY_INFO *p8)
const
unsigned
char
*
p
,
*
pm
;
int
pklen
,
pmlen
;
int
ptype
;
void
*
pval
;
ASN1_STRING
*
pstr
;
const
void
*
pval
;
const
ASN1_STRING
*
pstr
;
X509_ALGOR
*
palg
;
ASN1_INTEGER
*
privkey
=
NULL
;
...
...
@@ -574,9 +574,9 @@ const EVP_PKEY_ASN1_METHOD dhx_asn1_meth = {
static
int
dh_cms_set_peerkey
(
EVP_PKEY_CTX
*
pctx
,
X509_ALGOR
*
alg
,
ASN1_BIT_STRING
*
pubkey
)
{
ASN1_OBJECT
*
aoid
;
const
ASN1_OBJECT
*
aoid
;
int
atype
;
void
*
aval
;
const
void
*
aval
;
ASN1_INTEGER
*
public_key
=
NULL
;
int
rv
=
0
;
EVP_PKEY
*
pkpeer
=
NULL
,
*
pk
=
NULL
;
...
...
@@ -741,7 +741,7 @@ static int dh_cms_encrypt(CMS_RecipientInfo *ri)
EVP_CIPHER_CTX
*
ctx
;
int
keylen
;
X509_ALGOR
*
talg
,
*
wrap_alg
=
NULL
;
ASN1_OBJECT
*
aoid
;
const
ASN1_OBJECT
*
aoid
;
ASN1_BIT_STRING
*
pubkey
;
ASN1_STRING
*
wrap_str
;
ASN1_OCTET_STRING
*
ukm
;
...
...
crypto/dsa/dsa_ameth.c
浏览文件 @
ac4e2577
...
...
@@ -22,8 +22,8 @@ static int dsa_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey)
const
unsigned
char
*
p
,
*
pm
;
int
pklen
,
pmlen
;
int
ptype
;
void
*
pval
;
ASN1_STRING
*
pstr
;
const
void
*
pval
;
const
ASN1_STRING
*
pstr
;
X509_ALGOR
*
palg
;
ASN1_INTEGER
*
public_key
=
NULL
;
...
...
@@ -135,8 +135,8 @@ static int dsa_priv_decode(EVP_PKEY *pkey, PKCS8_PRIV_KEY_INFO *p8)
const
unsigned
char
*
p
,
*
pm
;
int
pklen
,
pmlen
;
int
ptype
;
void
*
pval
;
ASN1_STRING
*
pstr
;
const
void
*
pval
;
const
ASN1_STRING
*
pstr
;
X509_ALGOR
*
palg
;
ASN1_INTEGER
*
privkey
=
NULL
;
BN_CTX
*
ctx
=
NULL
;
...
...
crypto/ec/ec_ameth.c
浏览文件 @
ac4e2577
...
...
@@ -89,11 +89,11 @@ static int eckey_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey)
return
0
;
}
static
EC_KEY
*
eckey_type2param
(
int
ptype
,
void
*
pval
)
static
EC_KEY
*
eckey_type2param
(
int
ptype
,
const
void
*
pval
)
{
EC_KEY
*
eckey
=
NULL
;
if
(
ptype
==
V_ASN1_SEQUENCE
)
{
ASN1_STRING
*
pstr
=
pval
;
const
ASN1_STRING
*
pstr
=
pval
;
const
unsigned
char
*
pm
=
NULL
;
int
pmlen
;
pm
=
pstr
->
data
;
...
...
@@ -103,7 +103,7 @@ static EC_KEY *eckey_type2param(int ptype, void *pval)
goto
ecerr
;
}
}
else
if
(
ptype
==
V_ASN1_OBJECT
)
{
ASN1_OBJECT
*
poid
=
pval
;
const
ASN1_OBJECT
*
poid
=
pval
;
EC_GROUP
*
group
;
/*
...
...
@@ -135,7 +135,7 @@ static EC_KEY *eckey_type2param(int ptype, void *pval)
static
int
eckey_pub_decode
(
EVP_PKEY
*
pkey
,
X509_PUBKEY
*
pubkey
)
{
const
unsigned
char
*
p
=
NULL
;
void
*
pval
;
const
void
*
pval
;
int
ptype
,
pklen
;
EC_KEY
*
eckey
=
NULL
;
X509_ALGOR
*
palg
;
...
...
@@ -182,7 +182,7 @@ static int eckey_pub_cmp(const EVP_PKEY *a, const EVP_PKEY *b)
static
int
eckey_priv_decode
(
EVP_PKEY
*
pkey
,
PKCS8_PRIV_KEY_INFO
*
p8
)
{
const
unsigned
char
*
p
=
NULL
;
void
*
pval
;
const
void
*
pval
;
int
ptype
,
pklen
;
EC_KEY
*
eckey
=
NULL
;
X509_ALGOR
*
palg
;
...
...
@@ -562,9 +562,9 @@ int ECParameters_print(BIO *bp, const EC_KEY *x)
static
int
ecdh_cms_set_peerkey
(
EVP_PKEY_CTX
*
pctx
,
X509_ALGOR
*
alg
,
ASN1_BIT_STRING
*
pubkey
)
{
ASN1_OBJECT
*
aoid
;
const
ASN1_OBJECT
*
aoid
;
int
atype
;
void
*
aval
;
const
void
*
aval
;
int
rv
=
0
;
EVP_PKEY
*
pkpeer
=
NULL
;
EC_KEY
*
ecpeer
=
NULL
;
...
...
@@ -738,7 +738,7 @@ static int ecdh_cms_encrypt(CMS_RecipientInfo *ri)
EVP_CIPHER_CTX
*
ctx
;
int
keylen
;
X509_ALGOR
*
talg
,
*
wrap_alg
=
NULL
;
ASN1_OBJECT
*
aoid
;
const
ASN1_OBJECT
*
aoid
;
ASN1_BIT_STRING
*
pubkey
;
ASN1_STRING
*
wrap_str
;
ASN1_OCTET_STRING
*
ukm
;
...
...
crypto/pkcs12/p12_mutl.c
浏览文件 @
ac4e2577
...
...
@@ -75,7 +75,7 @@ int PKCS12_gen_mac(PKCS12 *p12, const char *pass, int passlen,
int
md_size
=
0
;
int
md_type_nid
;
X509_ALGOR
*
macalg
;
ASN1_OBJECT
*
macoid
;
const
ASN1_OBJECT
*
macoid
;
if
(
!
PKCS7_type_is_data
(
p12
->
authsafes
))
{
PKCS12err
(
PKCS12_F_PKCS12_GEN_MAC
,
PKCS12_R_CONTENT_TYPE_NOT_DATA
);
...
...
doc/crypto/X509_ALGOR_dup.pod
浏览文件 @
ac4e2577
...
...
@@ -10,8 +10,8 @@ X509_ALGOR_dup, X509_ALGOR_set0, X509_ALGOR_get0, X509_ALGOR_set_md, X509_ALGOR_
X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *alg);
int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval);
void X509_ALGOR_get0(
ASN1_OBJECT **paobj, int *pptype, void **ppval
,
X509_ALGOR *alg);
void X509_ALGOR_get0(
const ASN1_OBJECT **paobj, int *pptype
,
const void **ppval, const
X509_ALGOR *alg);
void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md);
int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b);
...
...
include/openssl/x509.h
浏览文件 @
ac4e2577
...
...
@@ -463,8 +463,8 @@ X509_REQ *X509_REQ_dup(X509_REQ *req);
X509_ALGOR
*
X509_ALGOR_dup
(
X509_ALGOR
*
xn
);
int
X509_ALGOR_set0
(
X509_ALGOR
*
alg
,
ASN1_OBJECT
*
aobj
,
int
ptype
,
void
*
pval
);
void
X509_ALGOR_get0
(
ASN1_OBJECT
**
paobj
,
int
*
pptype
,
void
**
ppval
,
X509_ALGOR
*
algor
);
void
X509_ALGOR_get0
(
const
ASN1_OBJECT
**
paobj
,
int
*
pptype
,
const
void
**
ppval
,
const
X509_ALGOR
*
algor
);
void
X509_ALGOR_set_md
(
X509_ALGOR
*
alg
,
const
EVP_MD
*
md
);
int
X509_ALGOR_cmp
(
const
X509_ALGOR
*
a
,
const
X509_ALGOR
*
b
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录