Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
569d0646
O
openssl
项目概览
btwise
/
openssl
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
569d0646
编写于
5月 17, 2016
作者:
M
Matt Caswell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add some error messages for malloc fails
Reviewed-by:
N
Richard Levitte
<
levitte@openssl.org
>
上级
6ef020c9
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
47 addition
and
11 deletion
+47
-11
crypto/dh/dh_err.c
crypto/dh/dh_err.c
+3
-0
crypto/dh/dh_meth.c
crypto/dh/dh_meth.c
+6
-1
crypto/dsa/dsa_err.c
crypto/dsa/dsa_err.c
+3
-0
crypto/dsa/dsa_meth.c
crypto/dsa/dsa_meth.c
+6
-1
crypto/rsa/rsa_err.c
crypto/rsa/rsa_err.c
+7
-4
crypto/rsa/rsa_meth.c
crypto/rsa/rsa_meth.c
+6
-1
crypto/ui/ui_err.c
crypto/ui/ui_err.c
+1
-0
crypto/ui/ui_lib.c
crypto/ui/ui_lib.c
+1
-0
include/openssl/dh.h
include/openssl/dh.h
+3
-0
include/openssl/dsa.h
include/openssl/dsa.h
+3
-0
include/openssl/rsa.h
include/openssl/rsa.h
+7
-4
include/openssl/ui.h
include/openssl/ui.h
+1
-0
未找到文件。
crypto/dh/dh_err.c
浏览文件 @
569d0646
...
...
@@ -30,6 +30,9 @@ static ERR_STRING_DATA DH_str_functs[] = {
{
ERR_FUNC
(
DH_F_DH_CMS_DECRYPT
),
"dh_cms_decrypt"
},
{
ERR_FUNC
(
DH_F_DH_CMS_SET_PEERKEY
),
"dh_cms_set_peerkey"
},
{
ERR_FUNC
(
DH_F_DH_CMS_SET_SHARED_INFO
),
"dh_cms_set_shared_info"
},
{
ERR_FUNC
(
DH_F_DH_METH_DUP
),
"DH_meth_dup"
},
{
ERR_FUNC
(
DH_F_DH_METH_NEW
),
"DH_meth_new"
},
{
ERR_FUNC
(
DH_F_DH_METH_SET1_NAME
),
"DH_meth_set1_name"
},
{
ERR_FUNC
(
DH_F_DH_NEW_METHOD
),
"DH_new_method"
},
{
ERR_FUNC
(
DH_F_DH_PARAM_DECODE
),
"dh_param_decode"
},
{
ERR_FUNC
(
DH_F_DH_PRIV_DECODE
),
"dh_priv_decode"
},
...
...
crypto/dh/dh_meth.c
浏览文件 @
569d0646
...
...
@@ -9,6 +9,7 @@
#include "dh_locl.h"
#include <string.h>
#include <openssl/err.h>
DH_METHOD
*
DH_meth_new
(
const
char
*
name
,
int
flags
)
{
...
...
@@ -18,6 +19,7 @@ DH_METHOD *DH_meth_new(const char *name, int flags)
dhm
->
name
=
OPENSSL_strdup
(
name
);
if
(
dhm
->
name
==
NULL
)
{
OPENSSL_free
(
dhm
);
DHerr
(
DH_F_DH_METH_NEW
,
ERR_R_MALLOC_FAILURE
);
return
NULL
;
}
dhm
->
flags
=
flags
;
...
...
@@ -46,6 +48,7 @@ DH_METHOD *DH_meth_dup(const DH_METHOD *dhm)
ret
->
name
=
OPENSSL_strdup
(
dhm
->
name
);
if
(
ret
->
name
==
NULL
)
{
OPENSSL_free
(
ret
);
DHerr
(
DH_F_DH_METH_DUP
,
ERR_R_MALLOC_FAILURE
);
return
NULL
;
}
}
...
...
@@ -63,8 +66,10 @@ int DH_meth_set1_name(DH_METHOD *dhm, const char *name)
char
*
tmpname
;
tmpname
=
OPENSSL_strdup
(
name
);
if
(
tmpname
==
NULL
)
if
(
tmpname
==
NULL
)
{
DHerr
(
DH_F_DH_METH_SET1_NAME
,
ERR_R_MALLOC_FAILURE
);
return
0
;
}
OPENSSL_free
(
dhm
->
name
);
dhm
->
name
=
tmpname
;
...
...
crypto/dsa/dsa_err.c
浏览文件 @
569d0646
...
...
@@ -33,6 +33,9 @@ static ERR_STRING_DATA DSA_str_functs[] = {
{
ERR_FUNC
(
DSA_F_DSA_BUILTIN_PARAMGEN2
),
"dsa_builtin_paramgen2"
},
{
ERR_FUNC
(
DSA_F_DSA_DO_SIGN
),
"DSA_do_sign"
},
{
ERR_FUNC
(
DSA_F_DSA_DO_VERIFY
),
"DSA_do_verify"
},
{
ERR_FUNC
(
DSA_F_DSA_METH_DUP
),
"DSA_meth_dup"
},
{
ERR_FUNC
(
DSA_F_DSA_METH_NEW
),
"DSA_meth_new"
},
{
ERR_FUNC
(
DSA_F_DSA_METH_SET1_NAME
),
"DSA_meth_set1_name"
},
{
ERR_FUNC
(
DSA_F_DSA_NEW_METHOD
),
"DSA_new_method"
},
{
ERR_FUNC
(
DSA_F_DSA_PARAM_DECODE
),
"dsa_param_decode"
},
{
ERR_FUNC
(
DSA_F_DSA_PRINT_FP
),
"DSA_print_fp"
},
...
...
crypto/dsa/dsa_meth.c
浏览文件 @
569d0646
...
...
@@ -17,6 +17,7 @@
#include "dsa_locl.h"
#include <string.h>
#include <openssl/err.h>
DSA_METHOD
*
DSA_meth_new
(
const
char
*
name
,
int
flags
)
{
...
...
@@ -26,6 +27,7 @@ DSA_METHOD *DSA_meth_new(const char *name, int flags)
dsam
->
name
=
OPENSSL_strdup
(
name
);
if
(
dsam
->
name
==
NULL
)
{
OPENSSL_free
(
dsam
);
DSAerr
(
DSA_F_DSA_METH_NEW
,
ERR_R_MALLOC_FAILURE
);
return
NULL
;
}
dsam
->
flags
=
flags
;
...
...
@@ -54,6 +56,7 @@ DSA_METHOD *DSA_meth_dup(const DSA_METHOD *dsam)
ret
->
name
=
OPENSSL_strdup
(
dsam
->
name
);
if
(
ret
->
name
==
NULL
)
{
OPENSSL_free
(
ret
);
DSAerr
(
DSA_F_DSA_METH_DUP
,
ERR_R_MALLOC_FAILURE
);
return
NULL
;
}
}
...
...
@@ -71,8 +74,10 @@ int DSA_meth_set1_name(DSA_METHOD *dsam, const char *name)
char
*
tmpname
;
tmpname
=
OPENSSL_strdup
(
name
);
if
(
tmpname
==
NULL
)
if
(
tmpname
==
NULL
)
{
DSAerr
(
DSA_F_DSA_METH_SET1_NAME
,
ERR_R_MALLOC_FAILURE
);
return
0
;
}
OPENSSL_free
(
dsam
->
name
);
dsam
->
name
=
tmpname
;
...
...
crypto/rsa/rsa_err.c
浏览文件 @
569d0646
...
...
@@ -41,13 +41,12 @@ static ERR_STRING_DATA RSA_str_functs[] = {
{
ERR_FUNC
(
RSA_F_RSA_CHECK_KEY
),
"RSA_check_key"
},
{
ERR_FUNC
(
RSA_F_RSA_CHECK_KEY_EX
),
"RSA_check_key_ex"
},
{
ERR_FUNC
(
RSA_F_RSA_CMS_DECRYPT
),
"rsa_cms_decrypt"
},
{
ERR_FUNC
(
RSA_F_RSA_OSSL_PRIVATE_DECRYPT
),
"rsa_ossl_private_decrypt"
},
{
ERR_FUNC
(
RSA_F_RSA_OSSL_PRIVATE_ENCRYPT
),
"rsa_ossl_private_encrypt"
},
{
ERR_FUNC
(
RSA_F_RSA_OSSL_PUBLIC_DECRYPT
),
"rsa_ossl_public_decrypt"
},
{
ERR_FUNC
(
RSA_F_RSA_OSSL_PUBLIC_ENCRYPT
),
"rsa_ossl_public_encrypt"
},
{
ERR_FUNC
(
RSA_F_RSA_GENERATE_KEY
),
"RSA_generate_key"
},
{
ERR_FUNC
(
RSA_F_RSA_ITEM_VERIFY
),
"rsa_item_verify"
},
{
ERR_FUNC
(
RSA_F_RSA_MEMORY_LOCK
),
"RSA_memory_lock"
},
{
ERR_FUNC
(
RSA_F_RSA_METH_DUP
),
"RSA_meth_dup"
},
{
ERR_FUNC
(
RSA_F_RSA_METH_NEW
),
"RSA_meth_new"
},
{
ERR_FUNC
(
RSA_F_RSA_METH_SET1_NAME
),
"RSA_meth_set1_name"
},
{
ERR_FUNC
(
RSA_F_RSA_MGF1_TO_MD
),
"rsa_mgf1_to_md"
},
{
ERR_FUNC
(
RSA_F_RSA_NEW_METHOD
),
"RSA_new_method"
},
{
ERR_FUNC
(
RSA_F_RSA_NULL
),
"RSA_NULL"
},
...
...
@@ -57,6 +56,10 @@ static ERR_STRING_DATA RSA_str_functs[] = {
{
ERR_FUNC
(
RSA_F_RSA_NULL_PUBLIC_DECRYPT
),
"RSA_null_public_decrypt"
},
{
ERR_FUNC
(
RSA_F_RSA_NULL_PUBLIC_ENCRYPT
),
"RSA_null_public_encrypt"
},
{
ERR_FUNC
(
RSA_F_RSA_OAEP_TO_CTX
),
"RSA_OAEP_TO_CTX"
},
{
ERR_FUNC
(
RSA_F_RSA_OSSL_PRIVATE_DECRYPT
),
"rsa_ossl_private_decrypt"
},
{
ERR_FUNC
(
RSA_F_RSA_OSSL_PRIVATE_ENCRYPT
),
"rsa_ossl_private_encrypt"
},
{
ERR_FUNC
(
RSA_F_RSA_OSSL_PUBLIC_DECRYPT
),
"rsa_ossl_public_decrypt"
},
{
ERR_FUNC
(
RSA_F_RSA_OSSL_PUBLIC_ENCRYPT
),
"rsa_ossl_public_encrypt"
},
{
ERR_FUNC
(
RSA_F_RSA_PADDING_ADD_NONE
),
"RSA_padding_add_none"
},
{
ERR_FUNC
(
RSA_F_RSA_PADDING_ADD_PKCS1_OAEP
),
"RSA_padding_add_PKCS1_OAEP"
},
{
ERR_FUNC
(
RSA_F_RSA_PADDING_ADD_PKCS1_OAEP_MGF1
),
...
...
crypto/rsa/rsa_meth.c
浏览文件 @
569d0646
...
...
@@ -9,6 +9,7 @@
#include <string.h>
#include "rsa_locl.h"
#include <openssl/err.h>
RSA_METHOD
*
RSA_meth_new
(
const
char
*
name
,
int
flags
)
{
...
...
@@ -18,6 +19,7 @@ RSA_METHOD *RSA_meth_new(const char *name, int flags)
meth
->
name
=
OPENSSL_strdup
(
name
);
if
(
meth
->
name
==
NULL
)
{
OPENSSL_free
(
meth
);
RSAerr
(
RSA_F_RSA_METH_NEW
,
ERR_R_MALLOC_FAILURE
);
return
NULL
;
}
meth
->
flags
=
flags
;
...
...
@@ -46,6 +48,7 @@ RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth)
ret
->
name
=
OPENSSL_strdup
(
meth
->
name
);
if
(
ret
->
name
==
NULL
)
{
OPENSSL_free
(
ret
);
RSAerr
(
RSA_F_RSA_METH_DUP
,
ERR_R_MALLOC_FAILURE
);
return
NULL
;
}
}
...
...
@@ -63,8 +66,10 @@ int RSA_meth_set1_name(RSA_METHOD *meth, const char *name)
char
*
tmpname
;
tmpname
=
OPENSSL_strdup
(
name
);
if
(
tmpname
==
NULL
)
if
(
tmpname
==
NULL
)
{
RSAerr
(
RSA_F_RSA_METH_SET1_NAME
,
ERR_R_MALLOC_FAILURE
);
return
0
;
}
OPENSSL_free
(
meth
->
name
);
meth
->
name
=
tmpname
;
...
...
crypto/ui/ui_err.c
浏览文件 @
569d0646
...
...
@@ -21,6 +21,7 @@ static ERR_STRING_DATA UI_str_functs[] = {
{
ERR_FUNC
(
UI_F_GENERAL_ALLOCATE_BOOLEAN
),
"general_allocate_boolean"
},
{
ERR_FUNC
(
UI_F_GENERAL_ALLOCATE_PROMPT
),
"general_allocate_prompt"
},
{
ERR_FUNC
(
UI_F_GENERAL_ALLOCATE_STRING
),
"GENERAL_ALLOCATE_STRING"
},
{
ERR_FUNC
(
UI_F_UI_CREATE_METHOD
),
"UI_create_method"
},
{
ERR_FUNC
(
UI_F_UI_CTRL
),
"UI_ctrl"
},
{
ERR_FUNC
(
UI_F_UI_DUP_ERROR_STRING
),
"UI_dup_error_string"
},
{
ERR_FUNC
(
UI_F_UI_DUP_INFO_STRING
),
"UI_dup_info_string"
},
...
...
crypto/ui/ui_lib.c
浏览文件 @
569d0646
...
...
@@ -540,6 +540,7 @@ UI_METHOD *UI_create_method(char *name)
ui_method
->
name
=
OPENSSL_strdup
(
name
);
if
(
ui_method
->
name
==
NULL
)
{
OPENSSL_free
(
ui_method
);
UIerr
(
UI_F_UI_CREATE_METHOD
,
ERR_R_MALLOC_FAILURE
);
return
NULL
;
}
}
...
...
include/openssl/dh.h
浏览文件 @
569d0646
...
...
@@ -298,6 +298,9 @@ void ERR_load_DH_strings(void);
# define DH_F_DH_CMS_DECRYPT 114
# define DH_F_DH_CMS_SET_PEERKEY 115
# define DH_F_DH_CMS_SET_SHARED_INFO 116
# define DH_F_DH_METH_DUP 117
# define DH_F_DH_METH_NEW 118
# define DH_F_DH_METH_SET1_NAME 119
# define DH_F_DH_NEW_METHOD 105
# define DH_F_DH_PARAM_DECODE 107
# define DH_F_DH_PRIV_DECODE 110
...
...
include/openssl/dsa.h
浏览文件 @
569d0646
...
...
@@ -242,6 +242,9 @@ void ERR_load_DSA_strings(void);
# define DSA_F_DSA_BUILTIN_PARAMGEN2 126
# define DSA_F_DSA_DO_SIGN 112
# define DSA_F_DSA_DO_VERIFY 113
# define DSA_F_DSA_METH_DUP 127
# define DSA_F_DSA_METH_NEW 128
# define DSA_F_DSA_METH_SET1_NAME 129
# define DSA_F_DSA_NEW_METHOD 103
# define DSA_F_DSA_PARAM_DECODE 119
# define DSA_F_DSA_PRINT_FP 105
...
...
include/openssl/rsa.h
浏览文件 @
569d0646
...
...
@@ -484,13 +484,12 @@ void ERR_load_RSA_strings(void);
# define RSA_F_RSA_CHECK_KEY 123
# define RSA_F_RSA_CHECK_KEY_EX 160
# define RSA_F_RSA_CMS_DECRYPT 159
# define RSA_F_RSA_OSSL_PRIVATE_DECRYPT 101
# define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT 102
# define RSA_F_RSA_OSSL_PUBLIC_DECRYPT 103
# define RSA_F_RSA_OSSL_PUBLIC_ENCRYPT 104
# define RSA_F_RSA_GENERATE_KEY 105
# define RSA_F_RSA_ITEM_VERIFY 148
# define RSA_F_RSA_MEMORY_LOCK 130
# define RSA_F_RSA_METH_DUP 161
# define RSA_F_RSA_METH_NEW 162
# define RSA_F_RSA_METH_SET1_NAME 163
# define RSA_F_RSA_MGF1_TO_MD 157
# define RSA_F_RSA_NEW_METHOD 106
# define RSA_F_RSA_NULL 124
...
...
@@ -500,6 +499,10 @@ void ERR_load_RSA_strings(void);
# define RSA_F_RSA_NULL_PUBLIC_DECRYPT 134
# define RSA_F_RSA_NULL_PUBLIC_ENCRYPT 135
# define RSA_F_RSA_OAEP_TO_CTX 158
# define RSA_F_RSA_OSSL_PRIVATE_DECRYPT 101
# define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT 102
# define RSA_F_RSA_OSSL_PUBLIC_DECRYPT 103
# define RSA_F_RSA_OSSL_PUBLIC_ENCRYPT 104
# define RSA_F_RSA_PADDING_ADD_NONE 107
# define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP 121
# define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP_MGF1 154
...
...
include/openssl/ui.h
浏览文件 @
569d0646
...
...
@@ -341,6 +341,7 @@ void ERR_load_UI_strings(void);
# define UI_F_GENERAL_ALLOCATE_BOOLEAN 108
# define UI_F_GENERAL_ALLOCATE_PROMPT 109
# define UI_F_GENERAL_ALLOCATE_STRING 100
# define UI_F_UI_CREATE_METHOD 112
# define UI_F_UI_CTRL 111
# define UI_F_UI_DUP_ERROR_STRING 101
# define UI_F_UI_DUP_INFO_STRING 102
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录