Fix the error on overly large group orders.

Change-Id: I9b11fabb79b5dfe031ac5ea2f021b28b87262761
Reviewed-on: https://boringssl-review.googlesource.com/27585
Reviewed-by: Adam Langley <alangley@gmail.com>
This commit is contained in:
David Benjamin 2018-04-21 01:27:29 -04:00 committed by Adam Langley
parent cd01254900
commit 3f8074c2de

View File

@ -352,7 +352,7 @@ int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
} }
if (BN_num_bytes(order) > EC_MAX_SCALAR_BYTES) { if (BN_num_bytes(order) > EC_MAX_SCALAR_BYTES) {
OPENSSL_PUT_ERROR(EC, EC_R_INVALID_FIELD); OPENSSL_PUT_ERROR(EC, EC_R_INVALID_GROUP_ORDER);
return 0; return 0;
} }