summaryrefslogtreecommitdiffstats
path: root/src/plugins/tlsopenssl/tls_async.c
diff options
context:
space:
mode:
authorPing Yu <ping.yu@intel.com>2019-08-19 07:01:17 -0400
committerPing Yu <ping.yu@intel.com>2019-08-20 13:36:17 +0000
commitbe4d1aa2c58efa8287bca8795bc4a83cb448993a (patch)
treec726b2c3ce5ee0e98f88aa8db1d16ce1d6b9ee32 /src/plugins/tlsopenssl/tls_async.c
parente71748291171e53158e2d36d8f413fed1a137013 (diff)
tls: Add C API for TLS openssl to set engine
Type: feature Parameters of the engine can be set by C API. After this patch, it is easier to integrate TLS into CSIT test. Change-Id: I063cabf613aabbfad831727551579328705afb41 Signed-off-by: Ping Yu <ping.yu@intel.com>
Diffstat (limited to 'src/plugins/tlsopenssl/tls_async.c')
-rw-r--r--src/plugins/tlsopenssl/tls_async.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/tlsopenssl/tls_async.c b/src/plugins/tlsopenssl/tls_async.c
index ade073c66bc..e577f34eacf 100644
--- a/src/plugins/tlsopenssl/tls_async.c
+++ b/src/plugins/tlsopenssl/tls_async.c
@@ -143,7 +143,7 @@ openssl_engine_register (char *engine_name, char *algorithm)
if (registered < 0)
{
clib_error ("engine %s is not regisered in VPP", engine_name);
- return 0;
+ return -1;
}
ENGINE_load_builtin_engines ();
@@ -153,7 +153,7 @@ openssl_engine_register (char *engine_name, char *algorithm)
if (engine == NULL)
{
clib_warning ("Failed to find engine ENGINE_by_id %s", engine_name);
- return 0;
+ return -1;
}
om->engine = engine;
@@ -168,7 +168,7 @@ openssl_engine_register (char *engine_name, char *algorithm)
{
clib_warning ("Failed to set engine %s algorithm %s\n",
engine_name, algorithm);
- return 0;
+ return -1;
}
}
else
@@ -177,13 +177,13 @@ openssl_engine_register (char *engine_name, char *algorithm)
{
clib_warning ("Failed to set engine %s to all algorithm",
engine_name);
- return 0;
+ return -1;
}
}
om->start_polling = 1;
- return 1;
+ return 0;
}