Skip to content

crypto: improve prime size argument validation

The current validation in JavaScript is insufficient and also produces an incorrect error message, restricting the size parameter to 32-bit values, whereas the C++ backend restricts the size parameter to the positive range of an int.

This change tightens the validation in JavaScript and adapts the error message accordingly, making the validation in C++ superfluous.

Refs: https://github.com/nodejs/node/pull/42207

Merge request reports

Loading