This PR fixes a couple of memory issues produced when calling PrivateKeyECDH.PublicKey().
The underlying problem is that this method creates a public key that shares the same OpenSSL EVP_PKEY instance with the private key. This EVP_KEY is freed when any of the keys is garbage collected, leaving the other key with an invalid EVP_PKEY that will probably crash the application when it is used.
I've also improved the test pipeline so it has more chances to detect this memory bugs.
This PR fixes a couple of memory issues produced when calling
PrivateKeyECDH.PublicKey()
.The underlying problem is that this method creates a public key that shares the same OpenSSL EVP_PKEY instance with the private key. This EVP_KEY is freed when any of the keys is garbage collected, leaving the other key with an invalid EVP_PKEY that will probably crash the application when it is used.
I've also improved the test pipeline so it has more chances to detect this memory bugs.