aboutsummaryrefslogtreecommitdiffstats
path: root/apps/s_server.c
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>1999-04-27 01:14:46 +0000
committerUlf Möller <ulf@openssl.org>1999-04-27 01:14:46 +0000
commitf5d7a031a3c3e7b1700a67d6dc19daf3718ce6ee (patch)
treef5db72824de4586c35cef513ed48aff0d4b69a6b /apps/s_server.c
parentb64f825671861144e1c24f2a5498a95a083021cd (diff)
downloadopenssl-f5d7a031a3c3e7b1700a67d6dc19daf3718ce6ee.tar.gz
New Configure option no-<cipher> (rsa, idea, rc5, ...).
Diffstat (limited to 'apps/s_server.c')
-rw-r--r--apps/s_server.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/s_server.c b/apps/s_server.c
index dc218db924..7d1b569269 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -74,7 +74,13 @@
#include <openssl/ssl.h>
#include "s_apps.h"
+#if defined(NO_RSA) && !defined(NO_SSL2)
+#define NO_SSL2
+#endif
+
+#ifndef NO_RSA
static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int export,int keylength);
+#endif
static int sv_body(char *hostname, int s, unsigned char *context);
static int www_body(char *hostname, int s, unsigned char *context);
static void close_accept_socket(void );
@@ -470,6 +476,7 @@ bad:
goto end;
}
+#ifndef NO_RSA
#if 1
SSL_CTX_set_tmp_rsa_callback(ctx,tmp_rsa_cb);
#else
@@ -491,6 +498,7 @@ bad:
BIO_printf(bio_s_out,"\n");
}
#endif
+#endif
if (cipher != NULL)
SSL_CTX_set_cipher_list(ctx,cipher);
@@ -1199,6 +1207,7 @@ err:
return(ret);
}
+#ifndef NO_RSA
static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int export, int keylength)
{
static RSA *rsa_tmp=NULL;
@@ -1210,9 +1219,7 @@ static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int export, int keylength)
BIO_printf(bio_err,"Generating temp (%d bit) RSA key...",keylength);
BIO_flush(bio_err);
}
-#ifndef NO_RSA
rsa_tmp=RSA_generate_key(keylength,RSA_F4,NULL,NULL);
-#endif
if (!s_quiet)
{
BIO_printf(bio_err,"\n");
@@ -1221,3 +1228,4 @@ static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int export, int keylength)
}
return(rsa_tmp);
}
+#endif