Hi, I was looking through the code and happened to notice a minor issue. It doesn't actually have any impact on the function but is semantically incorrect or at least confusing...
otrng_serialize_ec_point() returns an int number of bytes serialised, but here it is interpreted as if it returned an otrng_result. It happens to work in practice because ED448_POINT_BYTES isn't equal to OTRNG_ERROR, but the line should probably read something as follows for correctness
if (otrng_serialize_ec_point(forg_ser, *client->forging_key) != ED448_POINT_BYTES) {
Hi, I was looking through the code and happened to notice a minor issue. It doesn't actually have any impact on the function but is semantically incorrect or at least confusing...
https://github.com/otrv4/libotr-ng/blob/c6185352b30ef788e9b1eba0f88be2c57ebce9e1/src/persistence.c#L923
otrng_serialize_ec_point() returns an int number of bytes serialised, but here it is interpreted as if it returned an otrng_result. It happens to work in practice because ED448_POINT_BYTES isn't equal to OTRNG_ERROR, but the line should probably read something as follows for correctness
Do you want me to open a PR?