diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2008-11-24 17:27:08 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2008-11-24 17:27:08 +0000 |
commit | 79bd20fd1755d0d8a6d1d758b2f8858643621923 (patch) | |
tree | 06725a9fe6fee39c9d637a410dab64043d16b862 /apps | |
parent | d0c36288341ca75328eeb4cc33bce6a7d3f65c51 (diff) | |
download | openssl-79bd20fd1755d0d8a6d1d758b2f8858643621923.tar.gz |
Update from stable-branch.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/apps.c | 4 | ||||
-rw-r--r-- | apps/apps.h | 4 | ||||
-rw-r--r-- | apps/s_client.c | 14 | ||||
-rw-r--r-- | apps/s_server.c | 14 |
4 files changed, 23 insertions, 13 deletions
diff --git a/apps/apps.c b/apps/apps.c index 6a65f94434..56e87ecd3b 100644 --- a/apps/apps.c +++ b/apps/apps.c @@ -137,7 +137,7 @@ #include <openssl/rsa.h> #endif #include <openssl/bn.h> -#ifdef OPENSSL_EXPERIMENTAL_JPAKE +#ifndef OPENSSL_NO_JPAKE #include <openssl/jpake.h> #endif @@ -2381,7 +2381,7 @@ void policies_print(BIO *out, X509_STORE_CTX *ctx) BIO_free(out); } -#if defined(OPENSSL_EXPERIMENTAL_JPAKE) && !defined(OPENSSL_NO_PSK) +#if !defined(OPENSSL_NO_JPAKE) && !defined(OPENSSL_NO_PSK) static JPAKE_CTX *jpake_init(const char *us, const char *them, const char *secret) diff --git a/apps/apps.h b/apps/apps.h index 62a8659624..4b0a0e1660 100644 --- a/apps/apps.h +++ b/apps/apps.h @@ -308,8 +308,10 @@ 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 +#ifndef OPENSSL_NO_PSK extern char *psk_key; +#endif +#ifndef OPENSSL_NO_JPAKE void jpake_client_auth(BIO *out, BIO *conn, const char *secret); void jpake_server_auth(BIO *out, BIO *conn, const char *secret); #endif diff --git a/apps/s_client.c b/apps/s_client.c index 05ebff1f67..f0783bcd58 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -312,7 +312,7 @@ static void sc_usage(void) #ifndef OPENSSL_NO_PSK BIO_printf(bio_err," -psk_identity arg - PSK identity\n"); BIO_printf(bio_err," -psk arg - PSK in hex (without 0x)\n"); -# ifdef OPENSSL_EXPERIMENTAL_JPAKE +# ifndef OPENSSL_NO_JPAKE BIO_printf(bio_err," -jpake arg - JPAKE secret to use\n"); # endif #endif @@ -432,7 +432,7 @@ int MAIN(int argc, char **argv) int peerlen = sizeof(peer); int enable_timeouts = 0 ; long socket_mtu = 0; -#ifdef OPENSSL_EXPERIMENTAL_JPAKE +#ifndef OPENSSL_NO_JPAKE char *jpake_secret = NULL; #endif @@ -704,7 +704,7 @@ int MAIN(int argc, char **argv) /* meth=TLSv1_client_method(); */ } #endif -#ifdef OPENSSL_EXPERIMENTAL_JPAKE +#ifndef OPENSSL_NO_JPAKE else if (strcmp(*argv,"-jpake") == 0) { if (--argc < 1) goto bad; @@ -727,7 +727,7 @@ bad: goto end; } -#if defined(OPENSSL_EXPERIMENTAL_JPAKE) && !defined(OPENSSL_NO_PSK) +#if !defined(OPENSSL_NO_JPAKE) && !defined(OPENSSL_NO_PSK) if (jpake_secret) { if (psk_key) @@ -845,7 +845,11 @@ bad: #endif #ifndef OPENSSL_NO_PSK +#ifdef OPENSSL_NO_JPAKE + if (psk_key != NULL) +#else if (psk_key != NULL || jpake_secret) +#endif { if (c_debug) BIO_printf(bio_c_out, "PSK key given or JPAKE in use, setting client callback\n"); @@ -1049,7 +1053,7 @@ SSL_set_tlsext_status_ids(con, ids); #endif } #endif -#ifdef OPENSSL_EXPERIMENTAL_JPAKE +#ifndef OPENSSL_NO_JPAKE if (jpake_secret) jpake_client_auth(bio_c_out, sbio, jpake_secret); #endif diff --git a/apps/s_server.c b/apps/s_server.c index 277b2f04f2..3b7fb07765 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -450,7 +450,7 @@ static void sv_usage(void) #ifndef OPENSSL_NO_PSK BIO_printf(bio_err," -psk_hint arg - PSK identity hint to use\n"); BIO_printf(bio_err," -psk arg - PSK in hex (without 0x)\n"); -# ifdef OPENSSL_EXPERIMENTAL_JPAKE +# ifndef OPENSSL_NO_JPAKE BIO_printf(bio_err," -jpake arg - JPAKE secret to use\n"); # endif #endif @@ -827,7 +827,7 @@ BIO_printf(err, "cert_status: received %d ids\n", sk_OCSP_RESPID_num(ids)); int MAIN(int, char **); -#ifdef OPENSSL_EXPERIMENTAL_JPAKE +#ifndef OPENSSL_NO_JPAKE static char *jpake_secret = NULL; #endif @@ -1189,7 +1189,7 @@ int MAIN(int argc, char *argv[]) } #endif -#if defined(OPENSSL_EXPERIMENTAL_JPAKE) && !defined(OPENSSL_NO_PSK) +#if !defined(OPENSSL_NO_JPAKE) && !defined(OPENSSL_NO_PSK) else if (strcmp(*argv,"-jpake") == 0) { if (--argc < 1) goto bad; @@ -1212,7 +1212,7 @@ bad: goto end; } -#if defined(OPENSSL_EXPERIMENTAL_JPAKE) && !defined(OPENSSL_NO_PSK) +#if !defined(OPENSSL_NO_JPAKE) && !defined(OPENSSL_NO_PSK) if (jpake_secret) { if (psk_key) @@ -1616,7 +1616,11 @@ bad: #endif #ifndef OPENSSL_NO_PSK +#ifdef OPENSSL_NO_JPAKE + if (psk_key != NULL) +#else if (psk_key != NULL || jpake_secret) +#endif { if (s_debug) BIO_printf(bio_s_out, "PSK key given or JPAKE in use, setting server callback\n"); @@ -1843,7 +1847,7 @@ static int sv_body(char *hostname, int s, unsigned char *context) test=BIO_new(BIO_f_nbio_test()); sbio=BIO_push(test,sbio); } -#ifdef OPENSSL_EXPERIMENTAL_JPAKE +#ifndef OPENSSL_NO_JPAKE if(jpake_secret) jpake_server_auth(bio_s_out, sbio, jpake_secret); #endif |