Ensure that RSA signatures have the correct length

TLS Lite generates RSA signatures by converting a large integer that
holds the signature to a byte string. It does not apply any padding so
that if the signature starts with sufficiently many zero bits, the byte
string will be shorter than expected (it should have the same length as
the key's modulus).

This bug was fixed in trunk TLS Lite but is still present in our fork. The
fix in trunk TLS Lite was spread over two commits:

* Add a |howManyBytes| argument to the numberToBytes() method:
https://github.com/trevp/tlslite/commit/
    4278f558c2c519684ab35e9fc84887c15a11ea16
* Specify |howManyBytes| when generating an RSA signature:
https://github.com/trevp/tlslite/commit/
    0b8b2b4122109f22900ec929432308dd685f1d45

BUG=331761
TEST=Manual

Review URL: https://codereview.chromium.org/168903005

git-svn-id: http://src.chromium.org/svn/trunk/src/third_party/tlslite@251797 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
4 files changed