Wouldn't it be more efficient to Buffer::New() a new buffer and run i2d_SSL_SESSION() on it?