Re: [openssl-users] What global object I use in application lifetime

2015-03-24 Thread Jerry OELoo
So, I can re-use g_ctx, but I need create a new g_ssl everytime, right? BTW, X509_STORE *store = X509_STORE_new(); for store, Can I reuse it as a global object? On Wed, Mar 25, 2015 at 11:33 AM, Salz, Rich wrote: >> From document, I think CTX can be initialize only once. But I do not know >> g_

Re: [openssl-users] What global object I use in application lifetime

2015-03-24 Thread Salz, Rich
> From document, I think CTX can be initialize only once. But I do not know > g_ssl can be initialize only once? I can reuse g_ssl for 1000 differnt URLs? > Please correct me if anything. Thanks! You need to create a new SSL object every time you want to do a connect. /r$ -- Senior Ar

[openssl-users] What global object I use in application lifetime

2015-03-24 Thread Jerry OELoo
Hi. Now when my application running, I will use SSL_connect() to connect 1000 different URLs. I want to keep some openssl object as global variable then I do not need to initialize/uninitialize again and again. Here is my sample code. g_ctx = SSL_CTX_new(method); g_ssl = SSL_new(g_ctx ); //SSL_