Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
54f64516
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
9 个月 前同步成功
通知
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 搜索 >>
提交
54f64516
编写于
6月 11, 2003
作者:
R
Richard Levitte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add functionality to set marks on the error stack and to pop all errors to the next mark.
上级
49096719
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
57 addition
and
6 deletion
+57
-6
CHANGES
CHANGES
+5
-1
crypto/err/err.c
crypto/err/err.c
+46
-5
crypto/err/err.h
crypto/err/err.h
+6
-0
未找到文件。
CHANGES
浏览文件 @
54f64516
...
@@ -4,6 +4,10 @@
...
@@ -4,6 +4,10 @@
Changes between 0.9.7c and 0.9.8 [xx XXX xxxx]
Changes between 0.9.7c and 0.9.8 [xx XXX xxxx]
*) Add the functions ERR_set_mark() and ERR_pop_to_mark() for better
control of the error stack.
[Richard Levitte]
*) Add support for STORE in ENGINE.
*) Add support for STORE in ENGINE.
[Richard Levitte]
[Richard Levitte]
...
@@ -662,7 +666,7 @@ yet to be integrated into this CVS branch:
...
@@ -662,7 +666,7 @@ yet to be integrated into this CVS branch:
the config script, much like the NetBSD support.
the config script, much like the NetBSD support.
[Richard Levitte & Kris Kennaway <kris@obsecurity.org>]
[Richard Levitte & Kris Kennaway <kris@obsecurity.org>]
Changes between 0.9.6
h
and 0.9.7 [31 Dec 2002]
Changes between 0.9.6
j
and 0.9.7 [31 Dec 2002]
*) Fix session ID handling in SSLv2 client code: the SERVER FINISHED
*) Fix session ID handling in SSLv2 client code: the SERVER FINISHED
code (06) was taken as the first octet of the session ID and the last
code (06) was taken as the first octet of the session ID and the last
...
...
crypto/err/err.c
浏览文件 @
54f64516
...
@@ -548,13 +548,24 @@ static void build_SYS_str_reasons()
...
@@ -548,13 +548,24 @@ static void build_SYS_str_reasons()
#endif
#endif
#define err_clear_data(p,i) \
#define err_clear_data(p,i) \
do { \
if (((p)->err_data[i] != NULL) && \
if (((p)->err_data[i] != NULL) && \
(p)->err_data_flags[i] & ERR_TXT_MALLOCED) \
(p)->err_data_flags[i] & ERR_TXT_MALLOCED) \
{ \
{ \
OPENSSL_free((p)->err_data[i]); \
OPENSSL_free((p)->err_data[i]); \
(p)->err_data[i]=NULL; \
(p)->err_data[i]=NULL; \
} \
} \
(p)->err_data_flags[i]=0;
(p)->err_data_flags[i]=0; \
} while(0)
#define err_clear(p,i) \
do { \
es->err_flags[i]=0; \
es->err_buffer[i]=0; \
err_clear_data(p,i); \
es->err_file[i]=NULL; \
es->err_line[i]= -1; \
} while(0)
static
void
ERR_STATE_free
(
ERR_STATE
*
s
)
static
void
ERR_STATE_free
(
ERR_STATE
*
s
)
{
{
...
@@ -645,6 +656,7 @@ void ERR_put_error(int lib, int func, int reason, const char *file,
...
@@ -645,6 +656,7 @@ void ERR_put_error(int lib, int func, int reason, const char *file,
es
->
top
=
(
es
->
top
+
1
)
%
ERR_NUM_ERRORS
;
es
->
top
=
(
es
->
top
+
1
)
%
ERR_NUM_ERRORS
;
if
(
es
->
top
==
es
->
bottom
)
if
(
es
->
top
==
es
->
bottom
)
es
->
bottom
=
(
es
->
bottom
+
1
)
%
ERR_NUM_ERRORS
;
es
->
bottom
=
(
es
->
bottom
+
1
)
%
ERR_NUM_ERRORS
;
es
->
err_flags
[
es
->
top
]
=
0
;
es
->
err_buffer
[
es
->
top
]
=
ERR_PACK
(
lib
,
func
,
reason
);
es
->
err_buffer
[
es
->
top
]
=
ERR_PACK
(
lib
,
func
,
reason
);
es
->
err_file
[
es
->
top
]
=
file
;
es
->
err_file
[
es
->
top
]
=
file
;
es
->
err_line
[
es
->
top
]
=
line
;
es
->
err_line
[
es
->
top
]
=
line
;
...
@@ -660,10 +672,7 @@ void ERR_clear_error(void)
...
@@ -660,10 +672,7 @@ void ERR_clear_error(void)
for
(
i
=
0
;
i
<
ERR_NUM_ERRORS
;
i
++
)
for
(
i
=
0
;
i
<
ERR_NUM_ERRORS
;
i
++
)
{
{
es
->
err_buffer
[
i
]
=
0
;
err_clear
(
es
,
i
);
err_clear_data
(
es
,
i
);
es
->
err_file
[
i
]
=
NULL
;
es
->
err_line
[
i
]
=
-
1
;
}
}
es
->
top
=
es
->
bottom
=
0
;
es
->
top
=
es
->
bottom
=
0
;
}
}
...
@@ -1034,3 +1043,35 @@ void ERR_add_error_data(int num, ...)
...
@@ -1034,3 +1043,35 @@ void ERR_add_error_data(int num, ...)
err:
err:
va_end
(
args
);
va_end
(
args
);
}
}
int
ERR_set_mark
(
void
)
{
int
i
=
0
;
ERR_STATE
*
es
;
es
=
ERR_get_state
();
if
(
es
->
bottom
==
es
->
top
)
return
0
;
es
->
err_flags
[
es
->
top
]
|=
ERR_FLAG_MARK
;
return
1
;
}
int
ERR_pop_to_mark
(
void
)
{
int
i
=
0
;
ERR_STATE
*
es
;
es
=
ERR_get_state
();
while
(
es
->
bottom
!=
es
->
top
&&
(
es
->
err_flags
[
es
->
top
]
&
ERR_FLAG_MARK
)
==
0
)
{
err_clear
(
es
,
es
->
top
);
es
->
top
-=
1
;
if
(
es
->
top
==
-
1
)
es
->
top
=
ERR_NUM_ERRORS
;
}
if
(
es
->
bottom
==
es
->
top
)
return
0
;
es
->
err_flags
[
es
->
top
]
&=~
ERR_FLAG_MARK
;
return
1
;
}
crypto/err/err.h
浏览文件 @
54f64516
...
@@ -88,10 +88,13 @@ extern "C" {
...
@@ -88,10 +88,13 @@ extern "C" {
#define ERR_TXT_MALLOCED 0x01
#define ERR_TXT_MALLOCED 0x01
#define ERR_TXT_STRING 0x02
#define ERR_TXT_STRING 0x02
#define ERR_FLAG_MARK 0x01
#define ERR_NUM_ERRORS 16
#define ERR_NUM_ERRORS 16
typedef
struct
err_state_st
typedef
struct
err_state_st
{
{
unsigned
long
pid
;
unsigned
long
pid
;
int
err_flags
[
ERR_NUM_ERRORS
];
unsigned
long
err_buffer
[
ERR_NUM_ERRORS
];
unsigned
long
err_buffer
[
ERR_NUM_ERRORS
];
char
*
err_data
[
ERR_NUM_ERRORS
];
char
*
err_data
[
ERR_NUM_ERRORS
];
int
err_data_flags
[
ERR_NUM_ERRORS
];
int
err_data_flags
[
ERR_NUM_ERRORS
];
...
@@ -294,6 +297,9 @@ LHASH *ERR_get_err_state_table(void);
...
@@ -294,6 +297,9 @@ LHASH *ERR_get_err_state_table(void);
int
ERR_get_next_error_library
(
void
);
int
ERR_get_next_error_library
(
void
);
int
ERR_set_mark
(
void
);
int
ERR_pop_to_mark
(
void
);
/* This opaque type encapsulates the low-level error-state functions */
/* This opaque type encapsulates the low-level error-state functions */
typedef
struct
st_ERR_FNS
ERR_FNS
;
typedef
struct
st_ERR_FNS
ERR_FNS
;
/* An application can use this function and provide the return value to loaded
/* An application can use this function and provide the return value to loaded
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录