提交 86f300d3 编写于 作者: D Dr. Stephen Henson

Use named curve parameter encoding by default.

Many applications require named curve parameter encoding instead of explicit
parameter encoding (including the TLS library in OpenSSL itself). Set this
encoding by default instead of requiring an explicit call to set it.

Add OPENSSL_EC_EXPLICT_CURVE define.
Reviewed-by: NMatt Caswell <matt@openssl.org>
上级 f37879d0
...@@ -715,7 +715,8 @@ int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1, ...@@ -715,7 +715,8 @@ int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1,
unsigned int *k2, unsigned int *k3); unsigned int *k2, unsigned int *k3);
# endif # endif
# define OPENSSL_EC_NAMED_CURVE 0x001 # define OPENSSL_EC_EXPLICIT_CURVE 0x000
# define OPENSSL_EC_NAMED_CURVE 0x001
typedef struct ecpk_parameters_st ECPKPARAMETERS; typedef struct ecpk_parameters_st ECPKPARAMETERS;
......
...@@ -106,7 +106,7 @@ EC_GROUP *EC_GROUP_new(const EC_METHOD *meth) ...@@ -106,7 +106,7 @@ EC_GROUP *EC_GROUP_new(const EC_METHOD *meth)
goto err; goto err;
ret->curve_name = 0; ret->curve_name = 0;
ret->asn1_flag = 0; ret->asn1_flag = OPENSSL_EC_NAMED_CURVE;
ret->asn1_form = POINT_CONVERSION_UNCOMPRESSED; ret->asn1_form = POINT_CONVERSION_UNCOMPRESSED;
ret->seed = NULL; ret->seed = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册