Merge pull request #544 from cconlon/rsafix

include MAX_RSA_INT_SZ in wc_RsaKeyToPublicDer(), for 4096-bit keys
This commit is contained in:
toddouska 2016-09-13 11:24:03 -07:00 committed by GitHub
commit 05d78dc2ce

View File

@ -5575,7 +5575,7 @@ static int SetRsaPublicKey(byte* output, RsaKey* key,
n[0] = ASN_INTEGER;
nSz = SetLength(rawLen, n + 1) + 1; /* int tag */
if ( (nSz + rawLen) < MAX_RSA_INT_SZ) {
if ( (nSz + rawLen) <= MAX_RSA_INT_SZ) {
if (leadingBit)
n[nSz] = 0;
#ifdef HAVE_USER_RSA