Chuck, On 3/30/16 5:10 PM, Caldarale, Charles R wrote: >> From: Christopher Schultz >> Subject: RE: svn commit: r1737154 - in /tomcat/native/trunk: >> native/src/sslcontext.c xdocs/miscellaneous/changelog.xml > >> Since bufferPtr is the byte array you want to use, you can probably just >> use that directly for the call to d2i_x509(). I think the >> malloc/memcpy/free is not necessary. > > Does calling d2i_X509() have the potential to block for any > significant length of time? If so, the byte array would be pinned in > the heap for the duration, which may impact GC.
Good question. I assumed it was a conversion routine (foo2bar) and was just going to be converting from byte array to an internal representation of the X509 certificate. My justification for avoiding the malloc/memcpy/free was to reduce memory churn and improve performance, but you're right: if d2i_X509 is likely to take any significant amount of time, that outstanding pined array can cause a slowdown in other areas. In either case, I believe correctness is maintained so it will all come down to performance. I'll have to read about d2i_X509 and maybe read the implementation (which is likely to cause nightmares) to see. -chris --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org