Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
cherrystories
openssl
提交
ce699073
O
openssl
项目概览
cherrystories
/
openssl
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ce699073
编写于
9月 17, 2000
作者:
R
Richard Levitte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
The rest of the merge in of the main trunk, a few conflicts resolved.
上级
42cc1603
变更
32
展开全部
隐藏空白更改
内联
并排
Showing
32 changed file
with
1866 addition
and
498 deletion
+1866
-498
Configure
Configure
+10
-1
README
README
+1
-1
TABLE
TABLE
+64
-4
apps/apps.c
apps/apps.c
+1
-1
apps/crl2p7.c
apps/crl2p7.c
+3
-3
apps/dgst.c
apps/dgst.c
+1
-1
apps/nseq.c
apps/nseq.c
+1
-1
apps/pkcs12.c
apps/pkcs12.c
+5
-5
crypto/asn1/a_set.c
crypto/asn1/a_set.c
+1
-1
crypto/bn/asm/README
crypto/bn/asm/README
+6
-6
crypto/bn/asm/pa-risc2.s
crypto/bn/asm/pa-risc2.s
+1613
-411
crypto/dso/dso_lib.c
crypto/dso/dso_lib.c
+2
-2
crypto/opensslv.h
crypto/opensslv.h
+2
-2
crypto/pkcs12/p12_attr.c
crypto/pkcs12/p12_attr.c
+6
-6
crypto/pkcs12/p12_crt.c
crypto/pkcs12/p12_crt.c
+3
-3
crypto/pkcs12/p12_npas.c
crypto/pkcs12/p12_npas.c
+1
-1
crypto/pkcs7/pk7_doit.c
crypto/pkcs7/pk7_doit.c
+1
-1
crypto/pkcs7/pk7_mime.c
crypto/pkcs7/pk7_mime.c
+1
-1
crypto/pkcs7/pk7_smime.c
crypto/pkcs7/pk7_smime.c
+2
-2
crypto/rand/rand_win.c
crypto/rand/rand_win.c
+83
-9
crypto/x509v3/v3_akey.c
crypto/x509v3/v3_akey.c
+1
-1
crypto/x509v3/v3_alt.c
crypto/x509v3/v3_alt.c
+3
-3
crypto/x509v3/v3_crld.c
crypto/x509v3/v3_crld.c
+1
-1
crypto/x509v3/v3_extku.c
crypto/x509v3/v3_extku.c
+1
-1
crypto/x509v3/v3_genn.c
crypto/x509v3/v3_genn.c
+1
-1
crypto/x509v3/v3_info.c
crypto/x509v3/v3_info.c
+2
-2
crypto/x509v3/v3_utl.c
crypto/x509v3/v3_utl.c
+1
-1
doc/crypto/BIO_s_fd.pod
doc/crypto/BIO_s_fd.pod
+19
-9
doc/crypto/BIO_s_file.pod
doc/crypto/BIO_s_file.pod
+27
-14
ssl/ssl_cert.c
ssl/ssl_cert.c
+1
-1
ssl/ssl_ciph.c
ssl/ssl_ciph.c
+1
-1
ssl/ssl_lib.c
ssl/ssl_lib.c
+1
-1
未找到文件。
Configure
浏览文件 @
ce699073
...
@@ -221,12 +221,21 @@ my %table=(
...
@@ -221,12 +221,21 @@ my %table=(
# crypto/sha/sha_lcl.h.
# crypto/sha/sha_lcl.h.
# <appro@fy.chalmers.se>
# <appro@fy.chalmers.se>
#
#
"hpux-parisc-cc","cc:-Ae +O3 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
#!#
"hpux-parisc-cc","cc:-Ae +O3 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
# Since there is mention of this in shlib/hpux10-cc.sh
# Since there is mention of this in shlib/hpux10-cc.sh
"hpux-parisc-cc-o4","cc:-Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
"hpux-parisc-cc-o4","cc:-Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
"hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
"hpux-parisc-gcc","gcc:-O3 -DB_ENDIAN -DBN_DIV2W:::-ldld:BN_LLONG DES_PTR DES_UNROLL DES_RISC1::::::::::dl",
"hpux64-parisc-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldld:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl",
"hpux64-parisc-cc","cc:-Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldld:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl",
# More attempts at unified 10.X and 11.X targets for HP C compiler.
#
# Chris Ruemmler <ruemmler@cup.hp.com>
# Kevin Steves <ks@hp.se>
"hpux-parisc-cc","cc:+O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY::-D_REENTRANT:-ldl:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl",
"hpux-parisc2-cc","cc:+DA2.0 +DS2.0 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2.o:::::::::dl",
"hpux64-parisc2-cc","cc:+DD64 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT:asm/pa-risc2W.o:::::::::dl",
"hpux-parisc1_1-cc","cc:+DA1.1 +DS1.1 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY::-D_REENTRANT:-ldl:MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::::::::::dl",
# HPUX 9.X config.
# HPUX 9.X config.
# Don't use the bundled cc. It is broken. Use HP ANSI C if possible, or
# Don't use the bundled cc. It is broken. Use HP ANSI C if possible, or
# egcs. gcc 2.8.1 is also broken.
# egcs. gcc 2.8.1 is also broken.
...
...
README
浏览文件 @
ce699073
OpenSSL 0.9.6-beta
1 [engine] 11
Sep 2000
OpenSSL 0.9.6-beta
2 [engine] 17
Sep 2000
Copyright (c) 1998-2000 The OpenSSL Project
Copyright (c) 1998-2000 The OpenSSL Project
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
...
...
TABLE
浏览文件 @
ce699073
...
@@ -1162,11 +1162,11 @@ $shared_cflag =
...
@@ -1162,11 +1162,11 @@ $shared_cflag =
*** hpux-parisc-cc
*** hpux-parisc-cc
$cc = cc
$cc = cc
$cflags =
-Ae +O3 +ESlit -z
-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY
$cflags =
+O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit
-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY
$unistd =
$unistd =
$thread_cflag =
$thread_cflag =
-D_REENTRANT
$lflags = -ldl
d
$lflags = -ldl
$bn_ops =
BN_LLONG DES_PTR DES_UNROLL DES_RISC1
$bn_ops =
MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
$bn_obj =
$bn_obj =
$des_obj =
$des_obj =
$bf_obj =
$bf_obj =
...
@@ -1220,6 +1220,46 @@ $dso_scheme = dl
...
@@ -1220,6 +1220,46 @@ $dso_scheme = dl
$shared_target=
$shared_target=
$shared_cflag =
$shared_cflag =
*** hpux-parisc1_1-cc
$cc = cc
$cflags = +DA1.1 +DS1.1 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
$unistd =
$thread_cflag = -D_REENTRANT
$lflags = -ldl
$bn_ops = MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
$bn_obj =
$des_obj =
$bf_obj =
$md5_obj =
$sha1_obj =
$cast_obj =
$rc4_obj =
$rmd160_obj =
$rc5_obj =
$dso_scheme = dl
$shared_target=
$shared_cflag =
*** hpux-parisc2-cc
$cc = cc
$cflags = +DA2.0 +DS2.0 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
$unistd =
$thread_cflag = -D_REENTRANT
$lflags = -ldl
$bn_ops = SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
$bn_obj = asm/pa-risc2.o
$des_obj =
$bf_obj =
$md5_obj =
$sha1_obj =
$cast_obj =
$rc4_obj =
$rmd160_obj =
$rc5_obj =
$dso_scheme = dl
$shared_target=
$shared_cflag =
*** hpux10-brokencc
*** hpux10-brokencc
$cc = cc
$cc = cc
$cflags = -DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z
$cflags = -DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z
...
@@ -1320,6 +1360,26 @@ $dso_scheme = dl
...
@@ -1320,6 +1360,26 @@ $dso_scheme = dl
$shared_target=
$shared_target=
$shared_cflag =
$shared_cflag =
*** hpux64-parisc2-cc
$cc = cc
$cflags = +DD64 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
$unistd =
$thread_cflag = -D_REENTRANT
$lflags = -ldl
$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
$bn_obj = asm/pa-risc2W.o
$des_obj =
$bf_obj =
$md5_obj =
$sha1_obj =
$cast_obj =
$rc4_obj =
$rmd160_obj =
$rc5_obj =
$dso_scheme = dl
$shared_target=
$shared_cflag =
*** irix-cc
*** irix-cc
$cc = cc
$cc = cc
$cflags = -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN
$cflags = -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN
...
...
apps/apps.c
浏览文件 @
ce699073
...
@@ -662,7 +662,7 @@ STACK_OF(X509) *load_certs(BIO *err, char *file, int format)
...
@@ -662,7 +662,7 @@ STACK_OF(X509) *load_certs(BIO *err, char *file, int format)
if
(
format
==
FORMAT_PEM
)
if
(
format
==
FORMAT_PEM
)
{
{
othercerts
=
sk_X509_new
(
NULL
);
othercerts
=
sk_X509_new
_null
(
);
if
(
!
othercerts
)
if
(
!
othercerts
)
{
{
sk_X509_free
(
othercerts
);
sk_X509_free
(
othercerts
);
...
...
apps/crl2p7.c
浏览文件 @
ce699073
...
@@ -141,7 +141,7 @@ int MAIN(int argc, char **argv)
...
@@ -141,7 +141,7 @@ int MAIN(int argc, char **argv)
else
if
(
strcmp
(
*
argv
,
"-certfile"
)
==
0
)
else
if
(
strcmp
(
*
argv
,
"-certfile"
)
==
0
)
{
{
if
(
--
argc
<
1
)
goto
bad
;
if
(
--
argc
<
1
)
goto
bad
;
if
(
!
certflst
)
certflst
=
sk_new
(
NULL
);
if
(
!
certflst
)
certflst
=
sk_new
_null
(
);
sk_push
(
certflst
,
*
(
++
argv
));
sk_push
(
certflst
,
*
(
++
argv
));
}
}
else
else
...
@@ -215,7 +215,7 @@ bad:
...
@@ -215,7 +215,7 @@ bad:
p7s
->
contents
->
type
=
OBJ_nid2obj
(
NID_pkcs7_data
);
p7s
->
contents
->
type
=
OBJ_nid2obj
(
NID_pkcs7_data
);
if
(
!
ASN1_INTEGER_set
(
p7s
->
version
,
1
))
goto
end
;
if
(
!
ASN1_INTEGER_set
(
p7s
->
version
,
1
))
goto
end
;
if
((
crl_stack
=
sk_X509_CRL_new
(
NULL
))
==
NULL
)
goto
end
;
if
((
crl_stack
=
sk_X509_CRL_new
_null
(
))
==
NULL
)
goto
end
;
p7s
->
crl
=
crl_stack
;
p7s
->
crl
=
crl_stack
;
if
(
crl
!=
NULL
)
if
(
crl
!=
NULL
)
{
{
...
@@ -223,7 +223,7 @@ bad:
...
@@ -223,7 +223,7 @@ bad:
crl
=
NULL
;
/* now part of p7 for OPENSSL_freeing */
crl
=
NULL
;
/* now part of p7 for OPENSSL_freeing */
}
}
if
((
cert_stack
=
sk_X509_new
(
NULL
))
==
NULL
)
goto
end
;
if
((
cert_stack
=
sk_X509_new
_null
(
))
==
NULL
)
goto
end
;
p7s
->
cert
=
cert_stack
;
p7s
->
cert
=
cert_stack
;
if
(
certflst
)
for
(
i
=
0
;
i
<
sk_num
(
certflst
);
i
++
)
{
if
(
certflst
)
for
(
i
=
0
;
i
<
sk_num
(
certflst
);
i
++
)
{
...
...
apps/dgst.c
浏览文件 @
ce699073
...
@@ -307,7 +307,7 @@ int MAIN(int argc, char **argv)
...
@@ -307,7 +307,7 @@ int MAIN(int argc, char **argv)
}
}
siglen
=
BIO_read
(
sigbio
,
sigbuf
,
siglen
);
siglen
=
BIO_read
(
sigbio
,
sigbuf
,
siglen
);
BIO_free
(
sigbio
);
BIO_free
(
sigbio
);
if
(
siglen
<
=
0
)
{
if
(
siglen
=
=
0
)
{
BIO_printf
(
bio_err
,
"Error reading signature file %s
\n
"
,
BIO_printf
(
bio_err
,
"Error reading signature file %s
\n
"
,
sigfile
);
sigfile
);
ERR_print_errors
(
bio_err
);
ERR_print_errors
(
bio_err
);
...
...
apps/nseq.c
浏览文件 @
ce699073
...
@@ -123,7 +123,7 @@ int MAIN(int argc, char **argv)
...
@@ -123,7 +123,7 @@ int MAIN(int argc, char **argv)
if
(
toseq
)
{
if
(
toseq
)
{
seq
=
NETSCAPE_CERT_SEQUENCE_new
();
seq
=
NETSCAPE_CERT_SEQUENCE_new
();
seq
->
certs
=
sk_X509_new
(
NULL
);
seq
->
certs
=
sk_X509_new
_null
(
);
while
((
x509
=
PEM_read_bio_X509
(
in
,
NULL
,
NULL
,
NULL
)))
while
((
x509
=
PEM_read_bio_X509
(
in
,
NULL
,
NULL
,
NULL
)))
sk_X509_push
(
seq
->
certs
,
x509
);
sk_X509_push
(
seq
->
certs
,
x509
);
...
...
apps/pkcs12.c
浏览文件 @
ce699073
...
@@ -200,7 +200,7 @@ int MAIN(int argc, char **argv)
...
@@ -200,7 +200,7 @@ int MAIN(int argc, char **argv)
}
else
if
(
!
strcmp
(
*
args
,
"-caname"
))
{
}
else
if
(
!
strcmp
(
*
args
,
"-caname"
))
{
if
(
args
[
1
])
{
if
(
args
[
1
])
{
args
++
;
args
++
;
if
(
!
canames
)
canames
=
sk_new
(
NULL
);
if
(
!
canames
)
canames
=
sk_new
_null
(
);
sk_push
(
canames
,
*
args
);
sk_push
(
canames
,
*
args
);
}
else
badarg
=
1
;
}
else
badarg
=
1
;
}
else
if
(
!
strcmp
(
*
args
,
"-in"
))
{
}
else
if
(
!
strcmp
(
*
args
,
"-in"
))
{
...
@@ -427,7 +427,7 @@ int MAIN(int argc, char **argv)
...
@@ -427,7 +427,7 @@ int MAIN(int argc, char **argv)
CRYPTO_push_info
(
"reading certs from input"
);
CRYPTO_push_info
(
"reading certs from input"
);
#endif
#endif
certs
=
sk_X509_new
(
NULL
);
certs
=
sk_X509_new
_null
(
);
/* Load in all certs in input file */
/* Load in all certs in input file */
if
(
!
cert_load
(
in
,
certs
))
{
if
(
!
cert_load
(
in
,
certs
))
{
...
@@ -459,7 +459,7 @@ int MAIN(int argc, char **argv)
...
@@ -459,7 +459,7 @@ int MAIN(int argc, char **argv)
CRYPTO_push_info
(
"reading certs from certfile"
);
CRYPTO_push_info
(
"reading certs from certfile"
);
#endif
#endif
bags
=
sk_PKCS12_SAFEBAG_new
(
NULL
);
bags
=
sk_PKCS12_SAFEBAG_new
_null
(
);
/* Add any more certificates asked for */
/* Add any more certificates asked for */
if
(
certsin
)
{
if
(
certsin
)
{
...
@@ -550,7 +550,7 @@ int MAIN(int argc, char **argv)
...
@@ -550,7 +550,7 @@ int MAIN(int argc, char **argv)
goto
export_end
;
goto
export_end
;
}
}
safes
=
sk_PKCS7_new
(
NULL
);
safes
=
sk_PKCS7_new
_null
(
);
sk_PKCS7_push
(
safes
,
authsafe
);
sk_PKCS7_push
(
safes
,
authsafe
);
#ifdef CRYPTO_MDEBUG
#ifdef CRYPTO_MDEBUG
...
@@ -566,7 +566,7 @@ int MAIN(int argc, char **argv)
...
@@ -566,7 +566,7 @@ int MAIN(int argc, char **argv)
p8
=
NULL
;
p8
=
NULL
;
if
(
name
)
PKCS12_add_friendlyname
(
bag
,
name
,
-
1
);
if
(
name
)
PKCS12_add_friendlyname
(
bag
,
name
,
-
1
);
PKCS12_add_localkeyid
(
bag
,
keyid
,
keyidlen
);
PKCS12_add_localkeyid
(
bag
,
keyid
,
keyidlen
);
bags
=
sk_PKCS12_SAFEBAG_new
(
NULL
);
bags
=
sk_PKCS12_SAFEBAG_new
_null
(
);
sk_PKCS12_SAFEBAG_push
(
bags
,
bag
);
sk_PKCS12_SAFEBAG_push
(
bags
,
bag
);
#ifdef CRYPTO_MDEBUG
#ifdef CRYPTO_MDEBUG
...
...
crypto/asn1/a_set.c
浏览文件 @
ce699073
...
@@ -158,7 +158,7 @@ STACK *d2i_ASN1_SET(STACK **a, unsigned char **pp, long length,
...
@@ -158,7 +158,7 @@ STACK *d2i_ASN1_SET(STACK **a, unsigned char **pp, long length,
STACK
*
ret
=
NULL
;
STACK
*
ret
=
NULL
;
if
((
a
==
NULL
)
||
((
*
a
)
==
NULL
))
if
((
a
==
NULL
)
||
((
*
a
)
==
NULL
))
{
if
((
ret
=
sk_new
(
NULL
))
==
NULL
)
goto
err
;
}
{
if
((
ret
=
sk_new
_null
(
))
==
NULL
)
goto
err
;
}
else
else
ret
=
(
*
a
);
ret
=
(
*
a
);
...
...
crypto/bn/asm/README
浏览文件 @
ce699073
...
@@ -15,9 +15,9 @@ On the 2 alpha C compilers I had access to, it was not possible to do
...
@@ -15,9 +15,9 @@ On the 2 alpha C compilers I had access to, it was not possible to do
were 64 bits). So the hand assember gives access to the 128 bit result and
were 64 bits). So the hand assember gives access to the 128 bit result and
a 2 times speedup :-).
a 2 times speedup :-).
There are
2
versions of assember for the HP PA-RISC.
There are
3
versions of assember for the HP PA-RISC.
pa-risc.s is the origional one which works fine.
pa-risc
2.s is a new version that often generates warnings but if the
pa-risc
.s is the origional one which works fine and generated using gcc :-)
tests pass, it gives performance that is over 2 times faster than
pa-risc
.s.
pa-risc
2W.s and pa-risc2.s are 64 and 32-bit PA-RISC 2.0 implementations
Both were generated using gcc :-)
by Chris Ruemmler from HP (with some help from the HP C compiler).
crypto/bn/asm/pa-risc2.s
浏览文件 @
ce699073
此差异已折叠。
点击以展开。
crypto/dso/dso_lib.c
浏览文件 @
ce699073
...
@@ -107,8 +107,8 @@ DSO *DSO_new_method(DSO_METHOD *meth)
...
@@ -107,8 +107,8 @@ DSO *DSO_new_method(DSO_METHOD *meth)
return
(
NULL
);
return
(
NULL
);
}
}
memset
(
ret
,
0
,
sizeof
(
DSO
));
memset
(
ret
,
0
,
sizeof
(
DSO
));
ret
->
meth_data
=
sk_new
(
NULL
);
ret
->
meth_data
=
sk_new
_null
(
);
if
((
ret
->
meth_data
=
sk_new
(
NULL
))
==
NULL
)
if
((
ret
->
meth_data
=
sk_new
_null
(
))
==
NULL
)
{
{
/* sk_new doesn't generate any errors so we do */
/* sk_new doesn't generate any errors so we do */
DSOerr
(
DSO_F_DSO_NEW_METHOD
,
ERR_R_MALLOC_FAILURE
);
DSOerr
(
DSO_F_DSO_NEW_METHOD
,
ERR_R_MALLOC_FAILURE
);
...
...
crypto/opensslv.h
浏览文件 @
ce699073
...
@@ -25,8 +25,8 @@
...
@@ -25,8 +25,8 @@
* (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
* (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
* major minor fix final patch/beta)
* major minor fix final patch/beta)
*/
*/
#define OPENSSL_VERSION_NUMBER 0x0090600
1
L
#define OPENSSL_VERSION_NUMBER 0x0090600
2
L
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.6-beta
1 [engine] 11
Sep 2000"
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.6-beta
2 [engine] 17
Sep 2000"
#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
...
...
crypto/pkcs12/p12_attr.c
浏览文件 @
ce699073
...
@@ -87,13 +87,13 @@ int PKCS12_add_localkeyid (PKCS12_SAFEBAG *bag, unsigned char *name,
...
@@ -87,13 +87,13 @@ int PKCS12_add_localkeyid (PKCS12_SAFEBAG *bag, unsigned char *name,
return
0
;
return
0
;
}
}
attrib
->
object
=
OBJ_nid2obj
(
NID_localKeyID
);
attrib
->
object
=
OBJ_nid2obj
(
NID_localKeyID
);
if
(
!
(
attrib
->
value
.
set
=
sk_ASN1_TYPE_new
(
NULL
)))
{
if
(
!
(
attrib
->
value
.
set
=
sk_ASN1_TYPE_new
_null
(
)))
{
PKCS12err
(
PKCS12_F_PKCS12_ADD_LOCALKEYID
,
ERR_R_MALLOC_FAILURE
);
PKCS12err
(
PKCS12_F_PKCS12_ADD_LOCALKEYID
,
ERR_R_MALLOC_FAILURE
);
return
0
;
return
0
;
}
}
sk_ASN1_TYPE_push
(
attrib
->
value
.
set
,
keyid
);
sk_ASN1_TYPE_push
(
attrib
->
value
.
set
,
keyid
);
attrib
->
set
=
1
;
attrib
->
set
=
1
;
if
(
!
bag
->
attrib
&&
!
(
bag
->
attrib
=
sk_X509_ATTRIBUTE_new
(
NULL
)))
{
if
(
!
bag
->
attrib
&&
!
(
bag
->
attrib
=
sk_X509_ATTRIBUTE_new
_null
(
)))
{
PKCS12err
(
PKCS12_F_PKCS12_ADD_LOCALKEYID
,
ERR_R_MALLOC_FAILURE
);
PKCS12err
(
PKCS12_F_PKCS12_ADD_LOCALKEYID
,
ERR_R_MALLOC_FAILURE
);
return
0
;
return
0
;
}
}
...
@@ -129,14 +129,14 @@ int PKCS8_add_keyusage (PKCS8_PRIV_KEY_INFO *p8, int usage)
...
@@ -129,14 +129,14 @@ int PKCS8_add_keyusage (PKCS8_PRIV_KEY_INFO *p8, int usage)
return
0
;
return
0
;
}
}
attrib
->
object
=
OBJ_nid2obj
(
NID_key_usage
);
attrib
->
object
=
OBJ_nid2obj
(
NID_key_usage
);
if
(
!
(
attrib
->
value
.
set
=
sk_ASN1_TYPE_new
(
NULL
)))
{
if
(
!
(
attrib
->
value
.
set
=
sk_ASN1_TYPE_new
_null
(
)))
{
PKCS12err
(
PKCS12_F_PKCS8_ADD_KEYUSAGE
,
ERR_R_MALLOC_FAILURE
);
PKCS12err
(
PKCS12_F_PKCS8_ADD_KEYUSAGE
,
ERR_R_MALLOC_FAILURE
);
return
0
;
return
0
;
}
}
sk_ASN1_TYPE_push
(
attrib
->
value
.
set
,
keyid
);
sk_ASN1_TYPE_push
(
attrib
->
value
.
set
,
keyid
);
attrib
->
set
=
1
;
attrib
->
set
=
1
;
if
(
!
p8
->
attributes
if
(
!
p8
->
attributes
&&
!
(
p8
->
attributes
=
sk_X509_ATTRIBUTE_new
(
NULL
)))
{
&&
!
(
p8
->
attributes
=
sk_X509_ATTRIBUTE_new
_null
(
)))
{
PKCS12err
(
PKCS12_F_PKCS8_ADD_KEYUSAGE
,
ERR_R_MALLOC_FAILURE
);
PKCS12err
(
PKCS12_F_PKCS8_ADD_KEYUSAGE
,
ERR_R_MALLOC_FAILURE
);
return
0
;
return
0
;
}
}
...
@@ -195,14 +195,14 @@ int PKCS12_add_friendlyname_uni (PKCS12_SAFEBAG *bag,
...
@@ -195,14 +195,14 @@ int PKCS12_add_friendlyname_uni (PKCS12_SAFEBAG *bag,
return
0
;
return
0
;
}
}
attrib
->
object
=
OBJ_nid2obj
(
NID_friendlyName
);
attrib
->
object
=
OBJ_nid2obj
(
NID_friendlyName
);
if
(
!
(
attrib
->
value
.
set
=
sk_ASN1_TYPE_new
(
NULL
)))
{
if
(
!
(
attrib
->
value
.
set
=
sk_ASN1_TYPE_new
_null
(
)))
{
PKCS12err
(
PKCS12_F_PKCS12_ADD_FRIENDLYNAME
,
PKCS12err
(
PKCS12_F_PKCS12_ADD_FRIENDLYNAME
,
ERR_R_MALLOC_FAILURE
);
ERR_R_MALLOC_FAILURE
);
return
0
;
return
0
;
}
}
sk_ASN1_TYPE_push
(
attrib
->
value
.
set
,
fname
);
sk_ASN1_TYPE_push
(
attrib
->
value
.
set
,
fname
);
attrib
->
set
=
1
;
attrib
->
set
=
1
;
if
(
!
bag
->
attrib
&&
!
(
bag
->
attrib
=
sk_X509_ATTRIBUTE_new
(
NULL
)))
{
if
(
!
bag
->
attrib
&&
!
(
bag
->
attrib
=
sk_X509_ATTRIBUTE_new
_null
(
)))
{
PKCS12err
(
PKCS12_F_PKCS12_ADD_FRIENDLYNAME_UNI
,
PKCS12err
(
PKCS12_F_PKCS12_ADD_FRIENDLYNAME_UNI
,
ERR_R_MALLOC_FAILURE
);
ERR_R_MALLOC_FAILURE
);
return
0
;
return
0
;
...
...
crypto/pkcs12/p12_crt.c
浏览文件 @
ce699073
...
@@ -88,7 +88,7 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
...
@@ -88,7 +88,7 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
if
(
!
X509_check_private_key
(
cert
,
pkey
))
return
NULL
;
if
(
!
X509_check_private_key
(
cert
,
pkey
))
return
NULL
;
if
(
!
(
bags
=
sk_PKCS12_SAFEBAG_new
(
NULL
)))
{
if
(
!
(
bags
=
sk_PKCS12_SAFEBAG_new
_null
(
)))
{
PKCS12err
(
PKCS12_F_PKCS12_CREATE
,
ERR_R_MALLOC_FAILURE
);
PKCS12err
(
PKCS12_F_PKCS12_CREATE
,
ERR_R_MALLOC_FAILURE
);
return
NULL
;
return
NULL
;
}
}
...
@@ -123,7 +123,7 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
...
@@ -123,7 +123,7 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
if
(
!
authsafe
)
return
NULL
;
if
(
!
authsafe
)
return
NULL
;
if
(
!
(
safes
=
sk_PKCS7_new
(
NULL
))
if
(
!
(
safes
=
sk_PKCS7_new
_null
(
))
||
!
sk_PKCS7_push
(
safes
,
authsafe
))
{
||
!
sk_PKCS7_push
(
safes
,
authsafe
))
{
PKCS12err
(
PKCS12_F_PKCS12_CREATE
,
ERR_R_MALLOC_FAILURE
);
PKCS12err
(
PKCS12_F_PKCS12_CREATE
,
ERR_R_MALLOC_FAILURE
);
return
NULL
;
return
NULL
;
...
@@ -137,7 +137,7 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
...
@@ -137,7 +137,7 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
PKCS8_PRIV_KEY_INFO_free
(
p8
);
PKCS8_PRIV_KEY_INFO_free
(
p8
);
if
(
name
&&
!
PKCS12_add_friendlyname
(
bag
,
name
,
-
1
))
return
NULL
;
if
(
name
&&
!
PKCS12_add_friendlyname
(
bag
,
name
,
-
1
))
return
NULL
;
if
(
!
PKCS12_add_localkeyid
(
bag
,
keyid
,
keyidlen
))
return
NULL
;
if
(
!
PKCS12_add_localkeyid
(
bag
,
keyid
,
keyidlen
))
return
NULL
;
if
(
!
(
bags
=
sk_PKCS12_SAFEBAG_new
(
NULL
))
if
(
!
(
bags
=
sk_PKCS12_SAFEBAG_new
_null
(
))
||
!
sk_PKCS12_SAFEBAG_push
(
bags
,
bag
))
{
||
!
sk_PKCS12_SAFEBAG_push
(
bags
,
bag
))
{
PKCS12err
(
PKCS12_F_PKCS12_CREATE
,
ERR_R_MALLOC_FAILURE
);
PKCS12err
(
PKCS12_F_PKCS12_CREATE
,
ERR_R_MALLOC_FAILURE
);
return
NULL
;
return
NULL
;
...
...
crypto/pkcs12/p12_npas.c
浏览文件 @
ce699073
...
@@ -114,7 +114,7 @@ static int newpass_p12(PKCS12 *p12, char *oldpass, char *newpass)
...
@@ -114,7 +114,7 @@ static int newpass_p12(PKCS12 *p12, char *oldpass, char *newpass)
unsigned
int
maclen
;
unsigned
int
maclen
;
if
(
!
(
asafes
=
M_PKCS12_unpack_authsafes
(
p12
)))
return
0
;
if
(
!
(
asafes
=
M_PKCS12_unpack_authsafes
(
p12
)))
return
0
;
if
(
!
(
newsafes
=
sk_PKCS7_new
(
NULL
)))
return
0
;
if
(
!
(
newsafes
=
sk_PKCS7_new
_null
(
)))
return
0
;
for
(
i
=
0
;
i
<
sk_PKCS7_num
(
asafes
);
i
++
)
{
for
(
i
=
0
;
i
<
sk_PKCS7_num
(
asafes
);
i
++
)
{
p7
=
sk_PKCS7_value
(
asafes
,
i
);
p7
=
sk_PKCS7_value
(
asafes
,
i
);
bagnid
=
OBJ_obj2nid
(
p7
->
type
);
bagnid
=
OBJ_obj2nid
(
p7
->
type
);
...
...
crypto/pkcs7/pk7_doit.c
浏览文件 @
ce699073
...
@@ -909,7 +909,7 @@ static int add_attribute(STACK_OF(X509_ATTRIBUTE) **sk, int nid, int atrtype,
...
@@ -909,7 +909,7 @@ static int add_attribute(STACK_OF(X509_ATTRIBUTE) **sk, int nid, int atrtype,
if
(
*
sk
==
NULL
)
if
(
*
sk
==
NULL
)
{
{
*
sk
=
sk_X509_ATTRIBUTE_new
(
NULL
);
*
sk
=
sk_X509_ATTRIBUTE_new
_null
(
);
new_attrib:
new_attrib:
attr
=
X509_ATTRIBUTE_create
(
nid
,
atrtype
,
value
);
attr
=
X509_ATTRIBUTE_create
(
nid
,
atrtype
,
value
);
sk_X509_ATTRIBUTE_push
(
*
sk
,
attr
);
sk_X509_ATTRIBUTE_push
(
*
sk
,
attr
);
...
...
crypto/pkcs7/pk7_mime.c
浏览文件 @
ce699073
...
@@ -372,7 +372,7 @@ static int multi_split(BIO *bio, char *bound, STACK_OF(BIO) **ret)
...
@@ -372,7 +372,7 @@ static int multi_split(BIO *bio, char *bound, STACK_OF(BIO) **ret)
part
=
0
;
part
=
0
;
state
=
0
;
state
=
0
;
first
=
1
;
first
=
1
;
parts
=
sk_BIO_new
(
NULL
);
parts
=
sk_BIO_new
_null
(
);
*
ret
=
parts
;
*
ret
=
parts
;
while
((
len
=
BIO_gets
(
bio
,
linebuf
,
MAX_SMLEN
))
>
0
)
{
while
((
len
=
BIO_gets
(
bio
,
linebuf
,
MAX_SMLEN
))
>
0
)
{
state
=
mime_bound_check
(
linebuf
,
len
,
bound
,
blen
);
state
=
mime_bound_check
(
linebuf
,
len
,
bound
,
blen
);
...
...
crypto/pkcs7/pk7_smime.c
浏览文件 @
ce699073
...
@@ -111,7 +111,7 @@ PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
...
@@ -111,7 +111,7 @@ PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
/* Add SMIMECapabilities */
/* Add SMIMECapabilities */
if
(
!
(
flags
&
PKCS7_NOSMIMECAP
))
if
(
!
(
flags
&
PKCS7_NOSMIMECAP
))
{
{
if
(
!
(
smcap
=
sk_X509_ALGOR_new
(
NULL
)))
{
if
(
!
(
smcap
=
sk_X509_ALGOR_new
_null
(
)))
{
PKCS7err
(
PKCS7_F_PKCS7_SIGN
,
ERR_R_MALLOC_FAILURE
);
PKCS7err
(
PKCS7_F_PKCS7_SIGN
,
ERR_R_MALLOC_FAILURE
);
return
NULL
;
return
NULL
;
}
}
...
@@ -285,7 +285,7 @@ STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags)
...
@@ -285,7 +285,7 @@ STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags)
PKCS7err
(
PKCS7_F_PKCS7_GET0_SIGNERS
,
PKCS7_R_WRONG_CONTENT_TYPE
);
PKCS7err
(
PKCS7_F_PKCS7_GET0_SIGNERS
,
PKCS7_R_WRONG_CONTENT_TYPE
);
return
NULL
;
return
NULL
;
}
}
if
(
!
(
signers
=
sk_X509_new
(
NULL
)))
{
if
(
!
(
signers
=
sk_X509_new
_null
(
)))
{
PKCS7err
(
PKCS7_F_PKCS7_GET0_SIGNERS
,
ERR_R_MALLOC_FAILURE
);
PKCS7err
(
PKCS7_F_PKCS7_GET0_SIGNERS
,
ERR_R_MALLOC_FAILURE
);
return
NULL
;
return
NULL
;
}
}
...
...
crypto/rand/rand_win.c
浏览文件 @
ce699073
...
@@ -169,6 +169,12 @@ typedef BOOL (WINAPI *PROCESS32)(HANDLE, LPPROCESSENTRY32);
...
@@ -169,6 +169,12 @@ typedef BOOL (WINAPI *PROCESS32)(HANDLE, LPPROCESSENTRY32);
typedef
BOOL
(
WINAPI
*
THREAD32
)(
HANDLE
,
LPTHREADENTRY32
);
typedef
BOOL
(
WINAPI
*
THREAD32
)(
HANDLE
,
LPTHREADENTRY32
);
typedef
BOOL
(
WINAPI
*
MODULE32
)(
HANDLE
,
LPMODULEENTRY32
);
typedef
BOOL
(
WINAPI
*
MODULE32
)(
HANDLE
,
LPMODULEENTRY32
);
#include <lmcons.h>
#include <lmstats.h>
typedef
NET_API_STATUS
(
NET_API_FUNCTION
*
NETSTATGET
)
(
LMSTR
,
LMSTR
,
DWORD
,
DWORD
,
LPBYTE
*
);
typedef
NET_API_STATUS
(
NET_API_FUNCTION
*
NETFREE
)(
LPBYTE
);
int
RAND_poll
(
void
)
int
RAND_poll
(
void
)
{
{
MEMORYSTATUS
m
;
MEMORYSTATUS
m
;
...
@@ -177,15 +183,71 @@ int RAND_poll(void)
...
@@ -177,15 +183,71 @@ int RAND_poll(void)
DWORD
w
;
DWORD
w
;
HWND
h
;
HWND
h
;
HMODULE
advapi
,
kernel
,
user
;
HMODULE
advapi
,
kernel
,
user
,
netapi
;
CRYPTACQUIRECONTEXT
acquire
;
CRYPTACQUIRECONTEXT
acquire
;
CRYPTGENRANDOM
gen
;
CRYPTGENRANDOM
gen
;
CRYPTRELEASECONTEXT
release
;
CRYPTRELEASECONTEXT
release
;
NETSTATGET
netstatget
;
NETFREE
netfree
;
/* load functions dynamically - not available on all systems */
/* load functions dynamically - not available on all systems */
advapi
=
GetModuleHandle
(
"ADVAPI32.DLL"
);
advapi
=
GetModuleHandle
(
"ADVAPI32.DLL"
);
kernel
=
GetModuleHandle
(
"KERNEL32.DLL"
);
kernel
=
GetModuleHandle
(
"KERNEL32.DLL"
);
user
=
GetModuleHandle
(
"USER32.DLL"
);
user
=
GetModuleHandle
(
"USER32.DLL"
);
netapi
=
GetModuleHandle
(
"NETAPI32.DLL"
);
if
(
netapi
)
{
netstatget
=
(
NETSTATGET
)
GetProcAddress
(
netapi
,
"NetStatisticsGet"
);
netfree
=
(
NETFREE
)
GetProcAddress
(
netapi
,
"NetApiBufferFree"
);
}
if
(
netstatget
&&
netfree
)
{
LPBYTE
outbuf
;
/* NetStatisticsGet() is a Unicode only function */
if
(
netstatget
(
NULL
,
L"LanmanWorkstation"
,
0
,
0
,
&
outbuf
)
==
0
)
{
RAND_add
(
outbuf
,
sizeof
(
STAT_WORKSTATION_0
),
0
);
netfree
(
outbuf
);
}
if
(
netstatget
(
NULL
,
L"LanmanServer"
,
0
,
0
,
&
outbuf
)
==
0
)
{
RAND_add
(
outbuf
,
sizeof
(
STAT_SERVER_0
),
0
);
netfree
(
outbuf
);
}
}
/* Read Performance Statistics from NT/2000 registry */
/* The size of the performance data can vary from call to call */
/* so we must guess the size of the buffer to use and increase */
/* its size if we get an ERROR_MORE_DATA return instead of */
/* ERROR_SUCCESS. */
{
LONG
rc
=
ERROR_MORE_DATA
;
char
*
buf
=
NULL
;
DWORD
bufsz
=
0
;
DWORD
length
;
while
(
rc
==
ERROR_MORE_DATA
)
{
buf
=
realloc
(
buf
,
bufsz
+
8192
);
if
(
!
buf
)
break
;
bufsz
+=
8192
;
length
=
bufsz
;
rc
=
RegQueryValueEx
(
HKEY_PERFORMANCE_DATA
,
"Global"
,
NULL
,
NULL
,
buf
,
&
length
);
}
if
(
rc
==
ERROR_SUCCESS
)
{
RAND_add
(
&
length
,
sizeof
(
length
),
0
);
RAND_add
(
buf
,
length
,
0
);
}
if
(
buf
)
free
(
buf
);
}
if
(
advapi
)
if
(
advapi
)
{
{
...
@@ -255,17 +317,29 @@ int RAND_poll(void)
...
@@ -255,17 +317,29 @@ int RAND_poll(void)
RAND_add
(
&
h
,
sizeof
(
h
),
0
);
RAND_add
(
&
h
,
sizeof
(
h
),
0
);
}
}
#if 0
if
(
cursor
)
{
/* unfortunately, its not safe to call GetCursorInfo()
* on NT4 even though it exists in SP3 (or SP6) and
* higher.
*/
OSVERSIONINFO
osverinfo
;
osverinfo
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFO
)
;
GetVersionEx
(
&
osverinfo
)
;
if
(
osverinfo
.
dwPlatformId
==
VER_PLATFORM_WIN32_NT
&&
osverinfo
.
dwMajorVersion
<
5
)
cursor
=
0
;
}
if
(
cursor
)
if
(
cursor
)
{
{
/* cursor position */
/* cursor position */
PCURSORINFO p = (PCURSORINFO) buf;
CURSORINFO
ci
;
p->cbSize = sizeof(CURSORINFO);
ci
.
cbSize
=
sizeof
(
CURSORINFO
);
if (cursor(p))
if
(
cursor
(
&
ci
))
RAND_add(p+sizeof(p->cbSize),
RAND_add
(
&
ci
,
ci
.
cbSize
,
0
);
p->cbSize-sizeof(p->cbSize), 0);
}
}
#endif
if
(
queue
)
if
(
queue
)
{
{
...
@@ -277,7 +351,7 @@ int RAND_poll(void)
...
@@ -277,7 +351,7 @@ int RAND_poll(void)
/* Toolhelp32 snapshot: enumerate processes, threads, modules and heap
/* Toolhelp32 snapshot: enumerate processes, threads, modules and heap
* http://msdn.microsoft.com/library/psdk/winbase/toolhelp_5pfd.htm
* http://msdn.microsoft.com/library/psdk/winbase/toolhelp_5pfd.htm
* (Win 9x only, not available on NT)
* (Win 9x
and 2000
only, not available on NT)
*
*
* This seeding method was proposed in Peter Gutmann, Software
* This seeding method was proposed in Peter Gutmann, Software
* Generation of Practically Strong Random Numbers,
* Generation of Practically Strong Random Numbers,
...
...
crypto/x509v3/v3_akey.c
浏览文件 @
ce699073
...
@@ -224,7 +224,7 @@ if((issuer && !ikeyid) || (issuer == 2)) {
...
@@ -224,7 +224,7 @@ if((issuer && !ikeyid) || (issuer == 2)) {
if
(
!
(
akeyid
=
AUTHORITY_KEYID_new
()))
goto
err
;
if
(
!
(
akeyid
=
AUTHORITY_KEYID_new
()))
goto
err
;
if
(
isname
)
{
if
(
isname
)
{
if
(
!
(
gens
=
sk_GENERAL_NAME_new
(
NULL
))
||
!
(
gen
=
GENERAL_NAME_new
())
if
(
!
(
gens
=
sk_GENERAL_NAME_new
_null
(
))
||
!
(
gen
=
GENERAL_NAME_new
())
||
!
sk_GENERAL_NAME_push
(
gens
,
gen
))
{
||
!
sk_GENERAL_NAME_push
(
gens
,
gen
))
{
X509V3err
(
X509V3_F_V2I_AUTHORITY_KEYID
,
ERR_R_MALLOC_FAILURE
);
X509V3err
(
X509V3_F_V2I_AUTHORITY_KEYID
,
ERR_R_MALLOC_FAILURE
);
goto
err
;
goto
err
;
...
...
crypto/x509v3/v3_alt.c
浏览文件 @
ce699073
...
@@ -160,7 +160,7 @@ static STACK_OF(GENERAL_NAME) *v2i_issuer_alt(X509V3_EXT_METHOD *method,
...
@@ -160,7 +160,7 @@ static STACK_OF(GENERAL_NAME) *v2i_issuer_alt(X509V3_EXT_METHOD *method,
STACK_OF
(
GENERAL_NAME
)
*
gens
=
NULL
;
STACK_OF
(
GENERAL_NAME
)
*
gens
=
NULL
;
CONF_VALUE
*
cnf
;
CONF_VALUE
*
cnf
;
int
i
;
int
i
;
if
(
!
(
gens
=
sk_GENERAL_NAME_new
(
NULL
)))
{
if
(
!
(
gens
=
sk_GENERAL_NAME_new
_null
(
)))
{
X509V3err
(
X509V3_F_V2I_GENERAL_NAMES
,
ERR_R_MALLOC_FAILURE
);
X509V3err
(
X509V3_F_V2I_GENERAL_NAMES
,
ERR_R_MALLOC_FAILURE
);
return
NULL
;
return
NULL
;
}
}
...
@@ -225,7 +225,7 @@ static STACK_OF(GENERAL_NAME) *v2i_subject_alt(X509V3_EXT_METHOD *method,
...
@@ -225,7 +225,7 @@ static STACK_OF(GENERAL_NAME) *v2i_subject_alt(X509V3_EXT_METHOD *method,
STACK_OF
(
GENERAL_NAME
)
*
gens
=
NULL
;
STACK_OF
(
GENERAL_NAME
)
*
gens
=
NULL
;
CONF_VALUE
*
cnf
;
CONF_VALUE
*
cnf
;
int
i
;
int
i
;
if
(
!
(
gens
=
sk_GENERAL_NAME_new
(
NULL
)))
{
if
(
!
(
gens
=
sk_GENERAL_NAME_new
_null
(
)))
{
X509V3err
(
X509V3_F_V2I_GENERAL_NAMES
,
ERR_R_MALLOC_FAILURE
);
X509V3err
(
X509V3_F_V2I_GENERAL_NAMES
,
ERR_R_MALLOC_FAILURE
);
return
NULL
;
return
NULL
;
}
}
...
@@ -304,7 +304,7 @@ STACK_OF(GENERAL_NAME) *v2i_GENERAL_NAMES(X509V3_EXT_METHOD *method,
...
@@ -304,7 +304,7 @@ STACK_OF(GENERAL_NAME) *v2i_GENERAL_NAMES(X509V3_EXT_METHOD *method,
STACK_OF
(
GENERAL_NAME
)
*
gens
=
NULL
;
STACK_OF
(
GENERAL_NAME
)
*
gens
=
NULL
;
CONF_VALUE
*
cnf
;
CONF_VALUE
*
cnf
;
int
i
;
int
i
;
if
(
!
(
gens
=
sk_GENERAL_NAME_new
(
NULL
)))
{
if
(
!
(
gens
=
sk_GENERAL_NAME_new
_null
(
)))
{
X509V3err
(
X509V3_F_V2I_GENERAL_NAMES
,
ERR_R_MALLOC_FAILURE
);
X509V3err
(
X509V3_F_V2I_GENERAL_NAMES
,
ERR_R_MALLOC_FAILURE
);
return
NULL
;
return
NULL
;
}
}
...
...
crypto/x509v3/v3_crld.c
浏览文件 @
ce699073
...
@@ -109,7 +109,7 @@ static STACK_OF(DIST_POINT) *v2i_crld(X509V3_EXT_METHOD *method,
...
@@ -109,7 +109,7 @@ static STACK_OF(DIST_POINT) *v2i_crld(X509V3_EXT_METHOD *method,
GENERAL_NAME
*
gen
=
NULL
;
GENERAL_NAME
*
gen
=
NULL
;
CONF_VALUE
*
cnf
;
CONF_VALUE
*
cnf
;
int
i
;
int
i
;
if
(
!
(
crld
=
sk_DIST_POINT_new
(
NULL
)))
goto
merr
;
if
(
!
(
crld
=
sk_DIST_POINT_new
_null
(
)))
goto
merr
;
for
(
i
=
0
;
i
<
sk_CONF_VALUE_num
(
nval
);
i
++
)
{
for
(
i
=
0
;
i
<
sk_CONF_VALUE_num
(
nval
);
i
++
)
{
DIST_POINT
*
point
;
DIST_POINT
*
point
;
cnf
=
sk_CONF_VALUE_value
(
nval
,
i
);
cnf
=
sk_CONF_VALUE_value
(
nval
,
i
);
...
...
crypto/x509v3/v3_extku.c
浏览文件 @
ce699073
...
@@ -129,7 +129,7 @@ ASN1_OBJECT *objtmp;
...
@@ -129,7 +129,7 @@ ASN1_OBJECT *objtmp;
CONF_VALUE
*
val
;
CONF_VALUE
*
val
;
int
i
;
int
i
;
if
(
!
(
extku
=
sk_ASN1_OBJECT_new
(
NULL
)))
{
if
(
!
(
extku
=
sk_ASN1_OBJECT_new
_null
(
)))
{
X509V3err
(
X509V3_F_V2I_EXT_KU
,
ERR_R_MALLOC_FAILURE
);
X509V3err
(
X509V3_F_V2I_EXT_KU
,
ERR_R_MALLOC_FAILURE
);
return
NULL
;
return
NULL
;
}
}
...
...
crypto/x509v3/v3_genn.c
浏览文件 @
ce699073
...
@@ -220,7 +220,7 @@ void GENERAL_NAME_free(GENERAL_NAME *a)
...
@@ -220,7 +220,7 @@ void GENERAL_NAME_free(GENERAL_NAME *a)
STACK_OF
(
GENERAL_NAME
)
*
GENERAL_NAMES_new
()
STACK_OF
(
GENERAL_NAME
)
*
GENERAL_NAMES_new
()
{
{
return
sk_GENERAL_NAME_new
(
NULL
);
return
sk_GENERAL_NAME_new
_null
(
);
}
}
void
GENERAL_NAMES_free
(
STACK_OF
(
GENERAL_NAME
)
*
a
)
void
GENERAL_NAMES_free
(
STACK_OF
(
GENERAL_NAME
)
*
a
)
...
...
crypto/x509v3/v3_info.c
浏览文件 @
ce699073
...
@@ -119,7 +119,7 @@ static STACK_OF(ACCESS_DESCRIPTION) *v2i_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD
...
@@ -119,7 +119,7 @@ static STACK_OF(ACCESS_DESCRIPTION) *v2i_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD
ACCESS_DESCRIPTION
*
acc
;
ACCESS_DESCRIPTION
*
acc
;
int
i
,
objlen
;
int
i
,
objlen
;
char
*
objtmp
,
*
ptmp
;
char
*
objtmp
,
*
ptmp
;
if
(
!
(
ainfo
=
sk_ACCESS_DESCRIPTION_new
(
NULL
)))
{
if
(
!
(
ainfo
=
sk_ACCESS_DESCRIPTION_new
_null
(
)))
{
X509V3err
(
X509V3_F_V2I_ACCESS_DESCRIPTION
,
ERR_R_MALLOC_FAILURE
);
X509V3err
(
X509V3_F_V2I_ACCESS_DESCRIPTION
,
ERR_R_MALLOC_FAILURE
);
return
NULL
;
return
NULL
;
}
}
...
@@ -209,7 +209,7 @@ void ACCESS_DESCRIPTION_free(ACCESS_DESCRIPTION *a)
...
@@ -209,7 +209,7 @@ void ACCESS_DESCRIPTION_free(ACCESS_DESCRIPTION *a)
STACK_OF
(
ACCESS_DESCRIPTION
)
*
AUTHORITY_INFO_ACCESS_new
(
void
)
STACK_OF
(
ACCESS_DESCRIPTION
)
*
AUTHORITY_INFO_ACCESS_new
(
void
)
{
{
return
sk_ACCESS_DESCRIPTION_new
(
NULL
);
return
sk_ACCESS_DESCRIPTION_new
_null
(
);
}
}
void
AUTHORITY_INFO_ACCESS_free
(
STACK_OF
(
ACCESS_DESCRIPTION
)
*
a
)
void
AUTHORITY_INFO_ACCESS_free
(
STACK_OF
(
ACCESS_DESCRIPTION
)
*
a
)
...
...
crypto/x509v3/v3_utl.c
浏览文件 @
ce699073
...
@@ -80,7 +80,7 @@ int X509V3_add_value(const char *name, const char *value,
...
@@ -80,7 +80,7 @@ int X509V3_add_value(const char *name, const char *value,
if
(
name
&&
!
(
tname
=
BUF_strdup
(
name
)))
goto
err
;
if
(
name
&&
!
(
tname
=
BUF_strdup
(
name
)))
goto
err
;
if
(
value
&&
!
(
tvalue
=
BUF_strdup
(
value
)))
goto
err
;;
if
(
value
&&
!
(
tvalue
=
BUF_strdup
(
value
)))
goto
err
;;
if
(
!
(
vtmp
=
(
CONF_VALUE
*
)
OPENSSL_malloc
(
sizeof
(
CONF_VALUE
))))
goto
err
;
if
(
!
(
vtmp
=
(
CONF_VALUE
*
)
OPENSSL_malloc
(
sizeof
(
CONF_VALUE
))))
goto
err
;
if
(
!*
extlist
&&
!
(
*
extlist
=
sk_CONF_VALUE_new
(
NULL
)))
goto
err
;
if
(
!*
extlist
&&
!
(
*
extlist
=
sk_CONF_VALUE_new
_null
(
)))
goto
err
;
vtmp
->
section
=
NULL
;
vtmp
->
section
=
NULL
;
vtmp
->
name
=
tname
;
vtmp
->
name
=
tname
;
vtmp
->
value
=
tvalue
;
vtmp
->
value
=
tvalue
;
...
...
doc/crypto/BIO_s_fd.pod
浏览文件 @
ce699073
...
@@ -20,6 +20,20 @@ BIO_s_fd, BIO_set_fd, BIO_get_fd, BIO_new_fd - file descriptor BIO
...
@@ -20,6 +20,20 @@ BIO_s_fd, BIO_set_fd, BIO_get_fd, BIO_new_fd - file descriptor BIO
BIO_s_fd() returns the file descriptor BIO method. This is a wrapper
BIO_s_fd() returns the file descriptor BIO method. This is a wrapper
round the platforms file descriptor routines such as read() and write().
round the platforms file descriptor routines such as read() and write().
BIO_read() and BIO_write() read or write the underlying descriptor.
BIO_puts() is supported but BIO_gets() is not.
If the close flag is set then then close() is called on the underlying
file descriptor when the BIO is freed.
BIO_reset() attempts to change the file pointer to the start of file
using lseek(fd, 0, 0).
BIO_seek() sets the file pointer to position B<ofs> from start of file
using lseek(fd, ofs, 0).
BIO_tell() returns the current file position by calling lseek(fd, 0, 1).
BIO_set_fd() sets the file descriptor of BIO B<b> to B<fd> and the close
BIO_set_fd() sets the file descriptor of BIO B<b> to B<fd> and the close
flag to B<c>.
flag to B<c>.
...
@@ -31,15 +45,6 @@ BIO_new_fd() returns a file descriptor BIO using B<fd> and B<close_flag>.
...
@@ -31,15 +45,6 @@ BIO_new_fd() returns a file descriptor BIO using B<fd> and B<close_flag>.
=head1 NOTES
=head1 NOTES
If the close flag is set then then close() is called on the underlying
file descriptor when the BIO is freed.
BIO_reset() attempts to change the file pointer to the start of file
using lseek(fd, 0, 0).
BIO_read() and BIO_write() read or write the underlying descriptor.
BIO_puts() is supported but BIO_gets() is not.
The behaviour of BIO_read() and BIO_write() depends on the behavior of the
The behaviour of BIO_read() and BIO_write() depends on the behavior of the
platforms read() and write() calls on the descriptor. If the underlying
platforms read() and write() calls on the descriptor. If the underlying
file descriptor is in a non blocking mode then the BIO will behave in the
file descriptor is in a non blocking mode then the BIO will behave in the
...
@@ -53,6 +58,11 @@ instead.
...
@@ -53,6 +58,11 @@ instead.
BIO_s_fd() returns the file descriptor BIO method.
BIO_s_fd() returns the file descriptor BIO method.
BIO_reset() returns zero for success and -1 if an error occurred.
BIO_seek() and BIO_tell() return the current file position or -1
is an error occurred. These values reflect the underlying lseek()
behaviour.
BIO_set_fd() always returns 1.
BIO_set_fd() always returns 1.
BIO_get_fd() returns the file descriptor or -1 if the BIO has not
BIO_get_fd() returns the file descriptor or -1 if the BIO has not
...
...
doc/crypto/BIO_s_file.pod
浏览文件 @
ce699073
...
@@ -28,6 +28,23 @@ BIO_s_file() returns the BIO file method. As its name implies it
...
@@ -28,6 +28,23 @@ BIO_s_file() returns the BIO file method. As its name implies it
is a wrapper round the stdio FILE structure and it is a
is a wrapper round the stdio FILE structure and it is a
source/sink BIO.
source/sink BIO.
Calls to BIO_read() and BIO_write() read and write data to the
underlying stream. BIO_gets() and BIO_puts() are supported on file BIOs.
BIO_flush() on a file BIO calls the fflush() function on the wrapped
stream.
BIO_reset() attempts to change the file pointer to the start of file
using fseek(stream, 0, 0).
BIO_seek() sets the file pointer to position B<ofs> from start of file
using lseek(stream, ofs, 0).
BIO_eof() calls feof().
Setting the BIO_CLOSE flag calls fclose() on the stream when the BIO
is freed.
BIO_new_file() creates a new file BIO with mode B<mode> the meaning
BIO_new_file() creates a new file BIO with mode B<mode> the meaning
of B<mode> is the same as the stdio function fopen(). The BIO_CLOSE
of B<mode> is the same as the stdio function fopen(). The BIO_CLOSE
flag is set on the returned BIO.
flag is set on the returned BIO.
...
@@ -42,26 +59,17 @@ meaning as in BIO_new_fp(), it is a macro.
...
@@ -42,26 +59,17 @@ meaning as in BIO_new_fp(), it is a macro.
BIO_get_fp() retrieves the fp of a file BIO, it is a macro.
BIO_get_fp() retrieves the fp of a file BIO, it is a macro.
BIO_seek() is a macro that sets the position pointer to B<offset> bytes
from the start of file.
BIO_tell() returns the value of the position pointer.
BIO_read_filename(), BIO_write_filename(), BIO_append_filename() and
BIO_read_filename(), BIO_write_filename(), BIO_append_filename() and
BIO_rw_filename() set the file BIO B<b> to use file B<name> for
BIO_rw_filename() set the file BIO B<b> to use file B<name> for
reading, writing, append or read write respectively.
reading, writing, append or read write respectively.
=head1 NOTES
=head1 NOTES
Calls to BIO_read() and BIO_write() read and write data to the
underlying stream. BIO_gets() and BIO_puts() are supported on file BIOs.
BIO_flush() on a file BIO calls the fflush() function on the wrapped
stream.
BIO_reset() on a file BIO calls fseek() to reset the position indicator
to the start of the file.
BIO_eof() calls feof().
Setting the BIO_CLOSE flag calls fclose() on the stream when the BIO
is freed.
When wrapping stdout, stdin or stderr the underlying stream should not
When wrapping stdout, stdin or stderr the underlying stream should not
normally be closed so the BIO_NOCLOSE flag should be set.
normally be closed so the BIO_NOCLOSE flag should be set.
...
@@ -111,6 +119,11 @@ occurred.
...
@@ -111,6 +119,11 @@ occurred.
BIO_set_fp() and BIO_get_fp() return 1 for success or 0 for failure
BIO_set_fp() and BIO_get_fp() return 1 for success or 0 for failure
(although the current implementation never return 0).
(although the current implementation never return 0).
BIO_seek() returns the same value as the underlying fseek() function:
0 for success or -1 for failure.
BIO_tell() returns the current file position.
BIO_read_filename(), BIO_write_filename(), BIO_append_filename() and
BIO_read_filename(), BIO_write_filename(), BIO_append_filename() and
BIO_rw_filename() return 1 for success or 0 for failure.
BIO_rw_filename() return 1 for success or 0 for failure.
...
...
ssl/ssl_cert.c
浏览文件 @
ce699073
...
@@ -589,7 +589,7 @@ STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file)
...
@@ -589,7 +589,7 @@ STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file)
X509_NAME
*
xn
=
NULL
;
X509_NAME
*
xn
=
NULL
;
STACK_OF
(
X509_NAME
)
*
ret
,
*
sk
;
STACK_OF
(
X509_NAME
)
*
ret
,
*
sk
;
ret
=
sk_X509_NAME_new
(
NULL
);
ret
=
sk_X509_NAME_new
_null
(
);
sk
=
sk_X509_NAME_new
(
xname_cmp
);
sk
=
sk_X509_NAME_new
(
xname_cmp
);
in
=
BIO_new
(
BIO_s_file_internal
());
in
=
BIO_new
(
BIO_s_file_internal
());
...
...
ssl/ssl_ciph.c
浏览文件 @
ce699073
...
@@ -799,7 +799,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
...
@@ -799,7 +799,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
* Allocate new "cipherstack" for the result, return with error
* Allocate new "cipherstack" for the result, return with error
* if we cannot get one.
* if we cannot get one.
*/
*/
if
((
cipherstack
=
sk_SSL_CIPHER_new
(
NULL
))
==
NULL
)
if
((
cipherstack
=
sk_SSL_CIPHER_new
_null
(
))
==
NULL
)
{
{
OPENSSL_free
(
list
);
OPENSSL_free
(
list
);
return
(
NULL
);
return
(
NULL
);
...
...
ssl/ssl_lib.c
浏览文件 @
ce699073
...
@@ -1036,7 +1036,7 @@ STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,unsigned char *p,int num,
...
@@ -1036,7 +1036,7 @@ STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,unsigned char *p,int num,
return
(
NULL
);
return
(
NULL
);
}
}
if
((
skp
==
NULL
)
||
(
*
skp
==
NULL
))
if
((
skp
==
NULL
)
||
(
*
skp
==
NULL
))
sk
=
sk_SSL_CIPHER_new
(
NULL
);
/* change perhaps later */
sk
=
sk_SSL_CIPHER_new
_null
(
);
/* change perhaps later */
else
else
{
{
sk
=
*
skp
;
sk
=
*
skp
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录