Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
78d3b819
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看板
提交
78d3b819
编写于
12月 29, 2000
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Replace the old ASN1_dup() with ASN1_item_dup() and
zap some evil function pointers casts along the way...
上级
200b24e3
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
31 deletion
+18
-31
CHANGES
CHANGES
+1
-1
crypto/pkcs7/pk7_lib.c
crypto/pkcs7/pk7_lib.c
+1
-3
crypto/rsa/rsa.h
crypto/rsa/rsa.h
+5
-4
crypto/x509/x_all.c
crypto/x509/x_all.c
+11
-23
未找到文件。
CHANGES
浏览文件 @
78d3b819
...
...
@@ -8,7 +8,7 @@
it complain about algorithm deselection that isn't recognised.
[Richard Levitte]
*) New ASN1 functions to handle sign, verify, digest, pack and
*) New ASN1 functions to handle
dup,
sign, verify, digest, pack and
unpack operations in terms of ASN1_ITEM. Modify existing wrappers
to use new functions. Add NO_ASN1_OLD which can be set to remove
some old style ASN1 functions: this can be used to determine if old
...
...
crypto/pkcs7/pk7_lib.c
浏览文件 @
78d3b819
...
...
@@ -419,9 +419,7 @@ int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509)
M_ASN1_INTEGER_dup
(
X509_get_serialNumber
(
x509
));
X509_ALGOR_free
(
p7i
->
key_enc_algor
);
p7i
->
key_enc_algor
=
(
X509_ALGOR
*
)
ASN1_dup
(
i2d_X509_ALGOR
,
(
char
*
(
*
)())
d2i_X509_ALGOR
,
(
char
*
)
x509
->
cert_info
->
key
->
algor
);
p7i
->
key_enc_algor
=
X509_ALGOR_dup
(
x509
->
cert_info
->
key
->
algor
);
CRYPTO_add
(
&
x509
->
references
,
1
,
CRYPTO_LOCK_X509
);
p7i
->
cert
=
x509
;
...
...
crypto/rsa/rsa.h
浏览文件 @
78d3b819
...
...
@@ -59,6 +59,8 @@
#ifndef HEADER_RSA_H
#define HEADER_RSA_H
#include <openssl/asn1.h>
#ifndef NO_BIO
#include <openssl/bio.h>
#endif
...
...
@@ -222,10 +224,9 @@ const RSA_METHOD *RSA_null_method(void);
void
ERR_load_RSA_strings
(
void
);
RSA
*
d2i_RSAPublicKey
(
RSA
**
a
,
const
unsigned
char
**
pp
,
long
length
);
int
i2d_RSAPublicKey
(
const
RSA
*
a
,
unsigned
char
**
pp
);
RSA
*
d2i_RSAPrivateKey
(
RSA
**
a
,
const
unsigned
char
**
pp
,
long
length
);
int
i2d_RSAPrivateKey
(
const
RSA
*
a
,
unsigned
char
**
pp
);
DECLARE_ASN1_ENCODE_FUNCTIONS_const
(
RSA
,
RSAPublicKey
)
DECLARE_ASN1_ENCODE_FUNCTIONS_const
(
RSA
,
RSAPrivateKey
)
#ifndef NO_FP_API
int
RSA_print_fp
(
FILE
*
fp
,
const
RSA
*
r
,
int
offset
);
#endif
...
...
crypto/x509/x_all.c
浏览文件 @
78d3b819
...
...
@@ -115,21 +115,17 @@ int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md)
X509_ATTRIBUTE
*
X509_ATTRIBUTE_dup
(
X509_ATTRIBUTE
*
xa
)
{
return
((
X509_ATTRIBUTE
*
)
ASN1_dup
((
int
(
*
)())
i2d_X509_ATTRIBUTE
,
(
char
*
(
*
)())
d2i_X509_ATTRIBUTE
,(
char
*
)
xa
));
return
ASN1_item_dup
(
&
X509_ATTRIBUTE_it
,
xa
);
}
X509
*
X509_dup
(
X509
*
x509
)
{
return
((
X509
*
)
ASN1_dup
((
int
(
*
)())
i2d_X509
,
(
char
*
(
*
)())
d2i_X509
,(
char
*
)
x509
));
return
ASN1_item_dup
(
&
X509_it
,
x509
);
}
X509_EXTENSION
*
X509_EXTENSION_dup
(
X509_EXTENSION
*
ex
)
{
return
((
X509_EXTENSION
*
)
ASN1_dup
(
(
int
(
*
)())
i2d_X509_EXTENSION
,
(
char
*
(
*
)())
d2i_X509_EXTENSION
,(
char
*
)
ex
));
return
ASN1_item_dup
(
&
X509_EXTENSION_it
,
ex
);
}
#ifndef NO_FP_API
...
...
@@ -158,8 +154,7 @@ int i2d_X509_bio(BIO *bp, X509 *x509)
X509_CRL
*
X509_CRL_dup
(
X509_CRL
*
crl
)
{
return
((
X509_CRL
*
)
ASN1_dup
((
int
(
*
)())
i2d_X509_CRL
,
(
char
*
(
*
)())
d2i_X509_CRL
,(
char
*
)
crl
));
return
ASN1_item_dup
(
&
X509_CRL_it
,
crl
);
}
#ifndef NO_FP_API
...
...
@@ -190,8 +185,7 @@ int i2d_X509_CRL_bio(BIO *bp, X509_CRL *crl)
PKCS7
*
PKCS7_dup
(
PKCS7
*
p7
)
{
return
((
PKCS7
*
)
ASN1_dup
((
int
(
*
)())
i2d_PKCS7
,
(
char
*
(
*
)())
d2i_PKCS7
,(
char
*
)
p7
));
return
ASN1_item_dup
(
&
PKCS7_it
,
p7
);
}
#ifndef NO_FP_API
...
...
@@ -222,8 +216,7 @@ int i2d_PKCS7_bio(BIO *bp, PKCS7 *p7)
X509_REQ
*
X509_REQ_dup
(
X509_REQ
*
req
)
{
return
((
X509_REQ
*
)
ASN1_dup
((
int
(
*
)())
i2d_X509_REQ
,
(
char
*
(
*
)())
d2i_X509_REQ
,(
char
*
)
req
));
return
ASN1_item_dup
(
&
X509_REQ_it
,
req
);
}
#ifndef NO_FP_API
...
...
@@ -255,14 +248,12 @@ int i2d_X509_REQ_bio(BIO *bp, X509_REQ *req)
#ifndef NO_RSA
RSA
*
RSAPublicKey_dup
(
RSA
*
rsa
)
{
return
((
RSA
*
)
ASN1_dup
((
int
(
*
)())
i2d_RSAPublicKey
,
(
char
*
(
*
)())
d2i_RSAPublicKey
,(
char
*
)
rsa
));
return
ASN1_item_dup
(
&
RSAPublicKey_it
,
rsa
);
}
RSA
*
RSAPrivateKey_dup
(
RSA
*
rsa
)
{
return
((
RSA
*
)
ASN1_dup
((
int
(
*
)())
i2d_RSAPrivateKey
,
(
char
*
(
*
)())
d2i_RSAPrivateKey
,(
char
*
)
rsa
));
return
ASN1_item_dup
(
&
RSAPrivateKey_it
,
rsa
);
}
#ifndef NO_FP_API
...
...
@@ -395,20 +386,17 @@ int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa)
X509_ALGOR
*
X509_ALGOR_dup
(
X509_ALGOR
*
xn
)
{
return
((
X509_ALGOR
*
)
ASN1_dup
((
int
(
*
)())
i2d_X509_ALGOR
,
(
char
*
(
*
)())
d2i_X509_ALGOR
,(
char
*
)
xn
));
return
ASN1_item_dup
(
&
X509_ALGOR_it
,
xn
);
}
X509_NAME
*
X509_NAME_dup
(
X509_NAME
*
xn
)
{
return
((
X509_NAME
*
)
ASN1_dup
((
int
(
*
)())
i2d_X509_NAME
,
(
char
*
(
*
)())
d2i_X509_NAME
,(
char
*
)
xn
));
return
ASN1_item_dup
(
&
X509_NAME_it
,
xn
);
}
X509_NAME_ENTRY
*
X509_NAME_ENTRY_dup
(
X509_NAME_ENTRY
*
ne
)
{
return
((
X509_NAME_ENTRY
*
)
ASN1_dup
((
int
(
*
)())
i2d_X509_NAME_ENTRY
,
(
char
*
(
*
)())
d2i_X509_NAME_ENTRY
,(
char
*
)
ne
));
return
ASN1_item_dup
(
&
X509_NAME_ENTRY_it
,
ne
);
}
int
X509_digest
(
const
X509
*
data
,
const
EVP_MD
*
type
,
unsigned
char
*
md
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录