Initialize num properly.
[openssl.git] / apps / s_client.c
index 1e3bc391b59a01e67696e49f0f7332dc6c728222..f8c059a25ad5bbc1945d9c68d662b94f39aa3fce 100644 (file)
@@ -242,11 +242,11 @@ static int suppdata_cb(SSL *s, unsigned short supp_data_type,
 
 static int auth_suppdata_generate_cb(SSL *s, unsigned short supp_data_type,
                                     const unsigned char **out,
-                                    unsigned short *outlen, void *arg);
+                                    unsigned short *outlen, int *al, void *arg);
 
 static int authz_tlsext_generate_cb(SSL *s, unsigned short ext_type,
                                    const unsigned char **out, unsigned short *outlen,
-                                   void *arg);
+                                   int *al, void *arg);
 
 static int authz_tlsext_cb(SSL *s, unsigned short ext_type,
                           const unsigned char *in,
@@ -702,6 +702,7 @@ static char *jpake_secret = NULL;
        int crl_format = FORMAT_PEM;
        int crl_download = 0;
        STACK_OF(X509_CRL) *crls = NULL;
+       int sdebug = 0;
 
        meth=SSLv23_client_method();
 
@@ -874,6 +875,10 @@ static char *jpake_secret = NULL;
                else if (strcmp(*argv,"-trace") == 0)
                        c_msg=2;
 #endif
+               else if (strcmp(*argv,"-security_debug") == 0)
+                       { sdebug=1; }
+               else if (strcmp(*argv,"-security_debug_verbose") == 0)
+                       { sdebug=2; }
                else if (strcmp(*argv,"-showcerts") == 0)
                        c_showcerts=1;
                else if (strcmp(*argv,"-nbio_test") == 0)
@@ -1302,6 +1307,9 @@ bad:
                goto end;
                }
 
+       if (sdebug)
+               ssl_ctx_security_debug(ctx, bio_err, sdebug);
+
        if (vpm)
                SSL_CTX_set1_param(ctx, vpm);
 
@@ -2456,7 +2464,7 @@ static int authz_tlsext_cb(SSL *s, unsigned short ext_type,
 
 static int authz_tlsext_generate_cb(SSL *s, unsigned short ext_type,
                                    const unsigned char **out, unsigned short *outlen,
-                                   void *arg)
+                                   int *al, void *arg)
        {
        if (c_auth)
                {
@@ -2488,7 +2496,7 @@ static int suppdata_cb(SSL *s, unsigned short supp_data_type,
 
 static int auth_suppdata_generate_cb(SSL *s, unsigned short supp_data_type,
                                     const unsigned char **out,
-                                    unsigned short *outlen, void *arg)
+                                    unsigned short *outlen, int *al, void *arg)
        {
        if (c_auth && server_provided_client_authz && server_provided_server_authz)
                {