Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
a0be4fd1
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a0be4fd1
编写于
12月 11, 2015
作者:
R
Richard Levitte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make EVP_ENCODE_CTX opaque
Reviewed-by:
N
Rich Salz
<
rsalz@openssl.org
>
上级
1ee3b17f
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
36 addition
and
16 deletion
+36
-16
crypto/evp/encode.c
crypto/evp/encode.c
+15
-0
crypto/evp/evp_locl.h
crypto/evp/evp_locl.h
+16
-0
include/openssl/evp.h
include/openssl/evp.h
+3
-16
include/openssl/ossl_typ.h
include/openssl/ossl_typ.h
+2
-0
未找到文件。
crypto/evp/encode.c
浏览文件 @
a0be4fd1
...
...
@@ -59,6 +59,7 @@
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/evp.h>
#include "evp_locl.h"
static
unsigned
char
conv_ascii2bin
(
unsigned
char
a
);
#ifndef CHARSET_EBCDIC
...
...
@@ -140,6 +141,20 @@ static unsigned char conv_ascii2bin(unsigned char a)
}
#endif
EVP_ENCODE_CTX
*
EVP_ENCODE_CTX_new
(
void
)
{
return
(
EVP_ENCODE_CTX
*
)
OPENSSL_zalloc
(
sizeof
(
EVP_ENCODE_CTX
));
}
void
EVP_ENCODE_CTX_free
(
EVP_ENCODE_CTX
*
ctx
)
{
OPENSSL_free
(
ctx
);
}
int
EVP_ENCODE_CTX_num
(
EVP_ENCODE_CTX
*
ctx
)
{
return
ctx
->
num
;
}
void
EVP_EncodeInit
(
EVP_ENCODE_CTX
*
ctx
)
{
ctx
->
length
=
48
;
...
...
crypto/evp/evp_locl.h
浏览文件 @
a0be4fd1
...
...
@@ -279,3 +279,19 @@ int PKCS5_v2_PBKDF2_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass,
int
passlen
,
ASN1_TYPE
*
param
,
const
EVP_CIPHER
*
c
,
const
EVP_MD
*
md
,
int
en_de
);
struct
evp_Encode_Ctx_st
{
/* number saved in a partial encode/decode */
int
num
;
/*
* The length is either the output line length (in input bytes) or the
* shortest input line length that is ok. Once decoding begins, the
* length is adjusted up each time a longer line is decoded
*/
int
length
;
/* data to encode */
unsigned
char
enc_data
[
80
];
/* number read on current line */
int
line_num
;
int
expect_nl
;
};
include/openssl/evp.h
浏览文件 @
a0be4fd1
...
...
@@ -447,22 +447,6 @@ struct evp_cipher_ctx_st {
unsigned
char
final
[
EVP_MAX_BLOCK_LENGTH
];
/* possible final block */
}
/* EVP_CIPHER_CTX */
;
typedef
struct
evp_Encode_Ctx_st
{
/* number saved in a partial encode/decode */
int
num
;
/*
* The length is either the output line length (in input bytes) or the
* shortest input line length that is ok. Once decoding begins, the
* length is adjusted up each time a longer line is decoded
*/
int
length
;
/* data to encode */
unsigned
char
enc_data
[
80
];
/* number read on current line */
int
line_num
;
int
expect_nl
;
}
EVP_ENCODE_CTX
;
/* Password based encryption function */
typedef
int
(
EVP_PBE_KEYGEN
)
(
EVP_CIPHER_CTX
*
ctx
,
const
char
*
pass
,
int
passlen
,
ASN1_TYPE
*
param
,
...
...
@@ -701,6 +685,9 @@ __owur int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
EVP_PKEY
**
pubk
,
int
npubk
);
__owur
int
EVP_SealFinal
(
EVP_CIPHER_CTX
*
ctx
,
unsigned
char
*
out
,
int
*
outl
);
EVP_ENCODE_CTX
*
EVP_ENCODE_CTX_new
(
void
);
void
EVP_ENCODE_CTX_free
(
EVP_ENCODE_CTX
*
ctx
);
int
EVP_ENCODE_CTX_num
(
EVP_ENCODE_CTX
*
ctx
);
void
EVP_EncodeInit
(
EVP_ENCODE_CTX
*
ctx
);
void
EVP_EncodeUpdate
(
EVP_ENCODE_CTX
*
ctx
,
unsigned
char
*
out
,
int
*
outl
,
const
unsigned
char
*
in
,
int
inl
);
...
...
include/openssl/ossl_typ.h
浏览文件 @
a0be4fd1
...
...
@@ -137,6 +137,8 @@ typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
typedef
struct
evp_pkey_method_st
EVP_PKEY_METHOD
;
typedef
struct
evp_pkey_ctx_st
EVP_PKEY_CTX
;
typedef
struct
evp_Encode_Ctx_st
EVP_ENCODE_CTX
;
typedef
struct
hmac_ctx_st
HMAC_CTX
;
typedef
struct
dh_st
DH
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录