Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
d58d092b
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看板
提交
d58d092b
编写于
6月 10, 1999
作者:
B
Bodo Möller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Avoid warnings.
上级
9d9b559e
变更
21
隐藏空白更改
内联
并排
Showing
21 changed file
with
47 addition
and
43 deletion
+47
-43
apps/ca.c
apps/ca.c
+3
-3
apps/dgst.c
apps/dgst.c
+1
-1
apps/dsaparam.c
apps/dsaparam.c
+1
-1
apps/gendh.c
apps/gendh.c
+1
-1
apps/genrsa.c
apps/genrsa.c
+1
-1
apps/openssl.c
apps/openssl.c
+1
-1
apps/pkcs12.c
apps/pkcs12.c
+1
-1
apps/req.c
apps/req.c
+4
-4
apps/s_server.c
apps/s_server.c
+3
-3
apps/s_socket.c
apps/s_socket.c
+1
-1
apps/speed.c
apps/speed.c
+6
-6
crypto/asn1/a_object.c
crypto/asn1/a_object.c
+2
-2
crypto/bf/bftest.c
crypto/bf/bftest.c
+1
-1
crypto/bio/bss_bio.c
crypto/bio/bss_bio.c
+1
-0
crypto/bio/bss_conn.c
crypto/bio/bss_conn.c
+1
-1
crypto/mem.c
crypto/mem.c
+2
-2
crypto/rand/randtest.c
crypto/rand/randtest.c
+9
-9
ssl/s23_clnt.c
ssl/s23_clnt.c
+1
-1
ssl/s3_pkt.c
ssl/s3_pkt.c
+1
-1
ssl/ssl_lib.c
ssl/ssl_lib.c
+1
-1
ssl/ssltest.c
ssl/ssltest.c
+5
-2
未找到文件。
apps/ca.c
浏览文件 @
d58d092b
...
...
@@ -866,7 +866,7 @@ bad:
if
(
!
batch
)
{
BIO_printf
(
bio_err
,
"
\n
%d out of %d certificate requests certified, commit? [y/n]"
,
total_done
,
total
);
BIO_flush
(
bio_err
);
(
void
)
BIO_flush
(
bio_err
);
buf
[
0
][
0
]
=
'\0'
;
fgets
(
buf
[
0
],
10
,
stdin
);
if
((
buf
[
0
][
0
]
!=
'y'
)
&&
(
buf
[
0
][
0
]
!=
'Y'
))
...
...
@@ -1067,7 +1067,7 @@ bad:
strlen
(
pp
[
DB_rev_date
]));
/* strcpy(r->revocationDate,pp[DB_rev_date]);*/
BIO_reset
(
hex
);
(
void
)
BIO_reset
(
hex
);
if
(
!
BIO_puts
(
hex
,
pp
[
DB_serial
]))
goto
err
;
if
(
!
a2i_ASN1_INTEGER
(
hex
,
r
->
serialNumber
,
...
...
@@ -1791,7 +1791,7 @@ again2:
if
(
!
batch
)
{
BIO_printf
(
bio_err
,
"Sign the certificate? [y/n]:"
);
BIO_flush
(
bio_err
);
(
void
)
BIO_flush
(
bio_err
);
buf
[
0
]
=
'\0'
;
fgets
(
buf
,
sizeof
(
buf
)
-
1
,
stdin
);
if
(
!
((
buf
[
0
]
==
'y'
)
||
(
buf
[
0
]
==
'Y'
)))
...
...
apps/dgst.c
浏览文件 @
d58d092b
...
...
@@ -182,7 +182,7 @@ int MAIN(int argc, char **argv)
}
printf
(
"%s(%s)= "
,
name
,
argv
[
i
]);
do_fp
(
buf
,
inp
,
separator
);
BIO_reset
(
bmd
);
(
void
)
BIO_reset
(
bmd
);
}
}
end:
...
...
apps/dsaparam.c
浏览文件 @
d58d092b
...
...
@@ -345,7 +345,7 @@ static void MS_CALLBACK dsa_cb(int p, int n, char *arg)
if
(
p
==
2
)
c
=
'*'
;
if
(
p
==
3
)
c
=
'\n'
;
BIO_write
((
BIO
*
)
arg
,
&
c
,
1
);
BIO_flush
((
BIO
*
)
arg
);
(
void
)
BIO_flush
((
BIO
*
)
arg
);
#ifdef LINT
p
=
n
;
#endif
...
...
apps/gendh.c
浏览文件 @
d58d092b
...
...
@@ -193,7 +193,7 @@ static void MS_CALLBACK dh_cb(int p, int n, void *arg)
if
(
p
==
2
)
c
=
'*'
;
if
(
p
==
3
)
c
=
'\n'
;
BIO_write
((
BIO
*
)
arg
,
&
c
,
1
);
BIO_flush
((
BIO
*
)
arg
);
(
void
)
BIO_flush
((
BIO
*
)
arg
);
#ifdef LINT
p
=
n
;
#endif
...
...
apps/genrsa.c
浏览文件 @
d58d092b
...
...
@@ -236,7 +236,7 @@ static void MS_CALLBACK genrsa_cb(int p, int n, void *arg)
if
(
p
==
2
)
c
=
'*'
;
if
(
p
==
3
)
c
=
'\n'
;
BIO_write
((
BIO
*
)
arg
,
&
c
,
1
);
BIO_flush
((
BIO
*
)
arg
);
(
void
)
BIO_flush
((
BIO
*
)
arg
);
#ifdef LINT
p
=
n
;
#endif
...
...
apps/openssl.c
浏览文件 @
d58d092b
...
...
@@ -219,7 +219,7 @@ int main(int Argc, char *Argv[])
}
if
(
ret
!=
0
)
BIO_printf
(
bio_err
,
"error in %s
\n
"
,
argv
[
0
]);
BIO_flush
(
bio_err
);
(
void
)
BIO_flush
(
bio_err
);
}
BIO_printf
(
bio_err
,
"bad exit
\n
"
);
ret
=
1
;
...
...
apps/pkcs12.c
浏览文件 @
d58d092b
...
...
@@ -293,7 +293,7 @@ if (export_cert) {
unsigned
int
keyidlen
;
/* Get private key so we can match it to a certificate */
key
=
PEM_read_bio_PrivateKey
(
inkey
?
inkey
:
in
,
NULL
,
NULL
);
if
(
!
inkey
)
BIO_reset
(
in
);
if
(
!
inkey
)
(
void
)
BIO_reset
(
in
);
if
(
!
key
)
{
BIO_printf
(
bio_err
,
"Error loading private key
\n
"
);
ERR_print_errors
(
bio_err
);
...
...
apps/req.c
浏览文件 @
d58d092b
...
...
@@ -245,7 +245,7 @@ int MAIN(int argc, char **argv)
if
((
dsa_params
=
PEM_read_bio_DSAparams
(
in
,
NULL
,
NULL
))
==
NULL
)
{
ERR_clear_error
();
BIO_reset
(
in
);
(
void
)
BIO_reset
(
in
);
if
((
xtmp
=
PEM_read_bio_X509
(
in
,
NULL
,
NULL
))
==
NULL
)
{
BIO_printf
(
bio_err
,
"unable to load DSA parameters from file
\n
"
);
...
...
@@ -979,7 +979,7 @@ static int add_DN_object(X509_NAME *n, char *text, char *def, char *value,
MS_STATIC
char
buf
[
1024
];
BIO_printf
(
bio_err
,
"%s [%s]:"
,
text
,
def
);
BIO_flush
(
bio_err
);
(
void
)
BIO_flush
(
bio_err
);
if
(
value
!=
NULL
)
{
strcpy
(
buf
,
value
);
...
...
@@ -1040,7 +1040,7 @@ static int add_attribute_object(STACK_OF(X509_ATTRIBUTE) *n, char *text,
start:
BIO_printf
(
bio_err
,
"%s [%s]:"
,
text
,
def
);
BIO_flush
(
bio_err
);
(
void
)
BIO_flush
(
bio_err
);
if
(
value
!=
NULL
)
{
strcpy
(
buf
,
value
);
...
...
@@ -1123,7 +1123,7 @@ static void MS_CALLBACK req_cb(int p, int n, void *arg)
if
(
p
==
2
)
c
=
'*'
;
if
(
p
==
3
)
c
=
'\n'
;
BIO_write
((
BIO
*
)
arg
,
&
c
,
1
);
BIO_flush
((
BIO
*
)
arg
);
(
void
)
BIO_flush
((
BIO
*
)
arg
);
#ifdef LINT
p
=
n
;
#endif
...
...
apps/s_server.c
浏览文件 @
d58d092b
...
...
@@ -631,7 +631,7 @@ bad:
BIO_printf
(
bio_s_out
,
"Using default temp DH parameters
\n
"
);
dh
=
get_dh512
();
}
BIO_flush
(
bio_s_out
);
(
void
)
BIO_flush
(
bio_s_out
);
SSL_CTX_set_tmp_dh
(
ctx
,
dh
);
DH_free
(
dh
);
...
...
@@ -1403,13 +1403,13 @@ static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int is_export, int keylength)
if
(
!
s_quiet
)
{
BIO_printf
(
bio_err
,
"Generating temp (%d bit) RSA key..."
,
keylength
);
BIO_flush
(
bio_err
);
(
void
)
BIO_flush
(
bio_err
);
}
rsa_tmp
=
RSA_generate_key
(
keylength
,
RSA_F4
,
NULL
,
NULL
);
if
(
!
s_quiet
)
{
BIO_printf
(
bio_err
,
"
\n
"
);
BIO_flush
(
bio_err
);
(
void
)
BIO_flush
(
bio_err
);
}
}
return
(
rsa_tmp
);
...
...
apps/s_socket.c
浏览文件 @
d58d092b
...
...
@@ -494,7 +494,7 @@ int host_ip(char *str, unsigned char ip[4])
unsigned
int
in
[
4
];
int
i
;
if
(
sscanf
(
str
,
"%
d.%d.%d.%d
"
,
&
(
in
[
0
]),
&
(
in
[
1
]),
&
(
in
[
2
]),
&
(
in
[
3
]))
==
4
)
if
(
sscanf
(
str
,
"%
u.%u.%u.%u
"
,
&
(
in
[
0
]),
&
(
in
[
1
]),
&
(
in
[
2
]),
&
(
in
[
3
]))
==
4
)
{
for
(
i
=
0
;
i
<
4
;
i
++
)
if
(
in
[
i
]
>
255
)
...
...
apps/speed.c
浏览文件 @
d58d092b
...
...
@@ -1130,7 +1130,7 @@ int MAIN(int argc, char **argv)
printf
(
"%18ssign verify sign/s verify/s
\n
"
,
" "
);
j
=
0
;
}
fprintf
(
stdout
,
"rsa %4
d
bits %8.4fs %8.4fs %8.1f %8.1f"
,
fprintf
(
stdout
,
"rsa %4
u
bits %8.4fs %8.4fs %8.1f %8.1f"
,
rsa_bits
[
k
],
rsa_results
[
k
][
0
],
rsa_results
[
k
][
1
],
1
.
0
/
rsa_results
[
k
][
0
],
1
.
0
/
rsa_results
[
k
][
1
]);
fprintf
(
stdout
,
"
\n
"
);
...
...
@@ -1145,7 +1145,7 @@ int MAIN(int argc, char **argv)
printf
(
"%18ssign verify sign/s verify/s
\n
"
,
" "
);
j
=
0
;
}
fprintf
(
stdout
,
"dsa %4
d
bits %8.4fs %8.4fs %8.1f %8.1f"
,
fprintf
(
stdout
,
"dsa %4
u
bits %8.4fs %8.4fs %8.1f %8.1f"
,
dsa_bits
[
k
],
dsa_results
[
k
][
0
],
dsa_results
[
k
][
1
],
1
.
0
/
dsa_results
[
k
][
0
],
1
.
0
/
dsa_results
[
k
][
1
]);
fprintf
(
stdout
,
"
\n
"
);
...
...
@@ -1172,11 +1172,11 @@ static void print_message(char *s, long num, int length)
{
#ifdef SIGALRM
BIO_printf
(
bio_err
,
"Doing %s for %ds on %d size blocks: "
,
s
,
SECONDS
,
length
);
BIO_flush
(
bio_err
);
(
void
)
BIO_flush
(
bio_err
);
alarm
(
SECONDS
);
#else
BIO_printf
(
bio_err
,
"Doing %s %ld times on %d size blocks: "
,
s
,
num
,
length
);
BIO_flush
(
bio_err
);
(
void
)
BIO_flush
(
bio_err
);
#endif
#ifdef LINT
num
=
num
;
...
...
@@ -1188,11 +1188,11 @@ static void pkey_print_message(char *str, char *str2, long num, int bits,
{
#ifdef SIGALRM
BIO_printf
(
bio_err
,
"Doing %d bit %s %s's for %ds: "
,
bits
,
str
,
str2
,
tm
);
BIO_flush
(
bio_err
);
(
void
)
BIO_flush
(
bio_err
);
alarm
(
RSA_SECONDS
);
#else
BIO_printf
(
bio_err
,
"Doing %ld %d bit %s %s's: "
,
num
,
bits
,
str
,
str2
);
BIO_flush
(
bio_err
);
(
void
)
BIO_flush
(
bio_err
);
#endif
#ifdef LINT
num
=
num
;
...
...
crypto/asn1/a_object.c
浏览文件 @
d58d092b
...
...
@@ -206,7 +206,7 @@ int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a)
if
(
i
>
2
)
i
=
2
;
l
-=
(
long
)(
i
*
40
);
sprintf
(
tbuf
,
"%d.%l
d
"
,
i
,
l
);
sprintf
(
tbuf
,
"%d.%l
u
"
,
i
,
l
);
i
=
strlen
(
tbuf
);
strncpy
(
buf
,
tbuf
,
buf_len
);
buf_len
-=
i
;
...
...
@@ -219,7 +219,7 @@ int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a)
l
|=
p
[
idx
]
&
0x7f
;
if
(
!
(
p
[
idx
]
&
0x80
))
{
sprintf
(
tbuf
,
".%l
d
"
,
l
);
sprintf
(
tbuf
,
".%l
u
"
,
l
);
i
=
strlen
(
tbuf
);
if
(
buf_len
>
0
)
strncpy
(
buf
,
tbuf
,
buf_len
);
...
...
crypto/bf/bftest.c
浏览文件 @
d58d092b
...
...
@@ -308,7 +308,7 @@ static int print_test_data(void)
printf
(
"c="
);
for
(
j
=
0
;
j
<
8
;
j
++
)
printf
(
"%02X"
,
key_out
[
i
][
j
]);
printf
(
" k[%2
d
]="
,
i
+
1
);
printf
(
" k[%2
u
]="
,
i
+
1
);
for
(
j
=
0
;
j
<
i
+
1
;
j
++
)
printf
(
"%02X"
,
key_test
[
j
]);
printf
(
"
\n
"
);
...
...
crypto/bio/bss_bio.c
浏览文件 @
d58d092b
...
...
@@ -9,6 +9,7 @@
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <openssl/bio.h>
#include <openssl/err.h>
...
...
crypto/bio/bss_conn.c
浏览文件 @
d58d092b
...
...
@@ -570,7 +570,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, char *ptr)
if
(
data
->
param_hostname
)
BIO_set_conn_hostname
(
dbio
,
data
->
param_hostname
);
BIO_set_nbio
(
dbio
,
data
->
nbio
);
BIO_set_info_callback
(
dbio
,
data
->
info_callback
);
(
void
)
BIO_set_info_callback
(
dbio
,
data
->
info_callback
);
break
;
case
BIO_CTRL_SET_CALLBACK
:
data
->
info_callback
=
(
int
(
*
)())
ptr
;
...
...
crypto/mem.c
浏览文件 @
d58d092b
...
...
@@ -308,8 +308,8 @@ static void print_leak(MEM *m, MEM_LEAK *l)
if
(
m
->
addr
==
(
char
*
)
l
->
bio
)
return
;
sprintf
(
buf
,
"%5l
d
file=%s, line=%d, number=%d, address=%08lX
\n
"
,
m
->
order
,
m
->
file
,
m
->
line
,
m
->
num
,(
long
)
m
->
addr
);
sprintf
(
buf
,
"%5l
u
file=%s, line=%d, number=%d, address=%08lX
\n
"
,
m
->
order
,
m
->
file
,
m
->
line
,
m
->
num
,(
unsigned
long
)
m
->
addr
);
BIO_puts
(
l
->
bio
,
buf
);
l
->
chunks
++
;
l
->
bytes
+=
m
->
num
;
...
...
crypto/rand/randtest.c
浏览文件 @
d58d092b
...
...
@@ -117,7 +117,7 @@ int main()
/* test 1 */
if
(
!
((
9654
<
n1
)
&&
(
n1
<
10346
)))
{
printf
(
"test 1 failed, X=%l
d
\n
"
,
n1
);
printf
(
"test 1 failed, X=%l
u
\n
"
,
n1
);
err
++
;
}
printf
(
"test 1 done
\n
"
);
...
...
@@ -150,37 +150,37 @@ int main()
{
if
(
!
((
2267
<
runs
[
i
][
0
])
&&
(
runs
[
i
][
0
]
<
2733
)))
{
printf
(
"test 3 failed, bit=%d run=%d num=%l
d
\n
"
,
printf
(
"test 3 failed, bit=%d run=%d num=%l
u
\n
"
,
i
,
1
,
runs
[
i
][
0
]);
err
++
;
}
if
(
!
((
1079
<
runs
[
i
][
1
])
&&
(
runs
[
i
][
1
]
<
1421
)))
{
printf
(
"test 3 failed, bit=%d run=%d num=%l
d
\n
"
,
printf
(
"test 3 failed, bit=%d run=%d num=%l
u
\n
"
,
i
,
2
,
runs
[
i
][
1
]);
err
++
;
}
if
(
!
((
502
<
runs
[
i
][
2
])
&&
(
runs
[
i
][
2
]
<
748
)))
{
printf
(
"test 3 failed, bit=%d run=%d num=%l
d
\n
"
,
printf
(
"test 3 failed, bit=%d run=%d num=%l
u
\n
"
,
i
,
3
,
runs
[
i
][
2
]);
err
++
;
}
if
(
!
((
223
<
runs
[
i
][
3
])
&&
(
runs
[
i
][
3
]
<
402
)))
{
printf
(
"test 3 failed, bit=%d run=%d num=%l
d
\n
"
,
printf
(
"test 3 failed, bit=%d run=%d num=%l
u
\n
"
,
i
,
4
,
runs
[
i
][
3
]);
err
++
;
}
if
(
!
((
90
<
runs
[
i
][
4
])
&&
(
runs
[
i
][
4
]
<
223
)))
{
printf
(
"test 3 failed, bit=%d run=%d num=%l
d
\n
"
,
printf
(
"test 3 failed, bit=%d run=%d num=%l
u
\n
"
,
i
,
5
,
runs
[
i
][
4
]);
err
++
;
}
if
(
!
((
90
<
runs
[
i
][
5
])
&&
(
runs
[
i
][
5
]
<
223
)))
{
printf
(
"test 3 failed, bit=%d run=%d num=%l
d
\n
"
,
printf
(
"test 3 failed, bit=%d run=%d num=%l
u
\n
"
,
i
,
6
,
runs
[
i
][
5
]);
err
++
;
}
...
...
@@ -190,13 +190,13 @@ int main()
/* test 4 */
if
(
runs
[
0
][
33
]
!=
0
)
{
printf
(
"test 4 failed, bit=%d run=%d num=%l
d
\n
"
,
printf
(
"test 4 failed, bit=%d run=%d num=%l
u
\n
"
,
0
,
34
,
runs
[
0
][
33
]);
err
++
;
}
if
(
runs
[
1
][
33
]
!=
0
)
{
printf
(
"test 4 failed, bit=%d run=%d num=%l
d
\n
"
,
printf
(
"test 4 failed, bit=%d run=%d num=%l
u
\n
"
,
1
,
34
,
runs
[
1
][
33
]);
err
++
;
}
...
...
ssl/s23_clnt.c
浏览文件 @
d58d092b
...
...
@@ -186,7 +186,7 @@ int ssl23_connect(SSL *s)
/* break; */
}
if
(
s
->
debug
)
BIO_flush
(
s
->
wbio
);
if
(
s
->
debug
)
{
(
void
)
BIO_flush
(
s
->
wbio
);
}
if
((
cb
!=
NULL
)
&&
(
s
->
state
!=
state
))
{
...
...
ssl/s3_pkt.c
浏览文件 @
d58d092b
...
...
@@ -1016,7 +1016,7 @@ int ssl3_dispatch_alert(SSL *s)
* does not get sent due to non-blocking IO, we will
* not worry too much. */
if
(
s
->
s3
->
send_alert
[
0
]
==
SSL3_AL_FATAL
)
BIO_flush
(
s
->
wbio
);
(
void
)
BIO_flush
(
s
->
wbio
);
if
(
s
->
info_callback
!=
NULL
)
cb
=
s
->
info_callback
;
...
...
ssl/ssl_lib.c
浏览文件 @
d58d092b
...
...
@@ -1695,7 +1695,7 @@ int ssl_init_wbio_buffer(SSL *s,int push)
if
(
s
->
bbio
==
s
->
wbio
)
s
->
wbio
=
BIO_pop
(
s
->
wbio
);
}
BIO_reset
(
bbio
);
(
void
)
BIO_reset
(
bbio
);
/* if (!BIO_set_write_buffer_size(bbio,16*1024)) */
if
(
!
BIO_set_read_buffer_size
(
bbio
,
1
))
{
...
...
ssl/ssltest.c
浏览文件 @
d58d092b
...
...
@@ -97,9 +97,12 @@ BIO *bio_stdout=NULL;
static
char
*
cipher
=
NULL
;
int
verbose
=
0
;
int
debug
=
0
;
#if 0
/* Not used yet. */
#ifdef FIONBIO
static int s_nbio=0;
#endif
#endif
int
doit
(
SSL
*
s_ssl
,
SSL
*
c_ssl
,
long
bytes
);
...
...
@@ -731,10 +734,10 @@ static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int is_export, int keylength)
if
(
rsa_tmp
==
NULL
)
{
BIO_printf
(
bio_err
,
"Generating temp (%d bit) RSA key..."
,
keylength
);
BIO_flush
(
bio_err
);
(
void
)
BIO_flush
(
bio_err
);
rsa_tmp
=
RSA_generate_key
(
keylength
,
RSA_F4
,
NULL
,
NULL
);
BIO_printf
(
bio_err
,
"
\n
"
);
BIO_flush
(
bio_err
);
(
void
)
BIO_flush
(
bio_err
);
}
return
(
rsa_tmp
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录