Base-64-encoding, via the httpEncode64_2() function, used to save
printer/server certificates in files, got broken in commit
a521b235a1ab, ending up with corrupted files not readable when loading
them again and so the certificates of network printers do not get
trusted when a previous copy of them gets loaded from the file. So the
first job prints (no certificate file yet, certificate loaded from
printer) and every subsequent job does not print, as the printer's
certificate does not match the one loaded from the file.
This commit undoes the changes which got applied to the
httpEncode64_2() function to make the certificates correctly encoded
again.
if (inlen > 1)
*outptr ++ = base64[(((in[0] & 255) << 4) | ((in[1] & 255) >> 4)) & 63];
else
- *outptr ++ = base64[(in[0] << 4) & 63];
+ *outptr ++ = base64[((in[0] & 255) << 4) & 63];
}
in ++;
if (outptr < outend)
{
if (inlen > 1)
- *outptr ++ = base64[((in[0] << 2) | (in[1] >> 6)) & 63];
+ *outptr ++ = base64[(((in[0] & 255) << 2) | ((in[1] & 255) >> 6)) & 63];
else
- *outptr ++ = base64[(in[0] << 2) & 63];
+ *outptr ++ = base64[((in[0] & 255) << 2) & 63];
}
in ++;