Merge pull request #544 from cconlon/rsafix
include MAX_RSA_INT_SZ in wc_RsaKeyToPublicDer(), for 4096-bit keys
This commit is contained in:
commit
05d78dc2ce
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user