Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
246e0931
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看板
提交
246e0931
编写于
3月 28, 2006
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix bug where freed OIDs could be accessed in EVP_cleanup() by
defering freeing in OBJ_cleanup().
上级
f7a3296d
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
37 addition
and
7 deletion
+37
-7
CHANGES
CHANGES
+4
-0
FAQ
FAQ
+1
-1
apps/apps.h
apps/apps.h
+2
-2
apps/dgst.c
apps/dgst.c
+1
-4
crypto/evp/names.c
crypto/evp/names.c
+11
-0
crypto/objects/obj_dat.c
crypto/objects/obj_dat.c
+18
-0
未找到文件。
CHANGES
浏览文件 @
246e0931
...
@@ -4,6 +4,10 @@
...
@@ -4,6 +4,10 @@
Changes between 0.9.8a and 0.9.9 [xx XXX xxxx]
Changes between 0.9.8a and 0.9.9 [xx XXX xxxx]
*) Don't free up OIDs in OBJ_cleanup() if they are in use by EVP_MD or
EVP_CIPHER structures to avoid later problems in EVP_cleanup().
[Steve Henson]
*) New utilities pkey and pkeyparam. These are similar to algorithm specific
*) New utilities pkey and pkeyparam. These are similar to algorithm specific
utilities such as rsa, dsa, dsaparam etc except they processes any key
utilities such as rsa, dsa, dsaparam etc except they processes any key
type.
type.
...
...
FAQ
浏览文件 @
246e0931
...
@@ -430,7 +430,7 @@ encryption so these certificates are now obsolete.
...
@@ -430,7 +430,7 @@ encryption so these certificates are now obsolete.
It doesn't: this extension is often the cause of confusion.
It doesn't: this extension is often the cause of confusion.
Consider a certificate chain A->B->C so that A signs
,
B and B signs C. Suppose
Consider a certificate chain A->B->C so that A signs B and B signs C. Suppose
certificate C contains AKID.
certificate C contains AKID.
The purpose of this extension is to identify the authority certificate B. This
The purpose of this extension is to identify the authority certificate B. This
...
...
apps/apps.h
浏览文件 @
246e0931
...
@@ -177,7 +177,7 @@ extern BIO *bio_err;
...
@@ -177,7 +177,7 @@ extern BIO *bio_err;
ENGINE_load_builtin_engines(); setup_ui_method(); } while(0)
ENGINE_load_builtin_engines(); setup_ui_method(); } while(0)
# define apps_shutdown() \
# define apps_shutdown() \
do { CONF_modules_unload(1); destroy_ui_method(); \
do { CONF_modules_unload(1); destroy_ui_method(); \
EVP_cleanup(); ENGINE_cleanup(); \
OBJ_cleanup();
EVP_cleanup(); ENGINE_cleanup(); \
CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); \
CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); \
ERR_free_strings(); } while(0)
ERR_free_strings(); } while(0)
# else
# else
...
@@ -187,7 +187,7 @@ extern BIO *bio_err;
...
@@ -187,7 +187,7 @@ extern BIO *bio_err;
setup_ui_method(); } while(0)
setup_ui_method(); } while(0)
# define apps_shutdown() \
# define apps_shutdown() \
do { CONF_modules_unload(1); destroy_ui_method(); \
do { CONF_modules_unload(1); destroy_ui_method(); \
EVP_cleanup(); \
OBJ_cleanup();
EVP_cleanup(); \
CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); \
CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); \
ERR_free_strings(); } while(0)
ERR_free_strings(); } while(0)
# endif
# endif
...
...
apps/dgst.c
浏览文件 @
246e0931
...
@@ -180,6 +180,7 @@ int MAIN(int argc, char **argv)
...
@@ -180,6 +180,7 @@ int MAIN(int argc, char **argv)
{
{
if
(
--
argc
<
1
)
break
;
if
(
--
argc
<
1
)
break
;
engine
=
*
(
++
argv
);
engine
=
*
(
++
argv
);
e
=
setup_engine
(
bio_err
,
engine
,
0
);
}
}
#endif
#endif
else
if
(
strcmp
(
*
argv
,
"-hex"
)
==
0
)
else
if
(
strcmp
(
*
argv
,
"-hex"
)
==
0
)
...
@@ -257,10 +258,6 @@ int MAIN(int argc, char **argv)
...
@@ -257,10 +258,6 @@ int MAIN(int argc, char **argv)
goto
end
;
goto
end
;
}
}
#ifndef OPENSSL_NO_ENGINE
e
=
setup_engine
(
bio_err
,
engine
,
0
);
#endif
in
=
BIO_new
(
BIO_s_file
());
in
=
BIO_new
(
BIO_s_file
());
bmd
=
BIO_new
(
BIO_f_md
());
bmd
=
BIO_new
(
BIO_f_md
());
if
(
debug
)
if
(
debug
)
...
...
crypto/evp/names.c
浏览文件 @
246e0931
...
@@ -62,12 +62,16 @@
...
@@ -62,12 +62,16 @@
#include <openssl/objects.h>
#include <openssl/objects.h>
#include <openssl/x509.h>
#include <openssl/x509.h>
extern
int
obj_cleanup_defer
;
extern
void
check_defer
(
int
nid
);
int
EVP_add_cipher
(
const
EVP_CIPHER
*
c
)
int
EVP_add_cipher
(
const
EVP_CIPHER
*
c
)
{
{
int
r
;
int
r
;
r
=
OBJ_NAME_add
(
OBJ_nid2sn
(
c
->
nid
),
OBJ_NAME_TYPE_CIPHER_METH
,(
const
char
*
)
c
);
r
=
OBJ_NAME_add
(
OBJ_nid2sn
(
c
->
nid
),
OBJ_NAME_TYPE_CIPHER_METH
,(
const
char
*
)
c
);
if
(
r
==
0
)
return
(
0
);
if
(
r
==
0
)
return
(
0
);
check_defer
(
c
->
nid
);
r
=
OBJ_NAME_add
(
OBJ_nid2ln
(
c
->
nid
),
OBJ_NAME_TYPE_CIPHER_METH
,(
const
char
*
)
c
);
r
=
OBJ_NAME_add
(
OBJ_nid2ln
(
c
->
nid
),
OBJ_NAME_TYPE_CIPHER_METH
,(
const
char
*
)
c
);
return
(
r
);
return
(
r
);
}
}
...
@@ -80,6 +84,7 @@ int EVP_add_digest(const EVP_MD *md)
...
@@ -80,6 +84,7 @@ int EVP_add_digest(const EVP_MD *md)
name
=
OBJ_nid2sn
(
md
->
type
);
name
=
OBJ_nid2sn
(
md
->
type
);
r
=
OBJ_NAME_add
(
name
,
OBJ_NAME_TYPE_MD_METH
,(
const
char
*
)
md
);
r
=
OBJ_NAME_add
(
name
,
OBJ_NAME_TYPE_MD_METH
,(
const
char
*
)
md
);
if
(
r
==
0
)
return
(
0
);
if
(
r
==
0
)
return
(
0
);
check_defer
(
md
->
type
);
r
=
OBJ_NAME_add
(
OBJ_nid2ln
(
md
->
type
),
OBJ_NAME_TYPE_MD_METH
,(
const
char
*
)
md
);
r
=
OBJ_NAME_add
(
OBJ_nid2ln
(
md
->
type
),
OBJ_NAME_TYPE_MD_METH
,(
const
char
*
)
md
);
if
(
r
==
0
)
return
(
0
);
if
(
r
==
0
)
return
(
0
);
...
@@ -88,6 +93,7 @@ int EVP_add_digest(const EVP_MD *md)
...
@@ -88,6 +93,7 @@ int EVP_add_digest(const EVP_MD *md)
r
=
OBJ_NAME_add
(
OBJ_nid2sn
(
md
->
pkey_type
),
r
=
OBJ_NAME_add
(
OBJ_nid2sn
(
md
->
pkey_type
),
OBJ_NAME_TYPE_MD_METH
|
OBJ_NAME_ALIAS
,
name
);
OBJ_NAME_TYPE_MD_METH
|
OBJ_NAME_ALIAS
,
name
);
if
(
r
==
0
)
return
(
0
);
if
(
r
==
0
)
return
(
0
);
check_defer
(
md
->
pkey_type
);
r
=
OBJ_NAME_add
(
OBJ_nid2ln
(
md
->
pkey_type
),
r
=
OBJ_NAME_add
(
OBJ_nid2ln
(
md
->
pkey_type
),
OBJ_NAME_TYPE_MD_METH
|
OBJ_NAME_ALIAS
,
name
);
OBJ_NAME_TYPE_MD_METH
|
OBJ_NAME_ALIAS
,
name
);
}
}
...
@@ -120,4 +126,9 @@ void EVP_cleanup(void)
...
@@ -120,4 +126,9 @@ void EVP_cleanup(void)
OBJ_NAME_cleanup
(
-
1
);
OBJ_NAME_cleanup
(
-
1
);
EVP_PBE_cleanup
();
EVP_PBE_cleanup
();
if
(
obj_cleanup_defer
==
2
)
{
obj_cleanup_defer
=
0
;
OBJ_cleanup
();
}
}
}
crypto/objects/obj_dat.c
浏览文件 @
246e0931
...
@@ -208,8 +208,26 @@ static IMPLEMENT_LHASH_DOALL_FN(cleanup1, ADDED_OBJ *)
...
@@ -208,8 +208,26 @@ static IMPLEMENT_LHASH_DOALL_FN(cleanup1, ADDED_OBJ *)
static
IMPLEMENT_LHASH_DOALL_FN
(
cleanup2
,
ADDED_OBJ
*
)
static
IMPLEMENT_LHASH_DOALL_FN
(
cleanup2
,
ADDED_OBJ
*
)
static
IMPLEMENT_LHASH_DOALL_FN
(
cleanup3
,
ADDED_OBJ
*
)
static
IMPLEMENT_LHASH_DOALL_FN
(
cleanup3
,
ADDED_OBJ
*
)
/* The purpose of obj_cleanup_defer is to avoid EVP_cleanup() attempting
* to use freed up OIDs. If neccessary the actual freeing up of OIDs is
* delayed.
*/
int
obj_cleanup_defer
=
0
;
void
check_defer
(
int
nid
)
{
if
(
obj_cleanup_defer
&&
nid
>=
NUM_NID
)
obj_cleanup_defer
=
1
;
}
void
OBJ_cleanup
(
void
)
void
OBJ_cleanup
(
void
)
{
{
if
(
obj_cleanup_defer
)
{
obj_cleanup_defer
=
2
;
return
;
}
if
(
added
==
NULL
)
return
;
if
(
added
==
NULL
)
return
;
added
->
down_load
=
0
;
added
->
down_load
=
0
;
lh_doall
(
added
,
LHASH_DOALL_FN
(
cleanup1
));
/* zero counters */
lh_doall
(
added
,
LHASH_DOALL_FN
(
cleanup1
));
/* zero counters */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录