Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
8b15c740
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看板
提交
8b15c740
编写于
5月 10, 2005
作者:
N
Nils Larsch
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
give EC_GROUP_new_by_nid a more meanigful name:
EC_GROUP_new_by_nid -> EC_GROUP_new_by_curve_name
上级
3afa6cf8
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
27 addition
and
26 deletion
+27
-26
CHANGES
CHANGES
+2
-2
apps/ecparam.c
apps/ecparam.c
+1
-1
apps/s_server.c
apps/s_server.c
+2
-2
apps/speed.c
apps/speed.c
+2
-2
crypto/asn1/x_pubkey.c
crypto/asn1/x_pubkey.c
+1
-1
crypto/ec/ec.h
crypto/ec/ec.h
+4
-3
crypto/ec/ec_asn1.c
crypto/ec/ec_asn1.c
+1
-1
crypto/ec/ec_curve.c
crypto/ec/ec_curve.c
+2
-2
crypto/ec/ec_err.c
crypto/ec/ec_err.c
+1
-1
crypto/ec/ectest.c
crypto/ec/ectest.c
+2
-2
crypto/ecdh/ecdhtest.c
crypto/ecdh/ecdhtest.c
+1
-1
crypto/ecdsa/ecdsatest.c
crypto/ecdsa/ecdsatest.c
+3
-3
crypto/evp/evp_pkey.c
crypto/evp/evp_pkey.c
+1
-1
ssl/s3_clnt.c
ssl/s3_clnt.c
+1
-1
ssl/ssltest.c
ssl/ssltest.c
+2
-2
util/libeay.num
util/libeay.num
+1
-1
未找到文件。
CHANGES
浏览文件 @
8b15c740
...
...
@@ -774,14 +774,14 @@
*) Include some named elliptic curves, and add OIDs from X9.62,
SECG, and WAP/WTLS. Each curve can be obtained from the new
function
EC_GROUP_new_by_
nid
(),
EC_GROUP_new_by_
curve_name
(),
and the list of available named curves can be obtained with
EC_get_builtin_curves().
Also add a 'curve_name' member to EC_GROUP objects, which can be
accessed via
EC_GROUP_set_curve_name()
EC_GROUP_get_curve_name()
[Nils Larsch <
nla
@trustcenter.de, Bodo Moeller]
[Nils Larsch <
larsch
@trustcenter.de, Bodo Moeller]
*) Remove a few calls to bn_wexpand() in BN_sqr() (the one in there
was actually never needed) and in BN_mul(). The removal in BN_mul()
...
...
apps/ecparam.c
浏览文件 @
8b15c740
...
...
@@ -411,7 +411,7 @@ bad:
goto
end
;
}
group
=
EC_GROUP_new_by_
nid
(
nid
);
group
=
EC_GROUP_new_by_
curve_name
(
nid
);
if
(
group
==
NULL
)
{
BIO_printf
(
bio_err
,
"unable to create curve (%s)
\n
"
,
...
...
apps/s_server.c
浏览文件 @
8b15c740
...
...
@@ -999,7 +999,7 @@ bad:
goto
end
;
}
ecdh
->
group
=
EC_GROUP_new_by_
nid
(
nid
);
ecdh
->
group
=
EC_GROUP_new_by_
curve_name
(
nid
);
if
(
ecdh
->
group
==
NULL
)
{
BIO_printf
(
bio_err
,
"unable to create curve (%s)
\n
"
,
...
...
@@ -1015,7 +1015,7 @@ bad:
else
{
BIO_printf
(
bio_s_out
,
"Using default temp ECDH parameters
\n
"
);
ecdh
->
group
=
EC_GROUP_new_by_
nid
(
NID_sect163r2
);
ecdh
->
group
=
EC_GROUP_new_by_
curve_name
(
NID_sect163r2
);
if
(
ecdh
->
group
==
NULL
)
{
BIO_printf
(
bio_err
,
"unable to create curve (sect163r2)
\n
"
);
...
...
apps/speed.c
浏览文件 @
8b15c740
...
...
@@ -2049,7 +2049,7 @@ int MAIN(int argc, char **argv)
}
else
{
ecdsa
[
j
]
->
group
=
EC_GROUP_new_by_
nid
(
test_curves
[
j
]);
ecdsa
[
j
]
->
group
=
EC_GROUP_new_by_
curve_name
(
test_curves
[
j
]);
/* Could not obtain group information */
if
(
ecdsa
[
j
]
->
group
==
NULL
)
{
...
...
@@ -2168,7 +2168,7 @@ int MAIN(int argc, char **argv)
}
else
{
ecdh_a
[
j
]
->
group
=
EC_GROUP_new_by_
nid
(
test_curves
[
j
]);
ecdh_a
[
j
]
->
group
=
EC_GROUP_new_by_
curve_name
(
test_curves
[
j
]);
if
(
ecdh_a
[
j
]
->
group
==
NULL
)
{
BIO_printf
(
bio_err
,
"ECDH failure.
\n
"
);
...
...
crypto/asn1/x_pubkey.c
浏览文件 @
8b15c740
...
...
@@ -338,7 +338,7 @@ EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key)
eckey
=
ret
->
pkey
.
eckey
;
if
(
eckey
->
group
)
EC_GROUP_free
(
eckey
->
group
);
if
((
eckey
->
group
=
EC_GROUP_new_by_
nid
(
if
((
eckey
->
group
=
EC_GROUP_new_by_
curve_name
(
OBJ_obj2nid
(
a
->
parameter
->
value
.
object
)))
==
NULL
)
goto
err
;
EC_GROUP_set_asn1_flag
(
eckey
->
group
,
...
...
crypto/ec/ec.h
浏览文件 @
8b15c740
...
...
@@ -178,8 +178,9 @@ int EC_GROUP_cmp(const EC_GROUP *, const EC_GROUP *, BN_CTX *);
EC_GROUP
*
EC_GROUP_new_curve_GFp
(
const
BIGNUM
*
p
,
const
BIGNUM
*
a
,
const
BIGNUM
*
b
,
BN_CTX
*
);
EC_GROUP
*
EC_GROUP_new_curve_GF2m
(
const
BIGNUM
*
p
,
const
BIGNUM
*
a
,
const
BIGNUM
*
b
,
BN_CTX
*
);
/* EC_GROUP_new_by_nid() creates a EC_GROUP structure specified by a NID */
EC_GROUP
*
EC_GROUP_new_by_nid
(
int
nid
);
/* EC_GROUP_new_by_curve_name() creates a EC_GROUP structure
* specified by a curve name (in form of a NID) */
EC_GROUP
*
EC_GROUP_new_by_curve_name
(
int
nid
);
/* handling of internal curves */
typedef
struct
{
int
nid
;
...
...
@@ -428,7 +429,7 @@ void ERR_load_EC_strings(void);
#define EC_F_EC_GROUP_GET_TRINOMIAL_BASIS 194
#define EC_F_EC_GROUP_GROUP2NID 147
#define EC_F_EC_GROUP_NEW 108
#define EC_F_EC_GROUP_NEW_BY_
NID
174
#define EC_F_EC_GROUP_NEW_BY_
CURVE_NAME
174
#define EC_F_EC_GROUP_NEW_FROM_DATA 175
#define EC_F_EC_GROUP_PRECOMPUTE_MULT 142
#define EC_F_EC_GROUP_SET_CURVE_GF2M 176
...
...
crypto/ec/ec_asn1.c
浏览文件 @
8b15c740
...
...
@@ -967,7 +967,7 @@ EC_GROUP *ec_asn1_pkparameters2group(const ECPKPARAMETERS *params)
if
(
params
->
type
==
0
)
{
/* the curve is given by an OID */
tmp
=
OBJ_obj2nid
(
params
->
value
.
named_curve
);
if
((
ret
=
EC_GROUP_new_by_
nid
(
tmp
))
==
NULL
)
if
((
ret
=
EC_GROUP_new_by_
curve_name
(
tmp
))
==
NULL
)
{
ECerr
(
EC_F_EC_ASN1_PKPARAMETERS2GROUP
,
EC_R_EC_GROUP_NEW_BY_NAME_FAILURE
);
...
...
crypto/ec/ec_curve.c
浏览文件 @
8b15c740
...
...
@@ -1224,7 +1224,7 @@ err:
return
group
;
}
EC_GROUP
*
EC_GROUP_new_by_
nid
(
int
nid
)
EC_GROUP
*
EC_GROUP_new_by_
curve_name
(
int
nid
)
{
size_t
i
;
EC_GROUP
*
ret
=
NULL
;
...
...
@@ -1241,7 +1241,7 @@ EC_GROUP *EC_GROUP_new_by_nid(int nid)
if
(
ret
==
NULL
)
{
ECerr
(
EC_F_EC_GROUP_NEW_BY_
NID
,
EC_R_UNKNOWN_GROUP
);
ECerr
(
EC_F_EC_GROUP_NEW_BY_
CURVE_NAME
,
EC_R_UNKNOWN_GROUP
);
return
NULL
;
}
...
...
crypto/ec/ec_err.c
浏览文件 @
8b15c740
...
...
@@ -133,7 +133,7 @@ static ERR_STRING_DATA EC_str_functs[]=
{
ERR_FUNC
(
EC_F_EC_GROUP_GET_TRINOMIAL_BASIS
),
"EC_GROUP_get_trinomial_basis"
},
{
ERR_FUNC
(
EC_F_EC_GROUP_GROUP2NID
),
"EC_GROUP_GROUP2NID"
},
{
ERR_FUNC
(
EC_F_EC_GROUP_NEW
),
"EC_GROUP_new"
},
{
ERR_FUNC
(
EC_F_EC_GROUP_NEW_BY_
NID
),
"EC_GROUP_new_by_nid
"
},
{
ERR_FUNC
(
EC_F_EC_GROUP_NEW_BY_
CURVE_NAME
),
"EC_GROUP_new_by_curve_name
"
},
{
ERR_FUNC
(
EC_F_EC_GROUP_NEW_FROM_DATA
),
"EC_GROUP_NEW_FROM_DATA"
},
{
ERR_FUNC
(
EC_F_EC_GROUP_PRECOMPUTE_MULT
),
"EC_GROUP_precompute_mult"
},
{
ERR_FUNC
(
EC_F_EC_GROUP_SET_CURVE_GF2M
),
"EC_GROUP_set_curve_GF2m"
},
...
...
crypto/ec/ectest.c
浏览文件 @
8b15c740
...
...
@@ -1252,10 +1252,10 @@ void internal_curve_test(void)
{
EC_GROUP
*
group
=
NULL
;
int
nid
=
curves
[
n
].
nid
;
if
((
group
=
EC_GROUP_new_by_
nid
(
nid
))
==
NULL
)
if
((
group
=
EC_GROUP_new_by_
curve_name
(
nid
))
==
NULL
)
{
ok
=
0
;
fprintf
(
stdout
,
"
\n
EC_GROUP_new_
by_nid
() failed with"
fprintf
(
stdout
,
"
\n
EC_GROUP_new_
curve_name
() failed with"
" curve %s
\n
"
,
OBJ_nid2sn
(
nid
));
/* try next curve */
continue
;
...
...
crypto/ecdh/ecdhtest.c
浏览文件 @
8b15c740
...
...
@@ -132,7 +132,7 @@ int test_ecdh_curve(int nid, char *text, BN_CTX *ctx, BIO *out)
int
i
,
alen
,
blen
,
aout
,
bout
,
ret
=
0
;
if
((
a
=
EC_KEY_new
())
==
NULL
)
goto
err
;
if
((
a
->
group
=
EC_GROUP_new_by_
nid
(
nid
))
==
NULL
)
goto
err
;
if
((
a
->
group
=
EC_GROUP_new_by_
curve_name
(
nid
))
==
NULL
)
goto
err
;
if
((
b
=
EC_KEY_new
())
==
NULL
)
goto
err
;
b
->
group
=
a
->
group
;
...
...
crypto/ecdsa/ecdsatest.c
浏览文件 @
8b15c740
...
...
@@ -203,7 +203,7 @@ int x9_62_test_internal(BIO *out, int nid, const char *r_in, const char *s_in)
/* create the key */
if
((
key
=
EC_KEY_new
())
==
NULL
)
goto
x962_int_err
;
if
((
key
->
group
=
EC_GROUP_new_by_
nid
(
nid
))
==
NULL
)
if
((
key
->
group
=
EC_GROUP_new_by_
curve_name
(
nid
))
==
NULL
)
goto
x962_int_err
;
if
(
!
EC_KEY_generate_key
(
key
))
goto
x962_int_err
;
...
...
@@ -337,7 +337,7 @@ int test_builtin(BIO *out)
/* create new ecdsa key (== EC_KEY) */
if
((
eckey
=
EC_KEY_new
())
==
NULL
)
goto
builtin_err
;
if
((
eckey
->
group
=
EC_GROUP_new_by_
nid
(
nid
))
==
NULL
)
if
((
eckey
->
group
=
EC_GROUP_new_by_
curve_name
(
nid
))
==
NULL
)
goto
builtin_err
;
if
(
EC_GROUP_get_degree
(
eckey
->
group
)
<
160
)
/* drop the curve */
...
...
@@ -356,7 +356,7 @@ int test_builtin(BIO *out)
/* create second key */
if
((
wrong_eckey
=
EC_KEY_new
())
==
NULL
)
goto
builtin_err
;
if
((
wrong_eckey
->
group
=
EC_GROUP_new_by_
nid
(
nid
))
==
NULL
)
if
((
wrong_eckey
->
group
=
EC_GROUP_new_by_
curve_name
(
nid
))
==
NULL
)
goto
builtin_err
;
if
(
!
EC_KEY_generate_key
(
wrong_eckey
))
{
...
...
crypto/evp/evp_pkey.c
浏览文件 @
8b15c740
...
...
@@ -262,7 +262,7 @@ EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8)
ERR_R_MALLOC_FAILURE
);
goto
ecerr
;
}
if
((
eckey
->
group
=
EC_GROUP_new_by_
nid
(
if
((
eckey
->
group
=
EC_GROUP_new_by_
curve_name
(
OBJ_obj2nid
(
a
->
parameter
->
value
.
object
)))
==
NULL
)
goto
ecerr
;
EC_GROUP_set_asn1_flag
(
eckey
->
group
,
...
...
ssl/s3_clnt.c
浏览文件 @
8b15c740
...
...
@@ -1214,7 +1214,7 @@ int ssl3_get_key_exchange(SSL *s)
goto
f_err
;
}
if
(
!
(
ecdh
->
group
=
EC_GROUP_new_by_
nid
(
curve_nid
)))
if
(
!
(
ecdh
->
group
=
EC_GROUP_new_by_
curve_name
(
curve_nid
)))
{
SSLerr
(
SSL_F_SSL3_GET_KEY_EXCHANGE
,
ERR_R_EC_LIB
);
goto
err
;
...
...
ssl/ssltest.c
浏览文件 @
8b15c740
...
...
@@ -734,7 +734,7 @@ bad:
goto
end
;
}
ecdh
->
group
=
EC_GROUP_new_by_
nid
(
nid
);
ecdh
->
group
=
EC_GROUP_new_by_
curve_name
(
nid
);
if
(
ecdh
->
group
==
NULL
)
{
BIO_printf
(
bio_err
,
"unable to create curve (%s)
\n
"
,
named_curve
);
...
...
@@ -744,7 +744,7 @@ bad:
}
if
(
ecdh
->
group
==
NULL
)
ecdh
->
group
=
EC_GROUP_new_by_
nid
(
NID_sect163r2
);
ecdh
->
group
=
EC_GROUP_new_by_
curve_name
(
NID_sect163r2
);
SSL_CTX_set_tmp_ecdh
(
s_ctx
,
ecdh
);
SSL_CTX_set_options
(
s_ctx
,
SSL_OP_SINGLE_ECDH_USE
);
...
...
util/libeay.num
浏览文件 @
8b15c740
...
...
@@ -2906,7 +2906,7 @@ EC_POINT_set_affine_coords_GF2m 3340 EXIST:VMS:FUNCTION:EC
BN_GF2m_mod_exp_arr 3341 EXIST::FUNCTION:
STORE_ATTR_INFO_modify_number 3342 EXIST::FUNCTION:
X509_keyid_get0 3343 EXIST::FUNCTION:
EC_GROUP_new_by_
nid
3344 EXIST::FUNCTION:EC
EC_GROUP_new_by_
curve_name
3344 EXIST::FUNCTION:EC
ENGINE_load_gmp 3345 EXIST::FUNCTION:ENGINE,GMP,STATIC_ENGINE
pitem_new 3346 EXIST::FUNCTION:
BN_GF2m_mod_mul_arr 3347 EXIST::FUNCTION:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录