mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-06-28 16:53:37 +08:00
Merge pull request #1871 from shakespark/fix-compressed-point-output
fix(sm2): fix compressed point output writing y instead of x
This commit is contained in:
@@ -1865,7 +1865,7 @@ int sm2_z256_point_to_compressed_octets(const SM2_Z256_POINT *P, uint8_t out[33]
|
|||||||
} else {
|
} else {
|
||||||
out[0] = SM2_point_compressed_y_even;
|
out[0] = SM2_point_compressed_y_even;
|
||||||
}
|
}
|
||||||
sm2_z256_to_bytes(y, out + 1);
|
sm2_z256_to_bytes(x, out + 1);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user