converting DerToPem, readjust output buffer size to account for size of header and footer when calling Base64_Encode
This commit is contained in:
parent
e98193000a
commit
0edc19feb2
@ -2790,7 +2790,7 @@ int DerToPem(const byte* der, word32 derSz, byte* output, word32 outSz,
|
||||
i = headerLen;
|
||||
|
||||
/* body */
|
||||
outLen = outSz; /* input to Base64_Encode */
|
||||
outLen = outSz - (headerLen + footerLen); /* input to Base64_Encode */
|
||||
if ( (err = Base64_Encode(der, derSz, output + i, (word32*)&outLen)) < 0)
|
||||
return err;
|
||||
i += outLen;
|
||||
|
Loading…
Reference in New Issue
Block a user