Closed isaldana closed 7 years ago
OpenSSL is probably calling X509_free() internally on the cert when it frees the context, so we need to adjust our GC strategy so that doesn't happen twice.
(See https://github.com/spacemonkeygo/openssl/blob/master/ctx.go#L125)
It also needs to be resilient to changing the certificate of a context multiple times without leaking or crashing.
This is basically the problem I'm talking about in #19
This might be fixed by now. Closing due to inactivity.
I created multiple
*openssl.Ctx
. When one goes out of scope, the finalizer tries to free a bunch of stuff including the *openssl.Certificate associated with that context (https://github.com/spacemonkeygo/openssl/blob/master/cert.go#L326). My program keeps crashing and it seems like the finalizer is being called twice. The workaround is to never let theopenssl.Ctx
go out of scope. The following is the relevant crash error: