Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
5c95c2ac
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
9 个月 前同步成功
通知
8
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,体验更适合开发者的 AI 搜索 >>
提交
5c95c2ac
编写于
7月 17, 2006
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix various error codes to match functions.
上级
454dbbc5
变更
24
隐藏空白更改
内联
并排
Showing
24 changed file
with
47 addition
and
40 deletion
+47
-40
crypto/asn1/asn1.h
crypto/asn1/asn1.h
+1
-1
crypto/asn1/asn1_err.c
crypto/asn1/asn1_err.c
+1
-2
crypto/asn1/p5_pbev2.c
crypto/asn1/p5_pbev2.c
+3
-3
crypto/dh/dh.h
crypto/dh/dh.h
+1
-1
crypto/dh/dh_ameth.c
crypto/dh/dh_ameth.c
+1
-1
crypto/dh/dh_err.c
crypto/dh/dh_err.c
+1
-1
crypto/dsa/dsa.h
crypto/dsa/dsa.h
+2
-1
crypto/dsa/dsa_ameth.c
crypto/dsa/dsa_ameth.c
+2
-10
crypto/dsa/dsa_err.c
crypto/dsa/dsa_err.c
+2
-1
crypto/ec/ec.h
crypto/ec/ec.h
+2
-0
crypto/ec/ec_ameth.c
crypto/ec/ec_ameth.c
+2
-2
crypto/ec/ec_err.c
crypto/ec/ec_err.c
+2
-0
crypto/evp/evp.h
crypto/evp/evp.h
+1
-0
crypto/evp/evp_err.c
crypto/evp/evp_err.c
+1
-0
crypto/evp/evp_pbe.c
crypto/evp/evp_pbe.c
+1
-1
crypto/evp/pmeth_fn.c
crypto/evp/pmeth_fn.c
+1
-1
crypto/ocsp/ocsp.h
crypto/ocsp/ocsp.h
+1
-0
crypto/ocsp/ocsp_err.c
crypto/ocsp/ocsp_err.c
+1
-0
crypto/ocsp/ocsp_ht.c
crypto/ocsp/ocsp_ht.c
+4
-4
crypto/rsa/rsa.h
crypto/rsa/rsa.h
+4
-1
crypto/rsa/rsa_ameth.c
crypto/rsa/rsa_ameth.c
+2
-2
crypto/rsa/rsa_err.c
crypto/rsa/rsa_err.c
+3
-0
crypto/rsa/rsa_sign.c
crypto/rsa/rsa_sign.c
+7
-7
util/ck_errf.pl
util/ck_errf.pl
+1
-1
未找到文件。
crypto/asn1/asn1.h
浏览文件 @
5c95c2ac
...
...
@@ -1151,7 +1151,7 @@ void ERR_load_ASN1_strings(void);
#define ASN1_F_LONG_C2I 166
#define ASN1_F_OID_MODULE_INIT 174
#define ASN1_F_PARSE_TAGGING 182
#define ASN1_F_PKCS5_PBE2_SET
167
#define ASN1_F_PKCS5_PBE2_SET
_IV
167
#define ASN1_F_PKCS5_PBE_SET 202
#define ASN1_F_X509_CINF_NEW 168
#define ASN1_F_X509_CRL_ADD0_REVOKED 169
...
...
crypto/asn1/asn1_err.c
浏览文件 @
5c95c2ac
...
...
@@ -167,8 +167,7 @@ static ERR_STRING_DATA ASN1_str_functs[]=
{
ERR_FUNC
(
ASN1_F_LONG_C2I
),
"LONG_C2I"
},
{
ERR_FUNC
(
ASN1_F_OID_MODULE_INIT
),
"OID_MODULE_INIT"
},
{
ERR_FUNC
(
ASN1_F_PARSE_TAGGING
),
"PARSE_TAGGING"
},
{
ERR_FUNC
(
ASN1_F_PKCS5_PBE2_SET
),
"PKCS5_pbe2_set"
},
{
ERR_FUNC
(
ASN1_F_PKCS5_PBE_SET
),
"PKCS5_PBE_SET"
},
{
ERR_FUNC
(
ASN1_F_PKCS5_PBE2_SET_IV
),
"PKCS5_pbe2_set_iv"
},
{
ERR_FUNC
(
ASN1_F_X509_CINF_NEW
),
"X509_CINF_NEW"
},
{
ERR_FUNC
(
ASN1_F_X509_CRL_ADD0_REVOKED
),
"X509_CRL_ADD0_REVOKED"
},
{
ERR_FUNC
(
ASN1_F_X509_INFO_NEW
),
"X509_INFO_NEW"
},
...
...
crypto/asn1/p5_pbev2.c
浏览文件 @
5c95c2ac
...
...
@@ -101,7 +101,7 @@ X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
alg_nid
=
EVP_CIPHER_type
(
cipher
);
if
(
alg_nid
==
NID_undef
)
{
ASN1err
(
ASN1_F_PKCS5_PBE2_SET
,
ASN1err
(
ASN1_F_PKCS5_PBE2_SET
_IV
,
ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER
);
goto
err
;
}
...
...
@@ -129,7 +129,7 @@ X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
/* Dummy cipherinit to just setup the IV, and PRF */
EVP_CipherInit_ex
(
&
ctx
,
cipher
,
NULL
,
NULL
,
iv
,
0
);
if
(
EVP_CIPHER_param_to_asn1
(
&
ctx
,
scheme
->
parameter
)
<
0
)
{
ASN1err
(
ASN1_F_PKCS5_PBE2_SET
,
ASN1err
(
ASN1_F_PKCS5_PBE2_SET
_IV
,
ASN1_R_ERROR_SETTING_CIPHER_PARAMS
);
EVP_CIPHER_CTX_cleanup
(
&
ctx
);
goto
err
;
...
...
@@ -214,7 +214,7 @@ X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
return
ret
;
merr:
ASN1err
(
ASN1_F_PKCS5_PBE2_SET
,
ERR_R_MALLOC_FAILURE
);
ASN1err
(
ASN1_F_PKCS5_PBE2_SET
_IV
,
ERR_R_MALLOC_FAILURE
);
err:
PBE2PARAM_free
(
pbe2
);
...
...
crypto/dh/dh.h
浏览文件 @
5c95c2ac
...
...
@@ -223,7 +223,7 @@ void ERR_load_DH_strings(void);
/* Function codes. */
#define DH_F_COMPUTE_KEY 102
#define DH_F_D
HPARAMS
_PRINT 100
#define DH_F_D
O_DH
_PRINT 100
#define DH_F_DHPARAMS_PRINT_FP 101
#define DH_F_DH_BUILTIN_GENPARAMS 106
#define DH_F_DH_NEW_METHOD 105
...
...
crypto/dh/dh_ameth.c
浏览文件 @
5c95c2ac
...
...
@@ -381,7 +381,7 @@ static int do_dh_print(BIO *bp, const DH *x, int indent,
if
(
0
)
{
err:
DHerr
(
DH_F_D
HPARAMS
_PRINT
,
reason
);
DHerr
(
DH_F_D
O_DH
_PRINT
,
reason
);
}
if
(
m
!=
NULL
)
OPENSSL_free
(
m
);
return
(
ret
);
...
...
crypto/dh/dh_err.c
浏览文件 @
5c95c2ac
...
...
@@ -71,7 +71,6 @@
static
ERR_STRING_DATA
DH_str_functs
[]
=
{
{
ERR_FUNC
(
DH_F_COMPUTE_KEY
),
"COMPUTE_KEY"
},
{
ERR_FUNC
(
DH_F_DHPARAMS_PRINT
),
"DHparams_print"
},
{
ERR_FUNC
(
DH_F_DHPARAMS_PRINT_FP
),
"DHparams_print_fp"
},
{
ERR_FUNC
(
DH_F_DH_BUILTIN_GENPARAMS
),
"DH_BUILTIN_GENPARAMS"
},
{
ERR_FUNC
(
DH_F_DH_NEW_METHOD
),
"DH_new_method"
},
...
...
@@ -80,6 +79,7 @@ static ERR_STRING_DATA DH_str_functs[]=
{
ERR_FUNC
(
DH_F_DH_PRIV_ENCODE
),
"DH_PRIV_ENCODE"
},
{
ERR_FUNC
(
DH_F_DH_PUB_DECODE
),
"DH_PUB_DECODE"
},
{
ERR_FUNC
(
DH_F_DH_PUB_ENCODE
),
"DH_PUB_ENCODE"
},
{
ERR_FUNC
(
DH_F_DO_DH_PRINT
),
"DO_DH_PRINT"
},
{
ERR_FUNC
(
DH_F_GENERATE_KEY
),
"GENERATE_KEY"
},
{
ERR_FUNC
(
DH_F_GENERATE_PARAMETERS
),
"GENERATE_PARAMETERS"
},
{
ERR_FUNC
(
DH_F_PKEY_DH_DERIVE
),
"PKEY_DH_DERIVE"
},
...
...
crypto/dsa/dsa.h
浏览文件 @
5c95c2ac
...
...
@@ -261,13 +261,13 @@ void ERR_load_DSA_strings(void);
/* Function codes. */
#define DSA_F_D2I_DSA_SIG 110
#define DSA_F_DO_DSA_PRINT 104
#define DSA_F_DSAPARAMS_PRINT 100
#define DSA_F_DSAPARAMS_PRINT_FP 101
#define DSA_F_DSA_DO_SIGN 112
#define DSA_F_DSA_DO_VERIFY 113
#define DSA_F_DSA_NEW_METHOD 103
#define DSA_F_DSA_PARAM_DECODE 119
#define DSA_F_DSA_PRINT 104
#define DSA_F_DSA_PRINT_FP 105
#define DSA_F_DSA_PRIV_DECODE 115
#define DSA_F_DSA_PRIV_ENCODE 116
...
...
@@ -278,6 +278,7 @@ void ERR_load_DSA_strings(void);
#define DSA_F_DSA_SIG_NEW 109
#define DSA_F_DSA_VERIFY 108
#define DSA_F_I2D_DSA_SIG 111
#define DSA_F_OLD_DSA_PRIV_DECODE 122
#define DSA_F_PKEY_DSA_CTRL 120
#define DSA_F_PKEY_DSA_KEYGEN 121
#define DSA_F_SIG_CB 114
...
...
crypto/dsa/dsa_ameth.c
浏览文件 @
5c95c2ac
...
...
@@ -443,14 +443,6 @@ int do_dsa_print(BIO *bp, const DSA *x, int off, int ptype)
else
ktype
=
"DSA-Parameters"
;
#if 0
if (x->p == NULL)
{
DSAerr(DSA_F_DSA_PRINT,DSA_R_MISSING_PARAMETERS);
goto err;
}
#endif
update_buflen
(
x
->
p
,
&
buf_len
);
update_buflen
(
x
->
q
,
&
buf_len
);
update_buflen
(
x
->
g
,
&
buf_len
);
...
...
@@ -460,7 +452,7 @@ int do_dsa_print(BIO *bp, const DSA *x, int off, int ptype)
m
=
(
unsigned
char
*
)
OPENSSL_malloc
(
buf_len
+
10
);
if
(
m
==
NULL
)
{
DSAerr
(
DSA_F_DSA_PRINT
,
ERR_R_MALLOC_FAILURE
);
DSAerr
(
DSA_F_D
O_D
SA_PRINT
,
ERR_R_MALLOC_FAILURE
);
goto
err
;
}
...
...
@@ -528,7 +520,7 @@ static int old_dsa_priv_decode(EVP_PKEY *pkey,
DSA
*
dsa
;
if
(
!
(
dsa
=
d2i_DSAPrivateKey
(
NULL
,
pder
,
derlen
)))
{
DSAerr
(
DSA_F_DSA_PRIV_DECODE
,
ERR_R_DSA_LIB
);
DSAerr
(
DSA_F_
OLD_
DSA_PRIV_DECODE
,
ERR_R_DSA_LIB
);
return
0
;
}
EVP_PKEY_assign_DSA
(
pkey
,
dsa
);
...
...
crypto/dsa/dsa_err.c
浏览文件 @
5c95c2ac
...
...
@@ -71,13 +71,13 @@
static
ERR_STRING_DATA
DSA_str_functs
[]
=
{
{
ERR_FUNC
(
DSA_F_D2I_DSA_SIG
),
"d2i_DSA_SIG"
},
{
ERR_FUNC
(
DSA_F_DO_DSA_PRINT
),
"DO_DSA_PRINT"
},
{
ERR_FUNC
(
DSA_F_DSAPARAMS_PRINT
),
"DSAparams_print"
},
{
ERR_FUNC
(
DSA_F_DSAPARAMS_PRINT_FP
),
"DSAparams_print_fp"
},
{
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_NEW_METHOD
),
"DSA_new_method"
},
{
ERR_FUNC
(
DSA_F_DSA_PARAM_DECODE
),
"DSA_PARAM_DECODE"
},
{
ERR_FUNC
(
DSA_F_DSA_PRINT
),
"DSA_print"
},
{
ERR_FUNC
(
DSA_F_DSA_PRINT_FP
),
"DSA_print_fp"
},
{
ERR_FUNC
(
DSA_F_DSA_PRIV_DECODE
),
"DSA_PRIV_DECODE"
},
{
ERR_FUNC
(
DSA_F_DSA_PRIV_ENCODE
),
"DSA_PRIV_ENCODE"
},
...
...
@@ -88,6 +88,7 @@ static ERR_STRING_DATA DSA_str_functs[]=
{
ERR_FUNC
(
DSA_F_DSA_SIG_NEW
),
"DSA_SIG_new"
},
{
ERR_FUNC
(
DSA_F_DSA_VERIFY
),
"DSA_verify"
},
{
ERR_FUNC
(
DSA_F_I2D_DSA_SIG
),
"i2d_DSA_SIG"
},
{
ERR_FUNC
(
DSA_F_OLD_DSA_PRIV_DECODE
),
"OLD_DSA_PRIV_DECODE"
},
{
ERR_FUNC
(
DSA_F_PKEY_DSA_CTRL
),
"PKEY_DSA_CTRL"
},
{
ERR_FUNC
(
DSA_F_PKEY_DSA_KEYGEN
),
"PKEY_DSA_KEYGEN"
},
{
ERR_FUNC
(
DSA_F_SIG_CB
),
"SIG_CB"
},
...
...
crypto/ec/ec.h
浏览文件 @
5c95c2ac
...
...
@@ -925,6 +925,7 @@ void ERR_load_EC_strings(void);
#define EC_F_D2I_ECPARAMETERS 144
#define EC_F_D2I_ECPKPARAMETERS 145
#define EC_F_D2I_ECPRIVATEKEY 146
#define EC_F_DO_EC_KEY_PRINT 221
#define EC_F_ECKEY_PARAM2TYPE 196
#define EC_F_ECKEY_PARAM_DECODE 212
#define EC_F_ECKEY_PRIV_DECODE 213
...
...
@@ -1035,6 +1036,7 @@ void ERR_load_EC_strings(void);
#define EC_F_I2D_ECPRIVATEKEY 192
#define EC_F_I2O_ECPUBLICKEY 151
#define EC_F_O2I_ECPUBLICKEY 152
#define EC_F_OLD_EC_PRIV_DECODE 222
#define EC_F_PKEY_EC_CTRL 197
#define EC_F_PKEY_EC_CTRL_STR 198
#define EC_F_PKEY_EC_DERIVE 217
...
...
crypto/ec/ec_ameth.c
浏览文件 @
5c95c2ac
...
...
@@ -503,7 +503,7 @@ static int do_EC_KEY_print(BIO *bp, const EC_KEY *x, int off, int ktype)
ret
=
1
;
err:
if
(
!
ret
)
ECerr
(
EC_F_EC_KEY_PRINT
,
reason
);
ECerr
(
EC_F_
DO_
EC_KEY_PRINT
,
reason
);
if
(
pub_key
)
BN_free
(
pub_key
);
if
(
order
)
...
...
@@ -558,7 +558,7 @@ static int old_ec_priv_decode(EVP_PKEY *pkey,
EC_KEY
*
ec
;
if
(
!
(
ec
=
d2i_ECPrivateKey
(
NULL
,
pder
,
derlen
)))
{
ECerr
(
EC_F_
ECKEY
_PRIV_DECODE
,
EC_R_DECODE_ERROR
);
ECerr
(
EC_F_
OLD_EC
_PRIV_DECODE
,
EC_R_DECODE_ERROR
);
return
0
;
}
EVP_PKEY_assign_EC_KEY
(
pkey
,
ec
);
...
...
crypto/ec/ec_err.c
浏览文件 @
5c95c2ac
...
...
@@ -74,6 +74,7 @@ static ERR_STRING_DATA EC_str_functs[]=
{
ERR_FUNC
(
EC_F_D2I_ECPARAMETERS
),
"d2i_ECParameters"
},
{
ERR_FUNC
(
EC_F_D2I_ECPKPARAMETERS
),
"d2i_ECPKParameters"
},
{
ERR_FUNC
(
EC_F_D2I_ECPRIVATEKEY
),
"d2i_ECPrivateKey"
},
{
ERR_FUNC
(
EC_F_DO_EC_KEY_PRINT
),
"DO_EC_KEY_PRINT"
},
{
ERR_FUNC
(
EC_F_ECKEY_PARAM2TYPE
),
"ECKEY_PARAM2TYPE"
},
{
ERR_FUNC
(
EC_F_ECKEY_PARAM_DECODE
),
"ECKEY_PARAM_DECODE"
},
{
ERR_FUNC
(
EC_F_ECKEY_PRIV_DECODE
),
"ECKEY_PRIV_DECODE"
},
...
...
@@ -184,6 +185,7 @@ static ERR_STRING_DATA EC_str_functs[]=
{
ERR_FUNC
(
EC_F_I2D_ECPRIVATEKEY
),
"i2d_ECPrivateKey"
},
{
ERR_FUNC
(
EC_F_I2O_ECPUBLICKEY
),
"i2o_ECPublicKey"
},
{
ERR_FUNC
(
EC_F_O2I_ECPUBLICKEY
),
"o2i_ECPublicKey"
},
{
ERR_FUNC
(
EC_F_OLD_EC_PRIV_DECODE
),
"OLD_EC_PRIV_DECODE"
},
{
ERR_FUNC
(
EC_F_PKEY_EC_CTRL
),
"PKEY_EC_CTRL"
},
{
ERR_FUNC
(
EC_F_PKEY_EC_CTRL_STR
),
"PKEY_EC_CTRL_STR"
},
{
ERR_FUNC
(
EC_F_PKEY_EC_DERIVE
),
"PKEY_EC_DERIVE"
},
...
...
crypto/evp/evp.h
浏览文件 @
5c95c2ac
...
...
@@ -1142,6 +1142,7 @@ void ERR_load_EVP_strings(void);
#define EVP_F_EVP_MD_CTX_COPY_EX 110
#define EVP_F_EVP_OPENINIT 102
#define EVP_F_EVP_PBE_ALG_ADD 115
#define EVP_F_EVP_PBE_ALG_ADD_TYPE 160
#define EVP_F_EVP_PBE_CIPHERINIT 116
#define EVP_F_EVP_PKCS82PKEY 111
#define EVP_F_EVP_PKCS82PKEY_BROKEN 136
...
...
crypto/evp/evp_err.c
浏览文件 @
5c95c2ac
...
...
@@ -86,6 +86,7 @@ static ERR_STRING_DATA EVP_str_functs[]=
{
ERR_FUNC
(
EVP_F_EVP_MD_CTX_COPY_EX
),
"EVP_MD_CTX_copy_ex"
},
{
ERR_FUNC
(
EVP_F_EVP_OPENINIT
),
"EVP_OpenInit"
},
{
ERR_FUNC
(
EVP_F_EVP_PBE_ALG_ADD
),
"EVP_PBE_alg_add"
},
{
ERR_FUNC
(
EVP_F_EVP_PBE_ALG_ADD_TYPE
),
"EVP_PBE_alg_add_type"
},
{
ERR_FUNC
(
EVP_F_EVP_PBE_CIPHERINIT
),
"EVP_PBE_CipherInit"
},
{
ERR_FUNC
(
EVP_F_EVP_PKCS82PKEY
),
"EVP_PKCS82PKEY"
},
{
ERR_FUNC
(
EVP_F_EVP_PKCS82PKEY_BROKEN
),
"EVP_PKCS82PKEY_BROKEN"
},
...
...
crypto/evp/evp_pbe.c
浏览文件 @
5c95c2ac
...
...
@@ -220,7 +220,7 @@ int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid, int md_nid,
pbe_algs
=
sk_new
(
pbe_cmp
);
if
(
!
(
pbe_tmp
=
(
EVP_PBE_CTL
*
)
OPENSSL_malloc
(
sizeof
(
EVP_PBE_CTL
))))
{
EVPerr
(
EVP_F_EVP_PBE_ALG_ADD
,
ERR_R_MALLOC_FAILURE
);
EVPerr
(
EVP_F_EVP_PBE_ALG_ADD
_TYPE
,
ERR_R_MALLOC_FAILURE
);
return
0
;
}
pbe_tmp
->
pbe_type
=
pbe_type
;
...
...
crypto/evp/pmeth_fn.c
浏览文件 @
5c95c2ac
...
...
@@ -74,7 +74,7 @@
} \
else if (*arglen < pksize) \
{ \
EVPerr(err, EVP_R_BUFFER_TOO_SMALL); \
EVPerr(err, EVP_R_BUFFER_TOO_SMALL);
/*ckerr_ignore*/
\
return 0; \
} \
}
...
...
crypto/ocsp/ocsp.h
浏览文件 @
5c95c2ac
...
...
@@ -574,6 +574,7 @@ void ERR_load_OCSP_strings(void);
#define OCSP_F_OCSP_CHECK_ISSUER 108
#define OCSP_F_OCSP_CHECK_VALIDITY 115
#define OCSP_F_OCSP_MATCH_ISSUERID 109
#define OCSP_F_PARSE_HTTP_LINE1 118
#define OCSP_F_OCSP_PARSE_URL 114
#define OCSP_F_OCSP_REQUEST_SIGN 110
#define OCSP_F_OCSP_REQUEST_VERIFY 116
...
...
crypto/ocsp/ocsp_err.c
浏览文件 @
5c95c2ac
...
...
@@ -87,6 +87,7 @@ static ERR_STRING_DATA OCSP_str_functs[]=
{
ERR_FUNC
(
OCSP_F_OCSP_RESPONSE_GET1_BASIC
),
"OCSP_response_get1_basic"
},
{
ERR_FUNC
(
OCSP_F_OCSP_SENDREQ_BIO
),
"OCSP_sendreq_bio"
},
{
ERR_FUNC
(
OCSP_F_OCSP_SENDREQ_NBIO
),
"OCSP_sendreq_nbio"
},
{
ERR_FUNC
(
OCSP_F_PARSE_HTTP_LINE1
),
"PARSE_HTTP_LINE1"
},
{
ERR_FUNC
(
OCSP_F_REQUEST_VERIFY
),
"REQUEST_VERIFY"
},
{
0
,
NULL
}
};
...
...
crypto/ocsp/ocsp_ht.c
浏览文件 @
5c95c2ac
...
...
@@ -169,7 +169,7 @@ static int parse_http_line1(char *line)
continue
;
if
(
!*
p
)
{
OCSPerr
(
OCSP_F_
OCSP_SENDREQ_NBIO
,
OCSPerr
(
OCSP_F_
PARSE_HTTP_LINE1
,
OCSP_R_SERVER_RESPONSE_PARSE_ERROR
);
return
0
;
}
...
...
@@ -180,7 +180,7 @@ static int parse_http_line1(char *line)
if
(
!*
p
)
{
OCSPerr
(
OCSP_F_
OCSP_SENDREQ_NBIO
,
OCSPerr
(
OCSP_F_
PARSE_HTTP_LINE1
,
OCSP_R_SERVER_RESPONSE_PARSE_ERROR
);
return
0
;
}
...
...
@@ -191,7 +191,7 @@ static int parse_http_line1(char *line)
if
(
!*
q
)
{
OCSPerr
(
OCSP_F_
OCSP_SENDREQ_NBIO
,
OCSPerr
(
OCSP_F_
PARSE_HTTP_LINE1
,
OCSP_R_SERVER_RESPONSE_PARSE_ERROR
);
return
0
;
}
...
...
@@ -220,7 +220,7 @@ static int parse_http_line1(char *line)
}
if
(
retcode
!=
200
)
{
OCSPerr
(
OCSP_F_
OCSP_SENDREQ_NBIO
,
OCSP_R_SERVER_RESPONSE_ERROR
);
OCSPerr
(
OCSP_F_
PARSE_HTTP_LINE1
,
OCSP_R_SERVER_RESPONSE_ERROR
);
if
(
!*
q
)
ERR_add_error_data
(
2
,
"Code="
,
p
);
else
...
...
crypto/rsa/rsa.h
浏览文件 @
5c95c2ac
...
...
@@ -371,7 +371,10 @@ void ERR_load_RSA_strings(void);
/* Function codes. */
#define RSA_F_CHECK_PADDING_MD 140
#define RSA_F_DO_RSA_PRINT 146
#define RSA_F_RSA_VERIFY 119
#define RSA_F_MEMORY_LOCK 100
#define RSA_F_OLD_RSA_PRIV_DECODE 147
#define RSA_F_PKEY_RSA_CTRL 143
#define RSA_F_PKEY_RSA_CTRL_STR 144
#define RSA_F_PKEY_RSA_SIGN 142
...
...
@@ -412,7 +415,7 @@ void ERR_load_RSA_strings(void);
#define RSA_F_RSA_SETUP_BLINDING 136
#define RSA_F_RSA_SIGN 117
#define RSA_F_RSA_SIGN_ASN1_OCTET_STRING 118
#define RSA_F_
RSA_VERIFY 119
#define RSA_F_
INT_RSA_VERIFY 145
#define RSA_F_RSA_VERIFY_ASN1_OCTET_STRING 120
#define RSA_F_RSA_VERIFY_PKCS1_PSS 126
...
...
crypto/rsa/rsa_ameth.c
浏览文件 @
5c95c2ac
...
...
@@ -108,7 +108,7 @@ static int old_rsa_priv_decode(EVP_PKEY *pkey,
RSA
*
rsa
;
if
(
!
(
rsa
=
d2i_RSAPrivateKey
(
NULL
,
pder
,
derlen
)))
{
RSAerr
(
RSA_F_RSA_PRIV_DECODE
,
ERR_R_RSA_LIB
);
RSAerr
(
RSA_F_
OLD_
RSA_PRIV_DECODE
,
ERR_R_RSA_LIB
);
return
0
;
}
EVP_PKEY_assign_RSA
(
pkey
,
rsa
);
...
...
@@ -200,7 +200,7 @@ static int do_rsa_print(BIO *bp, const RSA *x, int off, int priv)
m
=
(
unsigned
char
*
)
OPENSSL_malloc
(
buf_len
+
10
);
if
(
m
==
NULL
)
{
RSAerr
(
RSA_F_RSA_PRINT
,
ERR_R_MALLOC_FAILURE
);
RSAerr
(
RSA_F_
DO_
RSA_PRINT
,
ERR_R_MALLOC_FAILURE
);
goto
err
;
}
...
...
crypto/rsa/rsa_err.c
浏览文件 @
5c95c2ac
...
...
@@ -71,7 +71,10 @@
static
ERR_STRING_DATA
RSA_str_functs
[]
=
{
{
ERR_FUNC
(
RSA_F_CHECK_PADDING_MD
),
"CHECK_PADDING_MD"
},
{
ERR_FUNC
(
RSA_F_DO_RSA_PRINT
),
"DO_RSA_PRINT"
},
{
ERR_FUNC
(
RSA_F_INT_RSA_VERIFY
),
"INT_RSA_VERIFY"
},
{
ERR_FUNC
(
RSA_F_MEMORY_LOCK
),
"MEMORY_LOCK"
},
{
ERR_FUNC
(
RSA_F_OLD_RSA_PRIV_DECODE
),
"OLD_RSA_PRIV_DECODE"
},
{
ERR_FUNC
(
RSA_F_PKEY_RSA_CTRL
),
"PKEY_RSA_CTRL"
},
{
ERR_FUNC
(
RSA_F_PKEY_RSA_CTRL_STR
),
"PKEY_RSA_CTRL_STR"
},
{
ERR_FUNC
(
RSA_F_PKEY_RSA_SIGN
),
"PKEY_RSA_SIGN"
},
...
...
crypto/rsa/rsa_sign.c
浏览文件 @
5c95c2ac
...
...
@@ -153,7 +153,7 @@ int int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len,
if
(
siglen
!=
(
unsigned
int
)
RSA_size
(
rsa
))
{
RSAerr
(
RSA_F_RSA_VERIFY
,
RSA_R_WRONG_SIGNATURE_LENGTH
);
RSAerr
(
RSA_F_
INT_
RSA_VERIFY
,
RSA_R_WRONG_SIGNATURE_LENGTH
);
return
(
0
);
}
...
...
@@ -170,11 +170,11 @@ int int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len,
s
=
(
unsigned
char
*
)
OPENSSL_malloc
((
unsigned
int
)
siglen
);
if
(
s
==
NULL
)
{
RSAerr
(
RSA_F_RSA_VERIFY
,
ERR_R_MALLOC_FAILURE
);
RSAerr
(
RSA_F_
INT_
RSA_VERIFY
,
ERR_R_MALLOC_FAILURE
);
goto
err
;
}
if
((
dtype
==
NID_md5_sha1
)
&&
(
m_len
!=
SSL_SIG_LENGTH
)
)
{
RSAerr
(
RSA_F_RSA_VERIFY
,
RSA_R_INVALID_MESSAGE_LENGTH
);
RSAerr
(
RSA_F_
INT_
RSA_VERIFY
,
RSA_R_INVALID_MESSAGE_LENGTH
);
goto
err
;
}
i
=
RSA_public_decrypt
((
int
)
siglen
,
sigbuf
,
s
,
rsa
,
RSA_PKCS1_PADDING
);
...
...
@@ -184,7 +184,7 @@ int int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len,
/* Special case: SSL signature */
if
(
dtype
==
NID_md5_sha1
)
{
if
((
i
!=
SSL_SIG_LENGTH
)
||
memcmp
(
s
,
m
,
SSL_SIG_LENGTH
))
RSAerr
(
RSA_F_RSA_VERIFY
,
RSA_R_BAD_SIGNATURE
);
RSAerr
(
RSA_F_
INT_
RSA_VERIFY
,
RSA_R_BAD_SIGNATURE
);
else
ret
=
1
;
}
else
{
const
unsigned
char
*
p
=
s
;
...
...
@@ -213,7 +213,7 @@ int int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len,
}
else
{
RSAerr
(
RSA_F_RSA_VERIFY
,
RSAerr
(
RSA_F_
INT_
RSA_VERIFY
,
RSA_R_ALGORITHM_MISMATCH
);
goto
err
;
}
...
...
@@ -223,7 +223,7 @@ int int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len,
const
EVP_MD
*
md
;
md
=
EVP_get_digestbynid
(
dtype
);
if
(
md
&&
(
EVP_MD_size
(
md
)
!=
sig
->
digest
->
length
))
RSAerr
(
RSA_F_RSA_VERIFY
,
RSAerr
(
RSA_F_
INT_
RSA_VERIFY
,
RSA_R_INVALID_DIGEST_LENGTH
);
else
{
...
...
@@ -236,7 +236,7 @@ int int_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len,
else
if
(((
unsigned
int
)
sig
->
digest
->
length
!=
m_len
)
||
(
memcmp
(
m
,
sig
->
digest
->
data
,
m_len
)
!=
0
))
{
RSAerr
(
RSA_F_RSA_VERIFY
,
RSA_R_BAD_SIGNATURE
);
RSAerr
(
RSA_F_
INT_
RSA_VERIFY
,
RSA_R_BAD_SIGNATURE
);
}
else
ret
=
1
;
...
...
util/ck_errf.pl
浏览文件 @
5c95c2ac
...
...
@@ -20,7 +20,7 @@ foreach $file (@ARGV)
$func
=
$
1
;
$func
=~
tr/A-Z/a-z/
;
}
if
(
/([A-Z0-9]+)err\(([^,]+)/
)
if
(
/([A-Z0-9]+)err\(([^,]+)/
&&
!
/ckerr_ignore/
)
{
$errlib
=
$
1
;
$n
=
$
2
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录