Integrate J-PAKE and TLS-PSK. Increase PSK buffer size. Fix memory leaks.
[openssl.git] / apps / apps.h
index 93d874976b189e9685b6ca7c353f1c124f990972..62a8659624201acf298839f0ddc59ac08399a6ee 100644 (file)
@@ -181,7 +181,7 @@ extern BIO *bio_err;
 #    define apps_shutdown() \
                        do { CONF_modules_unload(1); destroy_ui_method(); \
                        OBJ_cleanup(); EVP_cleanup(); ENGINE_cleanup(); \
-                       CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); \
+                       CRYPTO_cleanup_all_ex_data(); ERR_remove_thread_state(NULL); \
                        ERR_free_strings(); COMP_zlib_cleanup();} while(0)
 #  else
 #    define apps_startup() \
@@ -191,7 +191,7 @@ extern BIO *bio_err;
 #    define apps_shutdown() \
                        do { CONF_modules_unload(1); destroy_ui_method(); \
                        OBJ_cleanup(); EVP_cleanup(); \
-                       CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); \
+                       CRYPTO_cleanup_all_ex_data(); ERR_remove_thread_state(NULL); \
                        ERR_free_strings(); } while(0)
 #  endif
 #endif
@@ -308,6 +308,11 @@ int bio_to_mem(unsigned char **out, int maxlen, BIO *in);
 int pkey_ctrl_string(EVP_PKEY_CTX *ctx, char *value);
 int init_gen_str(BIO *err, EVP_PKEY_CTX **pctx,
                        const char *algname, ENGINE *e, int do_param);
+#ifdef OPENSSL_EXPERIMENTAL_JPAKE
+extern char *psk_key;
+void jpake_client_auth(BIO *out, BIO *conn, const char *secret);
+void jpake_server_auth(BIO *out, BIO *conn, const char *secret);
+#endif
 
 #define FORMAT_UNDEF    0
 #define FORMAT_ASN1     1