Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
c00cee00
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看板
提交
c00cee00
编写于
1月 16, 2003
作者:
R
Richard Levitte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FreeBSD has /dev/crypto as well.
PR: 462
上级
8228f302
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
29 addition
and
27 deletion
+29
-27
crypto/engine/eng_all.c
crypto/engine/eng_all.c
+6
-6
crypto/engine/eng_cryptodev.c
crypto/engine/eng_cryptodev.c
+21
-19
crypto/evp/c_all.c
crypto/evp/c_all.c
+2
-2
未找到文件。
crypto/engine/eng_all.c
浏览文件 @
c00cee00
...
...
@@ -97,19 +97,19 @@ void ENGINE_load_builtin_engines(void)
ENGINE_load_4758cca
();
#endif
#endif
#if
def __OpenBSD__
#if
defined(__OpenBSD__) || defined(__FreeBSD__)
ENGINE_load_cryptodev
();
#endif
#endif
}
#if
def __OpenBSD__
void
ENGINE_setup_
openbsd
(
void
)
{
static
int
openbsd
_default_loaded
=
0
;
if
(
!
openbsd
_default_loaded
)
{
#if
defined(__OpenBSD__) || defined(__FreeBSD__)
void
ENGINE_setup_
bsd_cryptodev
(
void
)
{
static
int
bsd_cryptodev
_default_loaded
=
0
;
if
(
!
bsd_cryptodev
_default_loaded
)
{
ENGINE_load_cryptodev
();
ENGINE_register_all_complete
();
}
openbsd
_default_loaded
=
1
;
bsd_cryptodev
_default_loaded
=
1
;
}
#endif
crypto/engine/eng_cryptodev.c
浏览文件 @
c00cee00
...
...
@@ -33,31 +33,28 @@
#include <openssl/engine.h>
#include <openssl/evp.h>
#ifndef __OpenBSD__
void
ENGINE_load_cryptodev
(
void
)
{
/* This is a NOP unless __OpenBSD__ is defined */
return
;
}
#else
/* __OpenBSD__ */
#include <sys/types.h>
#if (defined(__unix__) || defined(unix)) && !defined(USG)
#include <sys/param.h>
# if (OpenBSD >= 200112) || ((__FreeBSD_version >= 470101 && __FreeBSD_version < 50000) || __FreeBSD_version >= 50041)
# define HAVE_CRYPTODEV
# endif
# if (OpenBSD >= 200110)
# define HAVE_SYSLOG_R
# endif
#endif
#if
OpenBSD < 200112
#if
ndef HAVE_CRYPTODEV
void
ENGINE_load_cryptodev
(
void
)
{
/* This is a NOP
unless we have release 3.0 (released december 2001)
*/
/* This is a NOP
on platforms without /dev/crypto
*/
return
;
}
#else
/* OpenBSD 3.0 or above */
#else
#include <sys/types.h>
#include <crypto/cryptodev.h>
#include <sys/ioctl.h>
#include <errno.h>
...
...
@@ -1032,12 +1029,18 @@ static DH_METHOD cryptodev_dh = {
static
int
cryptodev_ctrl
(
ENGINE
*
e
,
int
cmd
,
long
i
,
void
*
p
,
void
(
*
f
)())
{
#ifdef HAVE_SYSLOG_R
struct
syslog_data
sd
=
SYSLOG_DATA_INIT
;
#endif
switch
(
cmd
)
{
default:
#ifdef HAVE_SYSLOG_R
syslog_r
(
LOG_ERR
,
&
sd
,
"cryptodev_ctrl: unknown command %d"
,
cmd
);
#else
syslog
(
LOG_ERR
,
"cryptodev_ctrl: unknown command %d"
,
cmd
);
#endif
break
;
}
return
(
1
);
...
...
@@ -1064,7 +1067,7 @@ ENGINE_load_cryptodev(void)
close
(
fd
);
if
(
!
ENGINE_set_id
(
engine
,
"cryptodev"
)
||
!
ENGINE_set_name
(
engine
,
"
Open
BSD cryptodev engine"
)
||
!
ENGINE_set_name
(
engine
,
"BSD cryptodev engine"
)
||
!
ENGINE_set_ciphers
(
engine
,
cryptodev_engine_ciphers
)
||
!
ENGINE_set_digests
(
engine
,
cryptodev_engine_digests
)
||
!
ENGINE_set_ctrl_function
(
engine
,
cryptodev_ctrl
)
||
...
...
@@ -1126,5 +1129,4 @@ ENGINE_load_cryptodev(void)
ERR_clear_error
();
}
#endif
/* OpenBSD 3.0 or above */
#endif
/* __OpenBSD__ */
#endif
/* HAVE_CRYPTODEV */
crypto/evp/c_all.c
浏览文件 @
c00cee00
...
...
@@ -73,7 +73,7 @@ void OPENSSL_add_all_algorithms_noconf(void)
{
OpenSSL_add_all_ciphers
();
OpenSSL_add_all_digests
();
#if
def __OpenBSD__
ENGINE_setup_
openbsd
();
#if
defined(__OpenBSD__) || defined(__FreeBSD__)
ENGINE_setup_
bsd_cryptodev
();
#endif
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录