On 02/04/2019 00:31, Viktor Dukhovni wrote: >> len = i2d_SSL_SESSION(ss, &sess_asn1); > > This is incorrect use of the api. You need to provide a NULL > buffer, obtain the length, then call again, after allocating > a buffer of the requisite size. Thanks (again). Perhaps a note of this in the manpage would be good? And any other i2d_* pages? -- Cheers, Jeremy