hsa: Add ckpair & crypto engine in vpp_echo
[vpp.git] / src / plugins / hs_apps / sapi / vpp_echo_common.c
index dbe8d92..7c58dad 100644 (file)
@@ -113,30 +113,6 @@ format_ip46_address (u8 * s, va_list * args)
     format (s, "%U", format_ip6_address, &ip46->ip6);
 }
 
-uword
-unformat_data (unformat_input_t * input, va_list * args)
-{
-  u64 _a;
-  u64 *a = va_arg (*args, u64 *);
-  if (unformat (input, "%lluGb", &_a))
-    *a = _a << 30;
-  else if (unformat (input, "%lluG", &_a))
-    *a = _a << 30;
-  else if (unformat (input, "%lluMb", &_a))
-    *a = _a << 20;
-  else if (unformat (input, "%lluM", &_a))
-    *a = _a << 20;
-  else if (unformat (input, "%lluKb", &_a))
-    *a = _a << 10;
-  else if (unformat (input, "%lluK", &_a))
-    *a = _a << 10;
-  else if (unformat (input, "%llu", a))
-    ;
-  else
-    return 0;
-  return 1;
-}
-
 u8 *
 format_api_error (u8 * s, va_list * args)
 {
@@ -229,8 +205,6 @@ echo_format_app_state (u8 * s, va_list * args)
     return format (s, "STATE_ATTACHED (%u)", state);
   if (state == STATE_ATTACHED_NO_CERT)
     return format (s, "STATE_ATTACHED_NO_CERT (%u)", state);
-  if (state == STATE_ATTACHED_ONE_CERT)
-    return format (s, "STATE_ATTACHED_ONE_CERT (%u)", state);
   if (state == STATE_LISTEN)
     return format (s, "STATE_LISTEN (%u)", state);
   if (state == STATE_READY)
@@ -487,9 +461,9 @@ u8 *
 echo_format_crypto_engine (u8 * s, va_list * args)
 {
   u32 state = va_arg (*args, u32);
-  if (state == TLS_ENGINE_MBEDTLS)
+  if (state == CRYPTO_ENGINE_MBEDTLS)
     return format (s, "mbedtls");
-  if (state == TLS_ENGINE_OPENSSL)
+  if (state == CRYPTO_ENGINE_OPENSSL)
     return format (s, "openssl");
   if (state == CRYPTO_ENGINE_PICOTLS)
     return format (s, "picotls");
@@ -504,9 +478,9 @@ echo_unformat_crypto_engine (unformat_input_t * input, va_list * args)
 {
   u8 *a = va_arg (*args, u8 *);
   if (unformat (input, "mbedtls"))
-    *a = TLS_ENGINE_MBEDTLS;
+    *a = CRYPTO_ENGINE_MBEDTLS;
   else if (unformat (input, "openssl"))
-    *a = TLS_ENGINE_OPENSSL;
+    *a = CRYPTO_ENGINE_OPENSSL;
   else if (unformat (input, "picotls"))
     *a = CRYPTO_ENGINE_PICOTLS;
   else if (unformat (input, "vpp"))