Update from stable branch.
diff --git a/apps/apps.c b/apps/apps.c
index 7038ac1..455bf28 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -137,7 +137,9 @@
 #include <openssl/rsa.h>
 #endif
 #include <openssl/bn.h>
+#ifdef OPENSSL_EXPERIMENTAL_JPAKE
 #include <openssl/jpake.h>
+#endif
 
 #define NON_MAIN
 #include "apps.h"
@@ -2379,6 +2381,8 @@
 		BIO_free(out);
 	}
 
+#ifdef OPENSSL_EXPERIMENTAL_JPAKE
+
 static JPAKE_CTX *jpake_init(const char *us, const char *them,
 							 const char *secret)
 	{
@@ -2591,6 +2595,8 @@
 	BIO_free(bconn);
 	}
 
+#endif
+
 /*
  * Platform-specific sections
  */
diff --git a/apps/apps.h b/apps/apps.h
index f08893e..7172edf 100644
--- a/apps/apps.h
+++ b/apps/apps.h
@@ -308,8 +308,10 @@
 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
 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
diff --git a/apps/s_client.c b/apps/s_client.c
index 93c62b4..2319151 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -429,7 +429,9 @@
 	int peerlen = sizeof(peer);
 	int enable_timeouts = 0 ;
 	long socket_mtu = 0;
+#ifdef OPENSSL_EXPERIMENTAL_JPAKE
 	char *jpake_secret = NULL;
+#endif
 
 #if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
 	meth=SSLv23_client_method();
@@ -699,11 +701,13 @@
 			/* meth=TLSv1_client_method(); */
 			}
 #endif
+#ifdef OPENSSL_EXPERIMENTAL_JPAKE
 		else if (strcmp(*argv,"-jpake") == 0)
 			{
 			if (--argc < 1) goto bad;
 			jpake_secret = *++argv;
 			}
+#endif
 		else
 			{
 			BIO_printf(bio_err,"unknown option %s\n",*argv);
@@ -1022,9 +1026,10 @@
 #endif
 		}
 #endif
-
+#ifdef OPENSSL_EXPERIMENTAL_JPAKE
 	if (jpake_secret)
 		jpake_client_auth(bio_c_out, sbio, jpake_secret);
+#endif
 
 	SSL_set_bio(con,sbio,sbio);
 	SSL_set_connect_state(con);
diff --git a/apps/s_server.c b/apps/s_server.c
index 1bf649b..6b0d340 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -822,7 +822,9 @@
 
 int MAIN(int, char **);
 
+#ifdef OPENSSL_EXPERIMENTAL_JPAKE
 static char *jpake_secret = NULL;
+#endif
 
 int MAIN(int argc, char *argv[])
 	{
@@ -1182,11 +1184,13 @@
 			}
 			
 #endif
+#ifdef OPENSSL_EXPERIMENTAL_JPAKE
 		else if (strcmp(*argv,"-jpake") == 0)
 			{
 			if (--argc < 1) goto bad;
 			jpake_secret = *(++argv);
 			}
+#endif
 		else
 			{
 			BIO_printf(bio_err,"unknown option %s\n",*argv);
@@ -1814,9 +1818,10 @@
 		test=BIO_new(BIO_f_nbio_test());
 		sbio=BIO_push(test,sbio);
 		}
-
+#ifdef OPENSSL_EXPERIMENTAL_JPAKE
 	if(jpake_secret)
 		jpake_server_auth(bio_s_out, sbio, jpake_secret);
+#endif
 
 	SSL_set_bio(con,sbio,sbio);
 	SSL_set_accept_state(con);