Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
e6629837
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
10
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e6629837
编写于
24年前
作者:
R
Richard Levitte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added BIO_vprintf() and BIO_vsnprintf(). The former because I've
found myself needing it a number of times, the latter for completeness.
上级
97a377b9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
30 addition
and
5 deletion
+30
-5
CHANGES
CHANGES
+3
-0
crypto/bio/b_print.c
crypto/bio/b_print.c
+24
-5
crypto/bio/bio.h
crypto/bio/bio.h
+3
-0
未找到文件。
CHANGES
浏览文件 @
e6629837
...
...
@@ -4,6 +4,9 @@
Changes between 0.9.5a and 0.9.6 [xx XXX 2000]
*) Added BIO_vprintf() and BIO_vsnprintf().
[Richard Levitte]
*) Added more prefixes to parse for in the the strings written
through a logging bio, to cover all the levels that are available
through syslog. The prefixes are now:
...
...
This diff is collapsed.
Click to expand it.
crypto/bio/b_print.c
浏览文件 @
e6629837
...
...
@@ -61,7 +61,6 @@
*/
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
...
...
@@ -812,6 +811,18 @@ int BIO_printf (BIO *bio, const char *format, ...)
{
va_list
args
;
int
ret
;
va_start
(
args
,
format
);
ret
=
BIO_vprintf
(
bio
,
format
,
args
);
va_end
(
args
);
return
(
ret
);
}
int
BIO_vprintf
(
BIO
*
bio
,
const
char
*
format
,
va_list
args
)
{
int
ret
;
size_t
retlen
;
#ifdef USE_ALLOCATING_PRINT
char
*
hugebuf
;
...
...
@@ -819,8 +830,6 @@ int BIO_printf (BIO *bio, const char *format, ...)
MS_STATIC
char
hugebuf
[
1024
*
2
];
/* 10k in one chunk is the limit */
#endif
va_start
(
args
,
format
);
#ifndef USE_ALLOCATING_PRINT
hugebuf
[
0
]
=
'\0'
;
dopr
(
hugebuf
,
sizeof
(
hugebuf
),
&
retlen
,
format
,
args
);
...
...
@@ -838,7 +847,6 @@ int BIO_printf (BIO *bio, const char *format, ...)
}
CRYPTO_pop_info
();
#endif
va_end
(
args
);
return
(
ret
);
}
...
...
@@ -849,10 +857,21 @@ int BIO_printf (BIO *bio, const char *format, ...)
int
BIO_snprintf
(
char
*
buf
,
size_t
n
,
const
char
*
format
,
...)
{
va_list
args
;
int
ret
;
va_start
(
args
,
format
);
ret
=
BIO_vsnprintf
(
buf
,
n
,
format
,
args
);
va_end
(
args
);
return
(
ret
);
}
int
BIO_vsnprintf
(
char
*
buf
,
size_t
n
,
const
char
*
format
,
va_list
args
)
{
size_t
retlen
;
int
truncated
;
va_start
(
args
,
format
);
_dopr
(
dopr_outch
,
dopr_isbig
,
dopr_copy
,
&
buf
,
&
n
,
&
retlen
,
&
truncated
,
format
,
args
);
if
(
truncated
)
...
...
This diff is collapsed.
Click to expand it.
crypto/bio/bio.h
浏览文件 @
e6629837
...
...
@@ -62,6 +62,7 @@
#ifndef NO_FP_API
# include <stdio.h>
#endif
#include <stdarg.h>
#include <openssl/crypto.h>
...
...
@@ -600,7 +601,9 @@ void BIO_copy_next_retry(BIO *b);
long
BIO_ghbn_ctrl
(
int
cmd
,
int
iarg
,
char
*
parg
);
int
BIO_printf
(
BIO
*
bio
,
const
char
*
format
,
...);
int
BIO_vprintf
(
BIO
*
bio
,
const
char
*
format
,
va_list
args
);
int
BIO_snprintf
(
char
*
buf
,
size_t
n
,
const
char
*
format
,
...);
int
BIO_vsnprintf
(
char
*
buf
,
size_t
n
,
const
char
*
format
,
va_list
args
);
/* BEGIN ERROR CODES */
/* The following lines are auto generated by the script mkerr.pl. Any changes
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部