X-Git-Url: https://www.bearssl.org/gitweb//home/git/?p=BearSSL;a=blobdiff_plain;f=tools%2Fbrssl.h;h=22fd712239405b46fb8ae1c67ed89f933bafba42;hp=8c84b04483c85124202b63905b2ac6ca2c8d0c34;hb=491a45337de8dc0a4c100abf33f5c0e187a08afd;hpb=3f00688b9d9f483a6ca97e659eea104995ea15b7 diff --git a/tools/brssl.h b/tools/brssl.h index 8c84b04..22fd712 100644 --- a/tools/brssl.h +++ b/tools/brssl.h @@ -252,12 +252,13 @@ extern const cipher_suite cipher_suites[]; #define REQ_SHA384 0x0008 /* suite needs SHA-384 */ #define REQ_AESCBC 0x0010 /* suite needs AES/CBC encryption */ #define REQ_AESGCM 0x0020 /* suite needs AES/GCM encryption */ -#define REQ_CHAPOL 0x0040 /* suite needs ChaCha20+Poly1305 */ -#define REQ_3DESCBC 0x0080 /* suite needs 3DES/CBC encryption */ -#define REQ_RSAKEYX 0x0100 /* suite uses RSA key exchange */ -#define REQ_ECDHE_RSA 0x0200 /* suite uses ECDHE_RSA key exchange */ -#define REQ_ECDHE_ECDSA 0x0400 /* suite uses ECDHE_ECDSA key exchange */ -#define REQ_ECDH 0x0800 /* suite uses static ECDH key exchange */ +#define REQ_AESCCM 0x0040 /* suite needs AES/CCM encryption */ +#define REQ_CHAPOL 0x0080 /* suite needs ChaCha20+Poly1305 */ +#define REQ_3DESCBC 0x0100 /* suite needs 3DES/CBC encryption */ +#define REQ_RSAKEYX 0x0200 /* suite uses RSA key exchange */ +#define REQ_ECDHE_RSA 0x0400 /* suite uses ECDHE_RSA key exchange */ +#define REQ_ECDHE_ECDSA 0x0800 /* suite uses ECDHE_ECDSA key exchange */ +#define REQ_ECDH 0x1000 /* suite uses static ECDH key exchange */ /* * Parse a list of cipher suite names. The names are comma-separated. If @@ -471,9 +472,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 +540,17 @@ 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[]); + +/* + * Do the "impl" command. Returned value is 0 on success, -1 on failure. + * Command-line arguments start _after_ the command name. + */ +int do_impl(int argc, char *argv[]); + #endif