mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-21 07:46:26 +08:00
bug fix
This commit is contained in:
@@ -86,7 +86,14 @@ int EC_KEY_set_ECCPUBLICKEYBLOB(EC_KEY *ec_key, const ECCPUBLICKEYBLOB *blob)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 1
|
||||
nbytes = 64;
|
||||
#else
|
||||
/* we assume that the coordinates are stored in big-endian format.
|
||||
* but if it is not
|
||||
*/
|
||||
nbytes = (blob->BitLen + 7)/8;
|
||||
#endif
|
||||
|
||||
if (!(x = BN_bin2bn(blob->XCoordinate, nbytes, NULL))) {
|
||||
GMAPIerr(GMAPI_F_EC_KEY_SET_ECCPUBLICKEYBLOB, ERR_R_BN_LIB);
|
||||
|
||||
@@ -54,11 +54,6 @@
|
||||
|
||||
int SM2_get_public_key_data(EC_KEY *ec_key, unsigned char *out, size_t *outlen);
|
||||
|
||||
int SM2_compute_message_digest(const EVP_MD *id_md, const EVP_MD *msg_md,
|
||||
const unsigned char *msg, size_t msglen, const char *id, size_t idlen,
|
||||
unsigned char *out, size_t *outlen,
|
||||
EC_KEY *ec_key);
|
||||
|
||||
struct SM2CiphertextValue_st {
|
||||
BIGNUM *xCoordinate;
|
||||
BIGNUM *yCoordinate;
|
||||
@@ -97,11 +92,5 @@ struct sm2_kap_ctx_st {
|
||||
|
||||
};
|
||||
|
||||
int i2o_SM2CiphertextValue(const EC_GROUP *group, const SM2CiphertextValue *cv,
|
||||
unsigned char **pout);
|
||||
SM2CiphertextValue *o2i_SM2CiphertextValue(const EC_GROUP *group, const EVP_MD *md,
|
||||
SM2CiphertextValue **cv, const unsigned char **pin, long len);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user