Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
0fc5cf08
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
大约 1 年 前同步成功
通知
9
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看板
提交
0fc5cf08
编写于
1月 22, 2002
作者:
B
Ben Laurie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make no config file not an error. Move /dev/crypto config to ctrl.
上级
f78d4a35
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
46 addition
and
14 deletion
+46
-14
crypto/bio/bio.h
crypto/bio/bio.h
+1
-1
crypto/bio/bio_err.c
crypto/bio/bio_err.c
+1
-0
crypto/bio/bss_file.c
crypto/bio/bss_file.c
+4
-1
crypto/conf/conf.h
crypto/conf/conf.h
+1
-0
crypto/conf/conf_def.c
crypto/conf/conf_def.c
+4
-1
crypto/conf/conf_err.c
crypto/conf/conf_err.c
+1
-0
crypto/conf/conf_mall.c
crypto/conf/conf_mall.c
+3
-2
crypto/engine/hw_openbsd_dev_crypto.c
crypto/engine/hw_openbsd_dev_crypto.c
+23
-9
crypto/err/err.c
crypto/err/err.c
+7
-0
crypto/err/err.h
crypto/err/err.h
+1
-0
未找到文件。
crypto/bio/bio.h
浏览文件 @
0fc5cf08
...
@@ -618,7 +618,6 @@ int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args);
...
@@ -618,7 +618,6 @@ int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args);
* made after this point may be overwritten when the script is next run.
* made after this point may be overwritten when the script is next run.
*/
*/
void
ERR_load_BIO_strings
(
void
);
void
ERR_load_BIO_strings
(
void
);
/* Error codes for the BIO functions. */
/* Error codes for the BIO functions. */
/* Function codes. */
/* Function codes. */
...
@@ -673,6 +672,7 @@ void ERR_load_BIO_strings(void);
...
@@ -673,6 +672,7 @@ void ERR_load_BIO_strings(void);
#define BIO_R_NO_HOSTNAME_SPECIFIED 112
#define BIO_R_NO_HOSTNAME_SPECIFIED 112
#define BIO_R_NO_PORT_DEFINED 113
#define BIO_R_NO_PORT_DEFINED 113
#define BIO_R_NO_PORT_SPECIFIED 114
#define BIO_R_NO_PORT_SPECIFIED 114
#define BIO_R_NO_SUCH_FILE 128
#define BIO_R_NULL_PARAMETER 115
#define BIO_R_NULL_PARAMETER 115
#define BIO_R_TAG_MISMATCH 116
#define BIO_R_TAG_MISMATCH 116
#define BIO_R_UNABLE_TO_BIND_SOCKET 117
#define BIO_R_UNABLE_TO_BIND_SOCKET 117
...
...
crypto/bio/bio_err.c
浏览文件 @
0fc5cf08
...
@@ -120,6 +120,7 @@ static ERR_STRING_DATA BIO_str_reasons[]=
...
@@ -120,6 +120,7 @@ static ERR_STRING_DATA BIO_str_reasons[]=
{
BIO_R_NO_HOSTNAME_SPECIFIED
,
"no hostname specified"
},
{
BIO_R_NO_HOSTNAME_SPECIFIED
,
"no hostname specified"
},
{
BIO_R_NO_PORT_DEFINED
,
"no port defined"
},
{
BIO_R_NO_PORT_DEFINED
,
"no port defined"
},
{
BIO_R_NO_PORT_SPECIFIED
,
"no port specified"
},
{
BIO_R_NO_PORT_SPECIFIED
,
"no port specified"
},
{
BIO_R_NO_SUCH_FILE
,
"no such file"
},
{
BIO_R_NULL_PARAMETER
,
"null parameter"
},
{
BIO_R_NULL_PARAMETER
,
"null parameter"
},
{
BIO_R_TAG_MISMATCH
,
"tag mismatch"
},
{
BIO_R_TAG_MISMATCH
,
"tag mismatch"
},
{
BIO_R_UNABLE_TO_BIND_SOCKET
,
"unable to bind socket"
},
{
BIO_R_UNABLE_TO_BIND_SOCKET
,
"unable to bind socket"
},
...
...
crypto/bio/bss_file.c
浏览文件 @
0fc5cf08
...
@@ -103,7 +103,10 @@ BIO *BIO_new_file(const char *filename, const char *mode)
...
@@ -103,7 +103,10 @@ BIO *BIO_new_file(const char *filename, const char *mode)
{
{
SYSerr
(
SYS_F_FOPEN
,
get_last_sys_error
());
SYSerr
(
SYS_F_FOPEN
,
get_last_sys_error
());
ERR_add_error_data
(
5
,
"fopen('"
,
filename
,
"','"
,
mode
,
"')"
);
ERR_add_error_data
(
5
,
"fopen('"
,
filename
,
"','"
,
mode
,
"')"
);
BIOerr
(
BIO_F_BIO_NEW_FILE
,
ERR_R_SYS_LIB
);
if
(
errno
==
ENOENT
)
BIOerr
(
BIO_F_BIO_NEW_FILE
,
BIO_R_NO_SUCH_FILE
);
else
BIOerr
(
BIO_F_BIO_NEW_FILE
,
ERR_R_SYS_LIB
);
return
(
NULL
);
return
(
NULL
);
}
}
if
((
ret
=
BIO_new
(
BIO_s_file_internal
()))
==
NULL
)
if
((
ret
=
BIO_new
(
BIO_s_file_internal
()))
==
NULL
)
...
...
crypto/conf/conf.h
浏览文件 @
0fc5cf08
...
@@ -232,6 +232,7 @@ void ERR_load_CONF_strings(void);
...
@@ -232,6 +232,7 @@ void ERR_load_CONF_strings(void);
#define CONF_R_NO_CONF 105
#define CONF_R_NO_CONF 105
#define CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE 106
#define CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE 106
#define CONF_R_NO_SECTION 107
#define CONF_R_NO_SECTION 107
#define CONF_R_NO_SUCH_FILE 114
#define CONF_R_NO_VALUE 108
#define CONF_R_NO_VALUE 108
#define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103
#define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103
#define CONF_R_UNKNOWN_MODULE_NAME 113
#define CONF_R_UNKNOWN_MODULE_NAME 113
...
...
crypto/conf/conf_def.c
浏览文件 @
0fc5cf08
...
@@ -192,7 +192,10 @@ static int def_load(CONF *conf, const char *name, long *line)
...
@@ -192,7 +192,10 @@ static int def_load(CONF *conf, const char *name, long *line)
#endif
#endif
if
(
in
==
NULL
)
if
(
in
==
NULL
)
{
{
CONFerr
(
CONF_F_CONF_LOAD
,
ERR_R_SYS_LIB
);
if
(
ERR_GET_REASON
(
ERR_peek_top_error
())
==
BIO_R_NO_SUCH_FILE
)
CONFerr
(
CONF_F_CONF_LOAD
,
CONF_R_NO_SUCH_FILE
);
else
CONFerr
(
CONF_F_CONF_LOAD
,
ERR_R_SYS_LIB
);
return
0
;
return
0
;
}
}
...
...
crypto/conf/conf_err.c
浏览文件 @
0fc5cf08
...
@@ -100,6 +100,7 @@ static ERR_STRING_DATA CONF_str_reasons[]=
...
@@ -100,6 +100,7 @@ static ERR_STRING_DATA CONF_str_reasons[]=
{
CONF_R_NO_CONF
,
"no conf"
},
{
CONF_R_NO_CONF
,
"no conf"
},
{
CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE
,
"no conf or environment variable"
},
{
CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE
,
"no conf or environment variable"
},
{
CONF_R_NO_SECTION
,
"no section"
},
{
CONF_R_NO_SECTION
,
"no section"
},
{
CONF_R_NO_SUCH_FILE
,
"no such file"
},
{
CONF_R_NO_VALUE
,
"no value"
},
{
CONF_R_NO_VALUE
,
"no value"
},
{
CONF_R_UNABLE_TO_CREATE_NEW_SECTION
,
"unable to create new section"
},
{
CONF_R_UNABLE_TO_CREATE_NEW_SECTION
,
"unable to create new section"
},
{
CONF_R_UNKNOWN_MODULE_NAME
,
"unknown module name"
},
{
CONF_R_UNKNOWN_MODULE_NAME
,
"unknown module name"
},
...
...
crypto/conf/conf_mall.c
浏览文件 @
0fc5cf08
...
@@ -92,9 +92,10 @@ void OPENSSL_config(void)
...
@@ -92,9 +92,10 @@ void OPENSSL_config(void)
if
(
!
file
)
if
(
!
file
)
return
;
return
;
ret
=
CONF_modules_load_file
(
file
,
"openssl_config"
,
0
);
ret
=
CONF_modules_load_file
(
file
,
"openssl_config"
,
0
)
<=
0
&&
ERR_GET_REASON
(
ERR_peek_top_error
())
!=
CONF_R_NO_SUCH_FILE
;
OPENSSL_free
(
file
);
OPENSSL_free
(
file
);
if
(
ret
<=
0
)
if
(
ret
)
{
{
BIO
*
bio_err
;
BIO
*
bio_err
;
ERR_load_crypto_strings
();
ERR_load_crypto_strings
();
...
...
crypto/engine/hw_openbsd_dev_crypto.c
浏览文件 @
0fc5cf08
...
@@ -96,12 +96,25 @@ static const char dev_crypto_name[] = "OpenBSD /dev/crypto";
...
@@ -96,12 +96,25 @@ static const char dev_crypto_name[] = "OpenBSD /dev/crypto";
static
long
allow_misaligned
;
static
long
allow_misaligned
;
static
int
init_conf
(
CONF_IMODULE
*
md
,
const
CONF
*
conf
)
#define DEV_CRYPTO_CMD_ALLOW_MISALIGNED ENGINE_CMD_BASE
static
const
ENGINE_CMD_DEFN
dev_crypto_cmd_defns
[]
=
{
{
if
(
!
NCONF_get_number
(
conf
,
CONF_imodule_get_value
(
md
),
"allow_misaligned"
,
{
DEV_CRYPTO_CMD_ALLOW_MISALIGNED
,
&
allow_misaligned
))
"allow_misaligned"
,
return
0
;
"Permit misaligned data to be used"
,
printf
(
"allow misaligned=%ld
\n
"
,
allow_misaligned
);
ENGINE_CMD_FLAG_NUMERIC
},
{
0
,
NULL
,
NULL
,
0
}
};
static
int
dev_crypto_ctrl
(
ENGINE
*
e
,
int
cmd
,
long
i
,
void
*
p
,
void
(
*
f
)())
{
switch
(
cmd
)
{
case
DEV_CRYPTO_CMD_ALLOW_MISALIGNED
:
allow_misaligned
=
i
;
printf
(
"allow misaligned=%ld
\n
"
,
allow_misaligned
);
break
;
}
return
1
;
return
1
;
}
}
...
@@ -110,11 +123,12 @@ static ENGINE *engine_openbsd_dev_crypto(void)
...
@@ -110,11 +123,12 @@ static ENGINE *engine_openbsd_dev_crypto(void)
{
{
ENGINE
*
engine
=
ENGINE_new
();
ENGINE
*
engine
=
ENGINE_new
();
CONF_module_add
(
dev_crypto_id
,
init_conf
,
NULL
);
if
(
!
ENGINE_set_id
(
engine
,
dev_crypto_id
)
||
if
(
!
ENGINE_set_id
(
engine
,
dev_crypto_id
)
||
!
ENGINE_set_name
(
engine
,
dev_crypto_name
)
||
!
ENGINE_set_name
(
engine
,
dev_crypto_name
)
||
!
ENGINE_set_ciphers
(
engine
,
dev_crypto_ciphers
)
||
!
ENGINE_set_ciphers
(
engine
,
dev_crypto_ciphers
)
||
!
ENGINE_set_digests
(
engine
,
dev_crypto_digests
))
!
ENGINE_set_digests
(
engine
,
dev_crypto_digests
)
||
!
ENGINE_set_ctrl_function
(
engine
,
dev_crypto_ctrl
)
||
!
ENGINE_set_cmd_defns
(
engine
,
dev_crypto_cmd_defns
))
{
{
ENGINE_free
(
engine
);
ENGINE_free
(
engine
);
return
NULL
;
return
NULL
;
...
...
crypto/err/err.c
浏览文件 @
0fc5cf08
...
@@ -679,6 +679,13 @@ unsigned long ERR_get_error_line_data(const char **file, int *line,
...
@@ -679,6 +679,13 @@ unsigned long ERR_get_error_line_data(const char **file, int *line,
unsigned
long
ERR_peek_error
(
void
)
unsigned
long
ERR_peek_error
(
void
)
{
return
(
get_error_values
(
0
,
NULL
,
NULL
,
NULL
,
NULL
));
}
{
return
(
get_error_values
(
0
,
NULL
,
NULL
,
NULL
,
NULL
));
}
unsigned
long
ERR_peek_top_error
(
void
)
{
ERR_STATE
*
es
=
ERR_get_state
();
return
es
->
err_buffer
[
es
->
top
];
}
unsigned
long
ERR_peek_error_line
(
const
char
**
file
,
unsigned
long
ERR_peek_error_line
(
const
char
**
file
,
int
*
line
)
int
*
line
)
{
return
(
get_error_values
(
0
,
file
,
line
,
NULL
,
NULL
));
}
{
return
(
get_error_values
(
0
,
file
,
line
,
NULL
,
NULL
));
}
...
...
crypto/err/err.h
浏览文件 @
0fc5cf08
...
@@ -243,6 +243,7 @@ unsigned long ERR_get_error_line(const char **file,int *line);
...
@@ -243,6 +243,7 @@ unsigned long ERR_get_error_line(const char **file,int *line);
unsigned
long
ERR_get_error_line_data
(
const
char
**
file
,
int
*
line
,
unsigned
long
ERR_get_error_line_data
(
const
char
**
file
,
int
*
line
,
const
char
**
data
,
int
*
flags
);
const
char
**
data
,
int
*
flags
);
unsigned
long
ERR_peek_error
(
void
);
unsigned
long
ERR_peek_error
(
void
);
unsigned
long
ERR_peek_top_error
(
void
);
unsigned
long
ERR_peek_error_line
(
const
char
**
file
,
int
*
line
);
unsigned
long
ERR_peek_error_line
(
const
char
**
file
,
int
*
line
);
unsigned
long
ERR_peek_error_line_data
(
const
char
**
file
,
int
*
line
,
unsigned
long
ERR_peek_error_line_data
(
const
char
**
file
,
int
*
line
,
const
char
**
data
,
int
*
flags
);
const
char
**
data
,
int
*
flags
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录