Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
c2c99e28
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 搜索 >>
提交
c2c99e28
编写于
1月 15, 2009
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update certificate hash line format to handle canonical format
and avoid MD5 dependency.
上级
8125d9f9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
25 addition
and
1 deletion
+25
-1
CHANGES
CHANGES
+7
-0
crypto/x509/x509.h
crypto/x509/x509.h
+1
-0
crypto/x509/x509_cmp.c
crypto/x509/x509_cmp.c
+17
-1
未找到文件。
CHANGES
浏览文件 @
c2c99e28
...
...
@@ -4,6 +4,13 @@
Changes between 0.9.8j and 0.9.9 [xx XXX xxxx]
*) Enhance the hash format used for certificate directory links. The new
form uses the canonical encoding (meaning equivalent names will work
even if they aren't identical) and uses SHA1 instead of MD5. This form
is incompatible with the older format and as a result c_rehash should
be used to rebuild symbolic links.
[Steve Henson]
*) Make PKCS#8 the default write format for private keys, replacing the
traditional format. This form is standardised, more secure and doesn't
include an implicit MD5 dependency.
...
...
crypto/x509/x509.h
浏览文件 @
c2c99e28
...
...
@@ -963,6 +963,7 @@ unsigned long X509_subject_name_hash(X509 *x);
int
X509_cmp
(
const
X509
*
a
,
const
X509
*
b
);
int
X509_NAME_cmp
(
const
X509_NAME
*
a
,
const
X509_NAME
*
b
);
unsigned
long
X509_NAME_hash
(
X509_NAME
*
x
);
unsigned
long
X509_NAME_hash_old
(
X509_NAME
*
x
);
int
X509_CRL_cmp
(
const
X509_CRL
*
a
,
const
X509_CRL
*
b
);
int
X509_CRL_match
(
const
X509_CRL
*
a
,
const
X509_CRL
*
b
);
...
...
crypto/x509/x509_cmp.c
浏览文件 @
c2c99e28
...
...
@@ -198,11 +198,27 @@ int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b)
}
unsigned
long
X509_NAME_hash
(
X509_NAME
*
x
)
{
unsigned
long
ret
=
0
;
unsigned
char
md
[
16
];
/* Make sure X509_NAME structure contains valid cached encoding */
i2d_X509_NAME
(
x
,
NULL
);
EVP_Digest
(
x
->
canon_enc
,
x
->
canon_enclen
,
md
,
NULL
,
EVP_sha1
(),
NULL
);
ret
=
(
((
unsigned
long
)
md
[
0
]
)
|
((
unsigned
long
)
md
[
1
]
<<
8L
)
|
((
unsigned
long
)
md
[
2
]
<<
16L
)
|
((
unsigned
long
)
md
[
3
]
<<
24L
)
)
&
0xffffffffL
;
return
(
ret
);
}
#ifndef OPENSSL_NO_MD5
/* I now DER encode the name and hash it. Since I cache the DER encoding,
* this is reasonably efficient. */
unsigned
long
X509_NAME_hash
(
X509_NAME
*
x
)
unsigned
long
X509_NAME_hash_old
(
X509_NAME
*
x
)
{
unsigned
long
ret
=
0
;
unsigned
char
md
[
16
];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录