correct certificate memory management

When a printer provides an HTTPS certificate it is compared with the
previously-supplied certificate. In some cases, the certificate
buffer may become invalid. As a result, the JNI layer returns a
false negative, as if a new certificate arrived, triggering a user
notification to accept the "new" certificate.

This pull allocates memory correctly, so that the prior certificate
buffer remains valid for the lifetime of the print job.

Test: repeated prints to an IPPS printer
Signed-off-by: Glade Diviney <>
Change-Id: I8a575dc3bc4f4f0be6944dd9cec7a7e989286c3e
1 file changed