Re: [openssl-users] Correct way to free SSL_CTX* ?

2018-01-28 Thread murugesh pitchaiah
Hi Pratyush, Whenever you set a certificate to CTX, the reference count will get incremented: CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509); In addition, inside your application any usage of a certificate may cause this reference count to be incremented. As you can seen in man page - one call

Re: [openssl-users] Correct way to free SSL_CTX* ?

2018-01-28 Thread pratyush parimal
Hi all, I think I found the way to fix the memory leak in my application. Just floating it here in case it helps out someone else. The answer was on the wiki page for SSL_CTX_add_extra_chain_cert(): "The *x509* certificate provided to SSL_CTX_add_extra_chain_cert() will be freed by the library wh

Re: [openssl-users] Correct way to free SSL_CTX* ?

2018-01-28 Thread J Decker
On Sun, Jan 28, 2018 at 7:05 PM, pratyush parimal < pratyush.pari...@gmail.com> wrote: > Hi all, > > I'm trying to write an application in which I create an instance of > SSL_CTX* using SSL_CTX_new(), and set the following things in it: > > (1) An EVP_PKEY* : > 1a> created with PEM_read_bio_Privat

[openssl-users] Correct way to free SSL_CTX* ?

2018-01-28 Thread pratyush parimal
Hi all, I'm trying to write an application in which I create an instance of SSL_CTX* using SSL_CTX_new(), and set the following things in it: (1) An EVP_PKEY* : 1a> created with PEM_read_bio_PrivateKey(). 1b> set in the ctx using SSL_CTX_use_PrivateKey(). (2) A number of X509* instances (cuz cha

Re: [openssl-users] mail encryption with ecdsa cert

2018-01-28 Thread clou
> On 26 Jan 2018, at 18:20, Kyle Hamilton wrote: > > In order to use Elliptical Curves to encrypt, you would have to use > the "Elliptical Curve Diffie-Hellman" algorithm to perform a key > agreement. This requires that both the sender and the recipient have > EC keys which are marked in their