Some more extra casts to avoid alignment warnings with Clang and -Wcast-align on...
[BearSSL] / tools / brssl.h
index 8c84b04..c47a026 100644 (file)
@@ -471,9 +471,22 @@ const br_hash_class *get_hash_impl(int id);
  */
 const char *find_error_name(int err, const char **comment);
 
+/*
+ * Find the symbolic name for an algorithm implementation. Provided
+ * pointer should be a pointer to a vtable or to a function, where
+ * appropriate. If not recognised, then the string "UNKNOWN" is returned.
+ *
+ * If 'long_name' is non-zero, then the returned name recalls the
+ * algorithm type as well; otherwise, only the core implementation name
+ * is returned (e.g. the long name could be 'aes_big_cbcenc' while the
+ * short name is 'big').
+ */
+const char *get_algo_name(const void *algo, int long_name);
+
 /*
  * Run a SSL engine, with a socket connected to the peer, and using
- * stdin/stdout to exchange application data.
+ * stdin/stdout to exchange application data. The socket must be a
+ * non-blocking descriptor.
  *
  * To help with Win32 compatibility, the socket descriptor is provided
  * as an "unsigned long" value.
@@ -526,4 +539,11 @@ int do_ta(int argc, char *argv[]);
  */
 int do_chain(int argc, char *argv[]);
 
+/*
+ * Do the "twrch" command. Returned value is 0 on success, -1 on failure
+ * (processing or arguments), or a non-zero exit code. Command-line
+ * arguments start _after_ the command name.
+ */
+int do_twrch(int argc, char *argv[]);
+
 #endif