This commit is contained in:
guanzhi
2017-05-15 19:29:17 +08:00
parent 79e2936664
commit 463db17a86
8 changed files with 5709 additions and 5260 deletions

View File

@@ -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);