aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-10-20 19:32:47 -0700
committerDamjan Marion <dmarion@me.com>2019-10-21 10:46:09 +0000
commit79ba25d40248ceba3efb232952282678b5a7f910 (patch)
treeb6f27b8d1f1e539ee925778fc91a055a60443b6f /src/vnet/session/application.c
parentef7cbf6adf1882af4d4ae8657632d4a2a59efcb2 (diff)
session: support registration of custom crypto engines
Type: feature Change-Id: I888d415ff645b3827df7d4cfb0d3c5f4ac940617 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/application.c')
-rw-r--r--src/vnet/session/application.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c
index 396470ae6f9..7cb888c2344 100644
--- a/src/vnet/session/application.c
+++ b/src/vnet/session/application.c
@@ -1630,6 +1630,7 @@ cert_key_pair_store_init (vlib_main_t * vm)
{
/* Add a certificate with index 0 to support legacy apis */
(void) app_cert_key_pair_alloc ();
+ app_main.last_crypto_engine = CRYPTO_ENGINE_LAST;
return 0;
}
@@ -1651,6 +1652,18 @@ VLIB_CLI_COMMAND (show_certificate_command, static) =
};
/* *INDENT-ON* */
+crypto_engine_type_t
+app_crypto_engine_type_add (void)
+{
+ return (++app_main.last_crypto_engine);
+}
+
+u8
+app_crypto_engine_n_types (void)
+{
+ return (app_main.last_crypto_engine + 1);
+}
+
/*
* fd.io coding-style-patch-verification: ON
*