Missing semicolon.
[openssl.git] / ssl / ssltest.c
index cebd4e7c8fe588feafd1d74d5819faac0d333209..db87b1a35ea1af9f76ae6f6d4cea17c293ac113b 100644 (file)
@@ -266,12 +266,6 @@ static char * MS_CALLBACK ssl_give_srp_client_pwd_cb(SSL *s, void *arg)
        return BUF_strdup((char *)srp_client_arg->srppassin);
        }
 
-static char * MS_CALLBACK missing_srp_username_callback(SSL *s, void *arg)
-       {
-       SRP_CLIENT_ARG *srp_client_arg = (SRP_CLIENT_ARG *)arg;
-       return BUF_strdup(srp_client_arg->srplogin);
-       }
-
 /* SRP server */
 /* This is a context that we pass to SRP server callbacks */
 typedef struct srp_server_arg_st
@@ -617,7 +611,6 @@ int main(int argc, char *argv[])
 #endif
 #ifndef OPENSSL_NO_SRP
        /* client */
-       int srp_lateuser = 0;
        SRP_CLIENT_ARG srp_client_arg = {NULL,NULL};
        /* server */
        SRP_SERVER_ARG srp_server_arg = {NULL,NULL};
@@ -627,8 +620,8 @@ int main(int argc, char *argv[])
        int no_psk = 0;
        int print_time = 0;
        clock_t s_time = 0, c_time = 0;
-       int comp = 0;
 #ifndef OPENSSL_NO_COMP
+       int comp = 0;
        COMP_METHOD *cm = NULL;
        STACK_OF(SSL_COMP) *ssl_comp_methods = NULL;
 #endif
@@ -822,6 +815,7 @@ int main(int argc, char *argv[])
                        {
                        print_time = 1;
                        }
+#ifndef OPENSSL_NO_COMP
                else if (strcmp(*argv,"-zlib") == 0)
                        {
                        comp = COMP_ZLIB;
@@ -830,6 +824,7 @@ int main(int argc, char *argv[])
                        {
                        comp = COMP_RLE;
                        }
+#endif
                else if (strcmp(*argv,"-named_curve") == 0)
                        {
                        if (--argc < 1) goto bad;
@@ -982,7 +977,13 @@ bad:
                meth=SSLv23_method();
 #else
 #ifdef OPENSSL_NO_SSL2
-       meth=SSLv3_method();
+       if (tls1)
+               meth=TLSv1_method();
+       else
+       if (ssl3)
+               meth=SSLv3_method();
+       else
+               meth=SSLv23_method();
 #else
        meth=SSLv2_method();
 #endif
@@ -1147,9 +1148,7 @@ bad:
 #ifndef OPENSSL_NO_SRP
         if (srp_client_arg.srplogin)
                {
-               if (srp_lateuser) 
-                       SSL_CTX_set_srp_missing_srp_username_callback(c_ctx,missing_srp_username_callback);
-               else if (!SSL_CTX_set_srp_username(c_ctx, srp_client_arg.srplogin))
+               if (!SSL_CTX_set_srp_username(c_ctx, srp_client_arg.srplogin))
                        {
                        BIO_printf(bio_err,"Unable to set SRP username\n");
                        goto end;