Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
9dd5ae65
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看板
提交
9dd5ae65
编写于
1月 18, 2002
作者:
B
Ben Laurie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Constification, add config to /dev/crypto.
上级
e1e87607
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
121 addition
and
68 deletion
+121
-68
Configure
Configure
+1
-0
crypto/aes/Makefile.ssl
crypto/aes/Makefile.ssl
+9
-5
crypto/asn1/Makefile.ssl
crypto/asn1/Makefile.ssl
+15
-0
crypto/asn1/asn_moid.c
crypto/asn1/asn_moid.c
+1
-1
crypto/conf/conf.h
crypto/conf/conf.h
+22
-19
crypto/conf/conf_api.c
crypto/conf/conf_api.c
+9
-8
crypto/conf/conf_api.h
crypto/conf/conf_api.h
+7
-5
crypto/conf/conf_def.c
crypto/conf/conf_def.c
+6
-6
crypto/conf/conf_lib.c
crypto/conf/conf_lib.c
+10
-8
crypto/conf/conf_mod.c
crypto/conf/conf_mod.c
+22
-14
crypto/engine/Makefile.ssl
crypto/engine/Makefile.ssl
+1
-0
crypto/engine/hw_openbsd_dev_crypto.c
crypto/engine/hw_openbsd_dev_crypto.c
+15
-1
crypto/evp/digest.c
crypto/evp/digest.c
+1
-1
crypto/evp/evp_test.c
crypto/evp/evp_test.c
+2
-0
未找到文件。
Configure
浏览文件 @
9dd5ae65
...
@@ -134,6 +134,7 @@ my %table=(
...
@@ -134,6 +134,7 @@ my %table=(
"debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror::(unknown)::-lefence::::",
"debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror::(unknown)::-lefence::::",
"debug-ben", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::asm/bn86-elf.o asm/co86-elf.o",
"debug-ben", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::asm/bn86-elf.o asm/co86-elf.o",
"debug-ben-openbsd","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
"debug-ben-openbsd","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
"debug-ben-openbsd-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::",
"debug-ben-debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::::",
"debug-ben-debug", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::::",
"debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::",
"debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::",
"debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
"debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}",
...
...
crypto/aes/Makefile.ssl
浏览文件 @
9dd5ae65
...
@@ -85,8 +85,12 @@ clean:
...
@@ -85,8 +85,12 @@ clean:
# DO NOT DELETE THIS LINE -- make depend depends on it.
# DO NOT DELETE THIS LINE -- make depend depends on it.
aes_cbc.o
:
../../include/openssl/aes.h aes_cbc.c aes_locl.h
aes_cbc.o
:
../../include/openssl/aes.h ../../include/openssl/e_os2.h
aes_core.o
:
../../include/openssl/aes.h aes_core.c aes_locl.h
aes_cbc.o
:
../../include/openssl/opensslconf.h aes_cbc.c aes_locl.h
aes_ecb.o
:
../../include/openssl/aes.h aes_ecb.c aes_locl.h
aes_core.o
:
../../include/openssl/aes.h ../../include/openssl/e_os2.h
aes_misc.o
:
../../include/openssl/aes.h ../../include/openssl/opensslv.h
aes_core.o
:
../../include/openssl/opensslconf.h aes_core.c aes_locl.h
aes_misc.o
:
aes_locl.h aes_misc.c
aes_ecb.o
:
../../include/openssl/aes.h ../../include/openssl/e_os2.h
aes_ecb.o
:
../../include/openssl/opensslconf.h aes_ecb.c aes_locl.h
aes_misc.o
:
../../include/openssl/aes.h ../../include/openssl/e_os2.h
aes_misc.o
:
../../include/openssl/opensslconf.h
aes_misc.o
:
../../include/openssl/opensslv.h aes_locl.h aes_misc.c
crypto/asn1/Makefile.ssl
浏览文件 @
9dd5ae65
...
@@ -363,6 +363,21 @@ asn1_par.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
...
@@ -363,6 +363,21 @@ asn1_par.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
asn1_par.o
:
../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
asn1_par.o
:
../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
asn1_par.o
:
../../include/openssl/safestack.h ../../include/openssl/stack.h
asn1_par.o
:
../../include/openssl/safestack.h ../../include/openssl/stack.h
asn1_par.o
:
../../include/openssl/symhacks.h ../cryptlib.h asn1_par.c
asn1_par.o
:
../../include/openssl/symhacks.h ../cryptlib.h asn1_par.c
asn_moid.o
:
../../e_os.h ../../include/openssl/asn1.h
asn_moid.o
:
../../include/openssl/bio.h ../../include/openssl/bn.h
asn_moid.o
:
../../include/openssl/buffer.h ../../include/openssl/conf.h
asn_moid.o
:
../../include/openssl/crypto.h ../../include/openssl/dh.h
asn_moid.o
:
../../include/openssl/dsa.h ../../include/openssl/dso.h
asn_moid.o
:
../../include/openssl/e_os2.h ../../include/openssl/err.h
asn_moid.o
:
../../include/openssl/evp.h ../../include/openssl/lhash.h
asn_moid.o
:
../../include/openssl/obj_mac.h ../../include/openssl/objects.h
asn_moid.o
:
../../include/openssl/opensslconf.h
asn_moid.o
:
../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
asn_moid.o
:
../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
asn_moid.o
:
../../include/openssl/safestack.h ../../include/openssl/sha.h
asn_moid.o
:
../../include/openssl/stack.h ../../include/openssl/symhacks.h
asn_moid.o
:
../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
asn_moid.o
:
../cryptlib.h asn_moid.c
asn_pack.o
:
../../e_os.h ../../include/openssl/asn1.h
asn_pack.o
:
../../e_os.h ../../include/openssl/asn1.h
asn_pack.o
:
../../include/openssl/bio.h ../../include/openssl/bn.h
asn_pack.o
:
../../include/openssl/bio.h ../../include/openssl/bn.h
asn_pack.o
:
../../include/openssl/buffer.h ../../include/openssl/crypto.h
asn_pack.o
:
../../include/openssl/buffer.h ../../include/openssl/crypto.h
...
...
crypto/asn1/asn_moid.c
浏览文件 @
9dd5ae65
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
/* Simple ASN1 OID module: add all objects in a given section */
/* Simple ASN1 OID module: add all objects in a given section */
/* NOTE: doesn't do anything other than print debug messages yet... */
/* NOTE: doesn't do anything other than print debug messages yet... */
static
int
oid_module_init
(
CONF_IMODULE
*
md
,
CONF
*
cnf
)
static
int
oid_module_init
(
CONF_IMODULE
*
md
,
const
CONF
*
cnf
)
{
{
fprintf
(
stderr
,
"Called oid_module_init: name %s, value %s
\n
"
,
fprintf
(
stderr
,
"Called oid_module_init: name %s, value %s
\n
"
,
CONF_imodule_get_name
(
md
),
CONF_imodule_get_value
(
md
));
CONF_imodule_get_name
(
md
),
CONF_imodule_get_value
(
md
));
...
...
crypto/conf/conf.h
浏览文件 @
9dd5ae65
...
@@ -93,9 +93,9 @@ struct conf_method_st
...
@@ -93,9 +93,9 @@ struct conf_method_st
int
(
*
destroy
)(
CONF
*
conf
);
int
(
*
destroy
)(
CONF
*
conf
);
int
(
*
destroy_data
)(
CONF
*
conf
);
int
(
*
destroy_data
)(
CONF
*
conf
);
int
(
*
load_bio
)(
CONF
*
conf
,
BIO
*
bp
,
long
*
eline
);
int
(
*
load_bio
)(
CONF
*
conf
,
BIO
*
bp
,
long
*
eline
);
int
(
*
dump
)(
CONF
*
conf
,
BIO
*
bp
);
int
(
*
dump
)(
const
CONF
*
conf
,
BIO
*
bp
);
int
(
*
is_number
)(
CONF
*
conf
,
char
c
);
int
(
*
is_number
)(
const
CONF
*
conf
,
char
c
);
int
(
*
to_int
)(
CONF
*
conf
,
char
c
);
int
(
*
to_int
)(
const
CONF
*
conf
,
char
c
);
int
(
*
load
)(
CONF
*
conf
,
const
char
*
name
,
long
*
eline
);
int
(
*
load
)(
CONF
*
conf
,
const
char
*
name
,
long
*
eline
);
};
};
...
@@ -105,7 +105,7 @@ typedef struct conf_imodule_st CONF_IMODULE;
...
@@ -105,7 +105,7 @@ typedef struct conf_imodule_st CONF_IMODULE;
typedef
struct
conf_module_st
CONF_MODULE
;
typedef
struct
conf_module_st
CONF_MODULE
;
/* DSO module function typedefs */
/* DSO module function typedefs */
typedef
int
conf_init_func
(
CONF_IMODULE
*
md
,
CONF
*
cnf
);
typedef
int
conf_init_func
(
CONF_IMODULE
*
md
,
const
CONF
*
cnf
);
typedef
void
conf_finish_func
(
CONF_IMODULE
*
md
);
typedef
void
conf_finish_func
(
CONF_IMODULE
*
md
);
#define CONF_MFLAGS_IGNORE_ERRORS 0x1
#define CONF_MFLAGS_IGNORE_ERRORS 0x1
...
@@ -120,9 +120,9 @@ LHASH *CONF_load(LHASH *conf,const char *file,long *eline);
...
@@ -120,9 +120,9 @@ LHASH *CONF_load(LHASH *conf,const char *file,long *eline);
LHASH
*
CONF_load_fp
(
LHASH
*
conf
,
FILE
*
fp
,
long
*
eline
);
LHASH
*
CONF_load_fp
(
LHASH
*
conf
,
FILE
*
fp
,
long
*
eline
);
#endif
#endif
LHASH
*
CONF_load_bio
(
LHASH
*
conf
,
BIO
*
bp
,
long
*
eline
);
LHASH
*
CONF_load_bio
(
LHASH
*
conf
,
BIO
*
bp
,
long
*
eline
);
STACK_OF
(
CONF_VALUE
)
*
CONF_get_section
(
LHASH
*
conf
,
char
*
section
);
STACK_OF
(
CONF_VALUE
)
*
CONF_get_section
(
LHASH
*
conf
,
c
onst
c
har
*
section
);
char
*
CONF_get_string
(
LHASH
*
conf
,
c
har
*
group
,
char
*
name
);
char
*
CONF_get_string
(
LHASH
*
conf
,
c
onst
char
*
group
,
const
char
*
name
);
long
CONF_get_number
(
LHASH
*
conf
,
c
har
*
group
,
char
*
name
);
long
CONF_get_number
(
LHASH
*
conf
,
c
onst
char
*
group
,
const
char
*
name
);
void
CONF_free
(
LHASH
*
conf
);
void
CONF_free
(
LHASH
*
conf
);
int
CONF_dump_fp
(
LHASH
*
conf
,
FILE
*
out
);
int
CONF_dump_fp
(
LHASH
*
conf
,
FILE
*
out
);
int
CONF_dump_bio
(
LHASH
*
conf
,
BIO
*
out
);
int
CONF_dump_bio
(
LHASH
*
conf
,
BIO
*
out
);
...
@@ -153,11 +153,12 @@ int NCONF_load(CONF *conf,const char *file,long *eline);
...
@@ -153,11 +153,12 @@ int NCONF_load(CONF *conf,const char *file,long *eline);
int
NCONF_load_fp
(
CONF
*
conf
,
FILE
*
fp
,
long
*
eline
);
int
NCONF_load_fp
(
CONF
*
conf
,
FILE
*
fp
,
long
*
eline
);
#endif
#endif
int
NCONF_load_bio
(
CONF
*
conf
,
BIO
*
bp
,
long
*
eline
);
int
NCONF_load_bio
(
CONF
*
conf
,
BIO
*
bp
,
long
*
eline
);
STACK_OF
(
CONF_VALUE
)
*
NCONF_get_section
(
CONF
*
conf
,
char
*
section
);
STACK_OF
(
CONF_VALUE
)
*
NCONF_get_section
(
const
CONF
*
conf
,
const
char
*
section
);
char
*
NCONF_get_string
(
CONF
*
conf
,
char
*
group
,
char
*
name
);
char
*
NCONF_get_string
(
const
CONF
*
conf
,
const
char
*
group
,
const
char
*
name
);
int
NCONF_get_number_e
(
CONF
*
conf
,
char
*
group
,
char
*
name
,
long
*
result
);
int
NCONF_get_number_e
(
const
CONF
*
conf
,
const
char
*
group
,
const
char
*
name
,
int
NCONF_dump_fp
(
CONF
*
conf
,
FILE
*
out
);
long
*
result
);
int
NCONF_dump_bio
(
CONF
*
conf
,
BIO
*
out
);
int
NCONF_dump_fp
(
const
CONF
*
conf
,
FILE
*
out
);
int
NCONF_dump_bio
(
const
CONF
*
conf
,
BIO
*
out
);
#if 0 /* The following function has no error checking,
#if 0 /* The following function has no error checking,
and should therefore be avoided */
and should therefore be avoided */
...
@@ -168,19 +169,21 @@ long NCONF_get_number(CONF *conf,char *group,char *name);
...
@@ -168,19 +169,21 @@ long NCONF_get_number(CONF *conf,char *group,char *name);
/* Module functions */
/* Module functions */
int
CONF_modules_load
(
CONF
*
cnf
,
char
*
appname
,
unsigned
long
flags
);
int
CONF_modules_load
(
const
CONF
*
cnf
,
const
char
*
appname
,
int
CONF_modules_load_file
(
char
*
filename
,
char
*
appname
,
unsigned
long
flags
);
unsigned
long
flags
);
int
CONF_modules_load_file
(
const
char
*
filename
,
const
char
*
appname
,
unsigned
long
flags
);
void
CONF_modules_unload
(
int
all
);
void
CONF_modules_unload
(
int
all
);
void
CONF_modules_finish
(
void
);
void
CONF_modules_finish
(
void
);
int
CONF_module_add
(
const
char
*
name
,
conf_init_func
*
ifunc
,
int
CONF_module_add
(
const
char
*
name
,
conf_init_func
*
ifunc
,
conf_finish_func
*
ffunc
);
conf_finish_func
*
ffunc
);
c
har
*
CONF_imodule_get_name
(
CONF_IMODULE
*
md
);
c
onst
char
*
CONF_imodule_get_name
(
const
CONF_IMODULE
*
md
);
c
har
*
CONF_imodule_get_value
(
CONF_IMODULE
*
md
);
c
onst
char
*
CONF_imodule_get_value
(
const
CONF_IMODULE
*
md
);
void
*
CONF_imodule_get_usr_data
(
CONF_IMODULE
*
md
);
void
*
CONF_imodule_get_usr_data
(
const
CONF_IMODULE
*
md
);
void
CONF_imodule_set_usr_data
(
CONF_IMODULE
*
md
,
void
*
usr_data
);
void
CONF_imodule_set_usr_data
(
CONF_IMODULE
*
md
,
void
*
usr_data
);
CONF_MODULE
*
CONF_imodule_get_module
(
CONF_IMODULE
*
md
);
CONF_MODULE
*
CONF_imodule_get_module
(
const
CONF_IMODULE
*
md
);
unsigned
long
CONF_imodule_get_flags
(
CONF_IMODULE
*
md
);
unsigned
long
CONF_imodule_get_flags
(
const
CONF_IMODULE
*
md
);
void
CONF_imodule_set_flags
(
CONF_IMODULE
*
md
,
unsigned
long
flags
);
void
CONF_imodule_set_flags
(
CONF_IMODULE
*
md
,
unsigned
long
flags
);
void
*
CONF_module_get_usr_data
(
CONF_MODULE
*
pmod
);
void
*
CONF_module_get_usr_data
(
CONF_MODULE
*
pmod
);
void
CONF_module_set_usr_data
(
CONF_MODULE
*
pmod
,
void
*
usr_data
);
void
CONF_module_set_usr_data
(
CONF_MODULE
*
pmod
,
void
*
usr_data
);
...
...
crypto/conf/conf_api.c
浏览文件 @
9dd5ae65
...
@@ -81,19 +81,20 @@ static unsigned long hash(const void *v_void);
...
@@ -81,19 +81,20 @@ static unsigned long hash(const void *v_void);
static
int
cmp_conf
(
const
void
*
a_void
,
const
void
*
b_void
);
static
int
cmp_conf
(
const
void
*
a_void
,
const
void
*
b_void
);
/* Up until OpenSSL 0.9.5a, this was get_section */
/* Up until OpenSSL 0.9.5a, this was get_section */
CONF_VALUE
*
_CONF_get_section
(
CONF
*
conf
,
char
*
section
)
CONF_VALUE
*
_CONF_get_section
(
const
CONF
*
conf
,
const
char
*
section
)
{
{
CONF_VALUE
*
v
,
vv
;
CONF_VALUE
*
v
,
vv
;
if
((
conf
==
NULL
)
||
(
section
==
NULL
))
return
(
NULL
);
if
((
conf
==
NULL
)
||
(
section
==
NULL
))
return
(
NULL
);
vv
.
name
=
NULL
;
vv
.
name
=
NULL
;
vv
.
section
=
section
;
vv
.
section
=
(
char
*
)
section
;
v
=
(
CONF_VALUE
*
)
lh_retrieve
(
conf
->
data
,
&
vv
);
v
=
(
CONF_VALUE
*
)
lh_retrieve
(
conf
->
data
,
&
vv
);
return
(
v
);
return
(
v
);
}
}
/* Up until OpenSSL 0.9.5a, this was CONF_get_section */
/* Up until OpenSSL 0.9.5a, this was CONF_get_section */
STACK_OF
(
CONF_VALUE
)
*
_CONF_get_section_values
(
CONF
*
conf
,
char
*
section
)
STACK_OF
(
CONF_VALUE
)
*
_CONF_get_section_values
(
const
CONF
*
conf
,
const
char
*
section
)
{
{
CONF_VALUE
*
v
;
CONF_VALUE
*
v
;
...
@@ -128,7 +129,7 @@ int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value)
...
@@ -128,7 +129,7 @@ int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value)
return
1
;
return
1
;
}
}
char
*
_CONF_get_string
(
CONF
*
conf
,
char
*
section
,
char
*
name
)
char
*
_CONF_get_string
(
const
CONF
*
conf
,
const
char
*
section
,
const
char
*
name
)
{
{
CONF_VALUE
*
v
,
vv
;
CONF_VALUE
*
v
,
vv
;
char
*
p
;
char
*
p
;
...
@@ -138,8 +139,8 @@ char *_CONF_get_string(CONF *conf, char *section, char *name)
...
@@ -138,8 +139,8 @@ char *_CONF_get_string(CONF *conf, char *section, char *name)
{
{
if
(
section
!=
NULL
)
if
(
section
!=
NULL
)
{
{
vv
.
name
=
name
;
vv
.
name
=
(
char
*
)
name
;
vv
.
section
=
section
;
vv
.
section
=
(
char
*
)
section
;
v
=
(
CONF_VALUE
*
)
lh_retrieve
(
conf
->
data
,
&
vv
);
v
=
(
CONF_VALUE
*
)
lh_retrieve
(
conf
->
data
,
&
vv
);
if
(
v
!=
NULL
)
return
(
v
->
value
);
if
(
v
!=
NULL
)
return
(
v
->
value
);
if
(
strcmp
(
section
,
"ENV"
)
==
0
)
if
(
strcmp
(
section
,
"ENV"
)
==
0
)
...
@@ -149,7 +150,7 @@ char *_CONF_get_string(CONF *conf, char *section, char *name)
...
@@ -149,7 +150,7 @@ char *_CONF_get_string(CONF *conf, char *section, char *name)
}
}
}
}
vv
.
section
=
"default"
;
vv
.
section
=
"default"
;
vv
.
name
=
name
;
vv
.
name
=
(
char
*
)
name
;
v
=
(
CONF_VALUE
*
)
lh_retrieve
(
conf
->
data
,
&
vv
);
v
=
(
CONF_VALUE
*
)
lh_retrieve
(
conf
->
data
,
&
vv
);
if
(
v
!=
NULL
)
if
(
v
!=
NULL
)
return
(
v
->
value
);
return
(
v
->
value
);
...
@@ -273,7 +274,7 @@ static int cmp_conf(const void *a_void,const void *b_void)
...
@@ -273,7 +274,7 @@ static int cmp_conf(const void *a_void,const void *b_void)
}
}
/* Up until OpenSSL 0.9.5a, this was new_section */
/* Up until OpenSSL 0.9.5a, this was new_section */
CONF_VALUE
*
_CONF_new_section
(
CONF
*
conf
,
char
*
section
)
CONF_VALUE
*
_CONF_new_section
(
CONF
*
conf
,
c
onst
c
har
*
section
)
{
{
STACK
*
sk
=
NULL
;
STACK
*
sk
=
NULL
;
int
ok
=
0
,
i
;
int
ok
=
0
,
i
;
...
...
crypto/conf/conf_api.h
浏览文件 @
9dd5ae65
...
@@ -67,15 +67,17 @@ extern "C" {
...
@@ -67,15 +67,17 @@ extern "C" {
#endif
#endif
/* Up until OpenSSL 0.9.5a, this was new_section */
/* Up until OpenSSL 0.9.5a, this was new_section */
CONF_VALUE
*
_CONF_new_section
(
CONF
*
conf
,
char
*
section
);
CONF_VALUE
*
_CONF_new_section
(
CONF
*
conf
,
c
onst
c
har
*
section
);
/* Up until OpenSSL 0.9.5a, this was get_section */
/* Up until OpenSSL 0.9.5a, this was get_section */
CONF_VALUE
*
_CONF_get_section
(
CONF
*
conf
,
char
*
section
);
CONF_VALUE
*
_CONF_get_section
(
const
CONF
*
conf
,
const
char
*
section
);
/* Up until OpenSSL 0.9.5a, this was CONF_get_section */
/* Up until OpenSSL 0.9.5a, this was CONF_get_section */
STACK_OF
(
CONF_VALUE
)
*
_CONF_get_section_values
(
CONF
*
conf
,
char
*
section
);
STACK_OF
(
CONF_VALUE
)
*
_CONF_get_section_values
(
const
CONF
*
conf
,
const
char
*
section
);
int
_CONF_add_string
(
CONF
*
conf
,
CONF_VALUE
*
section
,
CONF_VALUE
*
value
);
int
_CONF_add_string
(
CONF
*
conf
,
CONF_VALUE
*
section
,
CONF_VALUE
*
value
);
char
*
_CONF_get_string
(
CONF
*
conf
,
char
*
section
,
char
*
name
);
char
*
_CONF_get_string
(
const
CONF
*
conf
,
const
char
*
section
,
long
_CONF_get_number
(
CONF
*
conf
,
char
*
section
,
char
*
name
);
const
char
*
name
);
long
_CONF_get_number
(
const
CONF
*
conf
,
const
char
*
section
,
const
char
*
name
);
int
_CONF_new_data
(
CONF
*
conf
);
int
_CONF_new_data
(
CONF
*
conf
);
void
_CONF_free_data
(
CONF
*
conf
);
void
_CONF_free_data
(
CONF
*
conf
);
...
...
crypto/conf/conf_def.c
浏览文件 @
9dd5ae65
...
@@ -83,9 +83,9 @@ static int def_destroy(CONF *conf);
...
@@ -83,9 +83,9 @@ static int def_destroy(CONF *conf);
static
int
def_destroy_data
(
CONF
*
conf
);
static
int
def_destroy_data
(
CONF
*
conf
);
static
int
def_load
(
CONF
*
conf
,
const
char
*
name
,
long
*
eline
);
static
int
def_load
(
CONF
*
conf
,
const
char
*
name
,
long
*
eline
);
static
int
def_load_bio
(
CONF
*
conf
,
BIO
*
bp
,
long
*
eline
);
static
int
def_load_bio
(
CONF
*
conf
,
BIO
*
bp
,
long
*
eline
);
static
int
def_dump
(
CONF
*
conf
,
BIO
*
bp
);
static
int
def_dump
(
const
CONF
*
conf
,
BIO
*
bp
);
static
int
def_is_number
(
CONF
*
conf
,
char
c
);
static
int
def_is_number
(
const
CONF
*
conf
,
char
c
);
static
int
def_to_int
(
CONF
*
conf
,
char
c
);
static
int
def_to_int
(
const
CONF
*
conf
,
char
c
);
const
char
*
CONF_def_version
=
"CONF_def"
OPENSSL_VERSION_PTEXT
;
const
char
*
CONF_def_version
=
"CONF_def"
OPENSSL_VERSION_PTEXT
;
...
@@ -716,18 +716,18 @@ static void dump_value(CONF_VALUE *a, BIO *out)
...
@@ -716,18 +716,18 @@ static void dump_value(CONF_VALUE *a, BIO *out)
static
IMPLEMENT_LHASH_DOALL_ARG_FN
(
dump_value
,
CONF_VALUE
*
,
BIO
*
)
static
IMPLEMENT_LHASH_DOALL_ARG_FN
(
dump_value
,
CONF_VALUE
*
,
BIO
*
)
static
int
def_dump
(
CONF
*
conf
,
BIO
*
out
)
static
int
def_dump
(
const
CONF
*
conf
,
BIO
*
out
)
{
{
lh_doall_arg
(
conf
->
data
,
LHASH_DOALL_ARG_FN
(
dump_value
),
out
);
lh_doall_arg
(
conf
->
data
,
LHASH_DOALL_ARG_FN
(
dump_value
),
out
);
return
1
;
return
1
;
}
}
static
int
def_is_number
(
CONF
*
conf
,
char
c
)
static
int
def_is_number
(
const
CONF
*
conf
,
char
c
)
{
{
return
IS_NUMBER
(
conf
,
c
);
return
IS_NUMBER
(
conf
,
c
);
}
}
static
int
def_to_int
(
CONF
*
conf
,
char
c
)
static
int
def_to_int
(
const
CONF
*
conf
,
char
c
)
{
{
return
c
-
'0'
;
return
c
-
'0'
;
}
}
...
...
crypto/conf/conf_lib.c
浏览文件 @
9dd5ae65
...
@@ -137,7 +137,7 @@ LHASH *CONF_load_bio(LHASH *conf, BIO *bp,long *eline)
...
@@ -137,7 +137,7 @@ LHASH *CONF_load_bio(LHASH *conf, BIO *bp,long *eline)
return
NULL
;
return
NULL
;
}
}
STACK_OF
(
CONF_VALUE
)
*
CONF_get_section
(
LHASH
*
conf
,
char
*
section
)
STACK_OF
(
CONF_VALUE
)
*
CONF_get_section
(
LHASH
*
conf
,
c
onst
c
har
*
section
)
{
{
if
(
conf
==
NULL
)
if
(
conf
==
NULL
)
{
{
...
@@ -151,7 +151,7 @@ STACK_OF(CONF_VALUE) *CONF_get_section(LHASH *conf,char *section)
...
@@ -151,7 +151,7 @@ STACK_OF(CONF_VALUE) *CONF_get_section(LHASH *conf,char *section)
}
}
}
}
char
*
CONF_get_string
(
LHASH
*
conf
,
c
har
*
group
,
char
*
name
)
char
*
CONF_get_string
(
LHASH
*
conf
,
c
onst
char
*
group
,
const
char
*
name
)
{
{
if
(
conf
==
NULL
)
if
(
conf
==
NULL
)
{
{
...
@@ -165,7 +165,7 @@ char *CONF_get_string(LHASH *conf,char *group,char *name)
...
@@ -165,7 +165,7 @@ char *CONF_get_string(LHASH *conf,char *group,char *name)
}
}
}
}
long
CONF_get_number
(
LHASH
*
conf
,
c
har
*
group
,
char
*
name
)
long
CONF_get_number
(
LHASH
*
conf
,
c
onst
char
*
group
,
const
char
*
name
)
{
{
int
status
;
int
status
;
long
result
=
0
;
long
result
=
0
;
...
@@ -294,7 +294,7 @@ int NCONF_load_bio(CONF *conf, BIO *bp,long *eline)
...
@@ -294,7 +294,7 @@ int NCONF_load_bio(CONF *conf, BIO *bp,long *eline)
return
conf
->
meth
->
load_bio
(
conf
,
bp
,
eline
);
return
conf
->
meth
->
load_bio
(
conf
,
bp
,
eline
);
}
}
STACK_OF
(
CONF_VALUE
)
*
NCONF_get_section
(
CONF
*
conf
,
char
*
section
)
STACK_OF
(
CONF_VALUE
)
*
NCONF_get_section
(
const
CONF
*
conf
,
const
char
*
section
)
{
{
if
(
conf
==
NULL
)
if
(
conf
==
NULL
)
{
{
...
@@ -311,7 +311,7 @@ STACK_OF(CONF_VALUE) *NCONF_get_section(CONF *conf,char *section)
...
@@ -311,7 +311,7 @@ STACK_OF(CONF_VALUE) *NCONF_get_section(CONF *conf,char *section)
return
_CONF_get_section_values
(
conf
,
section
);
return
_CONF_get_section_values
(
conf
,
section
);
}
}
char
*
NCONF_get_string
(
CONF
*
conf
,
char
*
group
,
char
*
name
)
char
*
NCONF_get_string
(
const
CONF
*
conf
,
const
char
*
group
,
const
char
*
name
)
{
{
char
*
s
=
_CONF_get_string
(
conf
,
group
,
name
);
char
*
s
=
_CONF_get_string
(
conf
,
group
,
name
);
...
@@ -327,10 +327,12 @@ char *NCONF_get_string(CONF *conf,char *group,char *name)
...
@@ -327,10 +327,12 @@ char *NCONF_get_string(CONF *conf,char *group,char *name)
}
}
CONFerr
(
CONF_F_NCONF_GET_STRING
,
CONFerr
(
CONF_F_NCONF_GET_STRING
,
CONF_R_NO_VALUE
);
CONF_R_NO_VALUE
);
ERR_add_error_data
(
4
,
"group="
,
group
,
" name="
,
name
);
return
NULL
;
return
NULL
;
}
}
int
NCONF_get_number_e
(
CONF
*
conf
,
char
*
group
,
char
*
name
,
long
*
result
)
int
NCONF_get_number_e
(
const
CONF
*
conf
,
const
char
*
group
,
const
char
*
name
,
long
*
result
)
{
{
char
*
str
;
char
*
str
;
...
@@ -355,7 +357,7 @@ int NCONF_get_number_e(CONF *conf,char *group,char *name,long *result)
...
@@ -355,7 +357,7 @@ int NCONF_get_number_e(CONF *conf,char *group,char *name,long *result)
}
}
#ifndef OPENSSL_NO_FP_API
#ifndef OPENSSL_NO_FP_API
int
NCONF_dump_fp
(
CONF
*
conf
,
FILE
*
out
)
int
NCONF_dump_fp
(
const
CONF
*
conf
,
FILE
*
out
)
{
{
BIO
*
btmp
;
BIO
*
btmp
;
int
ret
;
int
ret
;
...
@@ -369,7 +371,7 @@ int NCONF_dump_fp(CONF *conf, FILE *out)
...
@@ -369,7 +371,7 @@ int NCONF_dump_fp(CONF *conf, FILE *out)
}
}
#endif
#endif
int
NCONF_dump_bio
(
CONF
*
conf
,
BIO
*
out
)
int
NCONF_dump_bio
(
const
CONF
*
conf
,
BIO
*
out
)
{
{
if
(
conf
==
NULL
)
if
(
conf
==
NULL
)
{
{
...
...
crypto/conf/conf_mod.c
浏览文件 @
9dd5ae65
...
@@ -108,16 +108,20 @@ static STACK_OF(CONF_IMODULE) *initialized_modules = NULL;
...
@@ -108,16 +108,20 @@ static STACK_OF(CONF_IMODULE) *initialized_modules = NULL;
static
void
module_free
(
CONF_MODULE
*
md
);
static
void
module_free
(
CONF_MODULE
*
md
);
static
void
module_finish
(
CONF_IMODULE
*
imod
);
static
void
module_finish
(
CONF_IMODULE
*
imod
);
static
int
module_run
(
CONF
*
cnf
,
char
*
name
,
char
*
value
,
unsigned
long
flags
);
static
int
module_run
(
const
CONF
*
cnf
,
char
*
name
,
char
*
value
,
unsigned
long
flags
);
static
CONF_MODULE
*
module_add
(
DSO
*
dso
,
const
char
*
name
,
static
CONF_MODULE
*
module_add
(
DSO
*
dso
,
const
char
*
name
,
conf_init_func
*
ifunc
,
conf_finish_func
*
ffunc
);
conf_init_func
*
ifunc
,
conf_finish_func
*
ffunc
);
static
CONF_MODULE
*
module_find
(
char
*
name
);
static
CONF_MODULE
*
module_find
(
char
*
name
);
static
int
module_init
(
CONF_MODULE
*
pmod
,
char
*
name
,
char
*
value
,
CONF
*
cnf
);
static
int
module_init
(
CONF_MODULE
*
pmod
,
char
*
name
,
char
*
value
,
static
CONF_MODULE
*
module_load_dso
(
CONF
*
cnf
,
char
*
name
,
char
*
value
,
unsigned
long
flags
);
const
CONF
*
cnf
);
static
CONF_MODULE
*
module_load_dso
(
const
CONF
*
cnf
,
char
*
name
,
char
*
value
,
unsigned
long
flags
);
/* Main function: load modules from a CONF structure */
/* Main function: load modules from a CONF structure */
int
CONF_modules_load
(
CONF
*
cnf
,
char
*
appname
,
unsigned
long
flags
)
int
CONF_modules_load
(
const
CONF
*
cnf
,
const
char
*
appname
,
unsigned
long
flags
)
{
{
STACK_OF
(
CONF_VALUE
)
*
values
;
STACK_OF
(
CONF_VALUE
)
*
values
;
CONF_VALUE
*
vl
;
CONF_VALUE
*
vl
;
...
@@ -155,7 +159,8 @@ int CONF_modules_load(CONF *cnf, char *appname, unsigned long flags)
...
@@ -155,7 +159,8 @@ int CONF_modules_load(CONF *cnf, char *appname, unsigned long flags)
}
}
int
CONF_modules_load_file
(
char
*
filename
,
char
*
appname
,
unsigned
long
flags
)
int
CONF_modules_load_file
(
const
char
*
filename
,
const
char
*
appname
,
unsigned
long
flags
)
{
{
CONF
*
conf
=
NULL
;
CONF
*
conf
=
NULL
;
int
ret
=
0
;
int
ret
=
0
;
...
@@ -174,7 +179,8 @@ int CONF_modules_load_file(char *filename, char *appname, unsigned long flags)
...
@@ -174,7 +179,8 @@ int CONF_modules_load_file(char *filename, char *appname, unsigned long flags)
return
ret
;
return
ret
;
}
}
static
int
module_run
(
CONF
*
cnf
,
char
*
name
,
char
*
value
,
unsigned
long
flags
)
static
int
module_run
(
const
CONF
*
cnf
,
char
*
name
,
char
*
value
,
unsigned
long
flags
)
{
{
CONF_MODULE
*
md
;
CONF_MODULE
*
md
;
int
ret
;
int
ret
;
...
@@ -212,7 +218,8 @@ static int module_run(CONF *cnf, char *name, char *value, unsigned long flags)
...
@@ -212,7 +218,8 @@ static int module_run(CONF *cnf, char *name, char *value, unsigned long flags)
}
}
/* Load a module from a DSO */
/* Load a module from a DSO */
static
CONF_MODULE
*
module_load_dso
(
CONF
*
cnf
,
char
*
name
,
char
*
value
,
unsigned
long
flags
)
static
CONF_MODULE
*
module_load_dso
(
const
CONF
*
cnf
,
char
*
name
,
char
*
value
,
unsigned
long
flags
)
{
{
DSO
*
dso
=
NULL
;
DSO
*
dso
=
NULL
;
conf_init_func
*
ifunc
;
conf_init_func
*
ifunc
;
...
@@ -263,7 +270,7 @@ static CONF_MODULE *module_load_dso(CONF *cnf, char *name, char *value, unsigned
...
@@ -263,7 +270,7 @@ static CONF_MODULE *module_load_dso(CONF *cnf, char *name, char *value, unsigned
/* add module to list */
/* add module to list */
static
CONF_MODULE
*
module_add
(
DSO
*
dso
,
const
char
*
name
,
static
CONF_MODULE
*
module_add
(
DSO
*
dso
,
const
char
*
name
,
conf_init_func
*
ifunc
,
conf_finish_func
*
ffunc
)
conf_init_func
*
ifunc
,
conf_finish_func
*
ffunc
)
{
{
CONF_MODULE
*
tmod
=
NULL
;
CONF_MODULE
*
tmod
=
NULL
;
if
(
supported_modules
==
NULL
)
if
(
supported_modules
==
NULL
)
...
@@ -318,7 +325,8 @@ static CONF_MODULE *module_find(char *name)
...
@@ -318,7 +325,8 @@ static CONF_MODULE *module_find(char *name)
}
}
/* initialize a module */
/* initialize a module */
static
int
module_init
(
CONF_MODULE
*
pmod
,
char
*
name
,
char
*
value
,
CONF
*
cnf
)
static
int
module_init
(
CONF_MODULE
*
pmod
,
char
*
name
,
char
*
value
,
const
CONF
*
cnf
)
{
{
int
ret
=
1
;
int
ret
=
1
;
int
init_called
=
0
;
int
init_called
=
0
;
...
@@ -467,17 +475,17 @@ void CONF_modules_free(void)
...
@@ -467,17 +475,17 @@ void CONF_modules_free(void)
/* Utility functions */
/* Utility functions */
c
har
*
CONF_imodule_get_name
(
CONF_IMODULE
*
md
)
c
onst
char
*
CONF_imodule_get_name
(
const
CONF_IMODULE
*
md
)
{
{
return
md
->
name
;
return
md
->
name
;
}
}
c
har
*
CONF_imodule_get_value
(
CONF_IMODULE
*
md
)
c
onst
char
*
CONF_imodule_get_value
(
const
CONF_IMODULE
*
md
)
{
{
return
md
->
value
;
return
md
->
value
;
}
}
void
*
CONF_imodule_get_usr_data
(
CONF_IMODULE
*
md
)
void
*
CONF_imodule_get_usr_data
(
const
CONF_IMODULE
*
md
)
{
{
return
md
->
usr_data
;
return
md
->
usr_data
;
}
}
...
@@ -487,12 +495,12 @@ void CONF_imodule_set_usr_data(CONF_IMODULE *md, void *usr_data)
...
@@ -487,12 +495,12 @@ void CONF_imodule_set_usr_data(CONF_IMODULE *md, void *usr_data)
md
->
usr_data
=
usr_data
;
md
->
usr_data
=
usr_data
;
}
}
CONF_MODULE
*
CONF_imodule_get_module
(
CONF_IMODULE
*
md
)
CONF_MODULE
*
CONF_imodule_get_module
(
const
CONF_IMODULE
*
md
)
{
{
return
md
->
pmod
;
return
md
->
pmod
;
}
}
unsigned
long
CONF_imodule_get_flags
(
CONF_IMODULE
*
md
)
unsigned
long
CONF_imodule_get_flags
(
const
CONF_IMODULE
*
md
)
{
{
return
md
->
flags
;
return
md
->
flags
;
}
}
...
...
crypto/engine/Makefile.ssl
浏览文件 @
9dd5ae65
...
@@ -274,6 +274,7 @@ hw_nuron.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
...
@@ -274,6 +274,7 @@ hw_nuron.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
hw_nuron.o
:
../cryptlib.h hw_nuron.c
hw_nuron.o
:
../cryptlib.h hw_nuron.c
hw_openbsd_dev_crypto.o
:
../../include/openssl/asn1.h
hw_openbsd_dev_crypto.o
:
../../include/openssl/asn1.h
hw_openbsd_dev_crypto.o
:
../../include/openssl/bio.h ../../include/openssl/bn.h
hw_openbsd_dev_crypto.o
:
../../include/openssl/bio.h ../../include/openssl/bn.h
hw_openbsd_dev_crypto.o
:
../../include/openssl/conf.h
hw_openbsd_dev_crypto.o
:
../../include/openssl/crypto.h
hw_openbsd_dev_crypto.o
:
../../include/openssl/crypto.h
hw_openbsd_dev_crypto.o
:
../../include/openssl/dh.h ../../include/openssl/dsa.h
hw_openbsd_dev_crypto.o
:
../../include/openssl/dh.h ../../include/openssl/dsa.h
hw_openbsd_dev_crypto.o
:
../../include/openssl/e_os2.h
hw_openbsd_dev_crypto.o
:
../../include/openssl/e_os2.h
...
...
crypto/engine/hw_openbsd_dev_crypto.c
浏览文件 @
9dd5ae65
...
@@ -62,6 +62,7 @@
...
@@ -62,6 +62,7 @@
#else
#else
#include "../evp/evp_locl.h"
#include "../evp/evp_locl.h"
#endif
#endif
#include <openssl/conf.h>
#ifndef OPENSSL_OPENBSD_DEV_CRYPTO
#ifndef OPENSSL_OPENBSD_DEV_CRYPTO
...
@@ -93,10 +94,23 @@ static int dev_crypto_digests(ENGINE *e, const EVP_MD **digest,
...
@@ -93,10 +94,23 @@ static int dev_crypto_digests(ENGINE *e, const EVP_MD **digest,
static
const
char
dev_crypto_id
[]
=
"openbsd_dev_crypto"
;
static
const
char
dev_crypto_id
[]
=
"openbsd_dev_crypto"
;
static
const
char
dev_crypto_name
[]
=
"OpenBSD /dev/crypto"
;
static
const
char
dev_crypto_name
[]
=
"OpenBSD /dev/crypto"
;
static
long
allow_misaligned
;
static
int
init_conf
(
CONF_IMODULE
*
md
,
const
CONF
*
conf
)
{
if
(
!
NCONF_get_number
(
conf
,
CONF_imodule_get_value
(
md
),
"allow_misaligned"
,
&
allow_misaligned
))
return
0
;
printf
(
"allow misaligned=%ld
\n
"
,
allow_misaligned
);
return
1
;
}
static
ENGINE
*
engine_openbsd_dev_crypto
(
void
)
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
)
||
...
@@ -385,7 +399,7 @@ static int do_digest(int ses,unsigned char *md,const void *data,int len)
...
@@ -385,7 +399,7 @@ static int do_digest(int ses,unsigned char *md,const void *data,int len)
if
(
ioctl
(
fd
,
CIOCCRYPT
,
&
cryp
)
==
-
1
)
if
(
ioctl
(
fd
,
CIOCCRYPT
,
&
cryp
)
==
-
1
)
{
{
if
(
errno
==
EINVAL
)
/* buffer is misaligned */
if
(
errno
==
EINVAL
&&
allow_misaligned
)
/* buffer is misaligned */
{
{
char
*
dcopy
;
char
*
dcopy
;
...
...
crypto/evp/digest.c
浏览文件 @
9dd5ae65
...
@@ -287,7 +287,7 @@ int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx)
...
@@ -287,7 +287,7 @@ int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx)
* because sometimes only copies of the context are ever finalised.
* because sometimes only copies of the context are ever finalised.
*/
*/
if
(
ctx
->
digest
&&
ctx
->
digest
->
cleanup
if
(
ctx
->
digest
&&
ctx
->
digest
->
cleanup
&&
!
EVP_MD_CTX_test_flags
(
ctx
,
EVP_MD_CTX_FLAG_CLEANED
))
&&
!
EVP_MD_CTX_test_flags
(
ctx
,
EVP_MD_CTX_FLAG_CLEANED
))
ctx
->
digest
->
cleanup
(
ctx
);
ctx
->
digest
->
cleanup
(
ctx
);
if
(
ctx
->
digest
&&
ctx
->
digest
->
ctx_size
&&
ctx
->
md_data
)
if
(
ctx
->
digest
&&
ctx
->
digest
->
ctx_size
&&
ctx
->
md_data
)
{
{
...
...
crypto/evp/evp_test.c
浏览文件 @
9dd5ae65
...
@@ -51,6 +51,7 @@
...
@@ -51,6 +51,7 @@
#include <string.h>
#include <string.h>
#include <openssl/evp.h>
#include <openssl/evp.h>
#include <openssl/engine.h>
#include <openssl/engine.h>
#include <openssl/conf.h>
static
void
hexdump
(
FILE
*
f
,
const
char
*
title
,
const
unsigned
char
*
s
,
int
l
)
static
void
hexdump
(
FILE
*
f
,
const
char
*
title
,
const
unsigned
char
*
s
,
int
l
)
{
{
...
@@ -309,6 +310,7 @@ int main(int argc,char **argv)
...
@@ -309,6 +310,7 @@ int main(int argc,char **argv)
OpenSSL_add_all_digests
();
OpenSSL_add_all_digests
();
/* Load all compiled-in ENGINEs */
/* Load all compiled-in ENGINEs */
ENGINE_load_builtin_engines
();
ENGINE_load_builtin_engines
();
OPENSSL_config
();
/* Register all available ENGINE implementations of ciphers and digests.
/* Register all available ENGINE implementations of ciphers and digests.
* This could perhaps be changed to "ENGINE_register_all_complete()"? */
* This could perhaps be changed to "ENGINE_register_all_complete()"? */
ENGINE_register_all_ciphers
();
ENGINE_register_all_ciphers
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录