Fix pools for s_client
s_client was not freeing up the async pool if async mode was enabled. Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
@@ -160,6 +160,7 @@ typedef unsigned int u_int;
|
|||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include <openssl/ocsp.h>
|
#include <openssl/ocsp.h>
|
||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
|
#include <openssl/async.h>
|
||||||
#ifndef OPENSSL_NO_SRP
|
#ifndef OPENSSL_NO_SRP
|
||||||
# include <openssl/srp.h>
|
# include <openssl/srp.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -1205,8 +1206,10 @@ int s_client_main(int argc, char **argv)
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (async)
|
if (async) {
|
||||||
SSL_CTX_set_mode(ctx, SSL_MODE_ASYNC);
|
SSL_CTX_set_mode(ctx, SSL_MODE_ASYNC);
|
||||||
|
ASYNC_init_pool(0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
if (!config_ctx(cctx, ssl_args, ctx, 1, jpake_secret == NULL))
|
if (!config_ctx(cctx, ssl_args, ctx, 1, jpake_secret == NULL))
|
||||||
goto end;
|
goto end;
|
||||||
@@ -2096,6 +2099,9 @@ int s_client_main(int argc, char **argv)
|
|||||||
print_stuff(bio_c_out, con, 1);
|
print_stuff(bio_c_out, con, 1);
|
||||||
SSL_free(con);
|
SSL_free(con);
|
||||||
}
|
}
|
||||||
|
if (async) {
|
||||||
|
ASYNC_free_pool();
|
||||||
|
}
|
||||||
#if !defined(OPENSSL_NO_NEXTPROTONEG)
|
#if !defined(OPENSSL_NO_NEXTPROTONEG)
|
||||||
OPENSSL_free(next_proto.data);
|
OPENSSL_free(next_proto.data);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user