JoshKaufman / ursa

URSA - RSA public/private key OpenSSL bindings for Node.js
Other
619 stars 135 forks source link

Decrypt hanging forever on bad encrypted sequence #95

Closed siboulet closed 9 years ago

siboulet commented 9 years ago

In decrypt(), if buf is not a properly encrypted sequence, ursa will just hang there forever.

var buf = new Buffer('random stuff'); var decrypt = key.decrypt(buf); // hang here forever

Using latest 0.8.5

siboulet commented 9 years ago

It's throwing an "error:0407A079:rsa routines:RSA_padding_check_PKCS1_OAEP:oaep decoding error" Error. Its not hanging. It seems my code is silently ignoring the exception. Sorry. Closing.