Windows-specific addenum to "engage crypto/modes" commit #17716.
[openssl.git] / apps / s_cb.c
index fb33dee28720bbb50e2365da959f307f090329cd..41f789af485b0f4a0c7d58f3bd76294996c2f227 100644 (file)
@@ -260,7 +260,7 @@ int set_cert_key_stuff(SSL_CTX *ctx, X509 *cert, EVP_PKEY *key)
        }
 
 long MS_CALLBACK bio_dump_callback(BIO *bio, int cmd, const char *argp,
-       int argi, long argl, long ret)
+                                  int argi, long argl, long ret)
        {
        BIO *out;
 
@@ -269,15 +269,15 @@ long MS_CALLBACK bio_dump_callback(BIO *bio, int cmd, const char *argp,
 
        if (cmd == (BIO_CB_READ|BIO_CB_RETURN))
                {
-               BIO_printf(out,"read from %p [%p] (%d bytes => %ld (0x%lX))\n",
-                       (void *)bio,argp,argi,ret,ret);
+               BIO_printf(out,"read from %p [%p] (%lu bytes => %ld (0x%lX))\n",
+                       (void *)bio,argp,(unsigned long)argi,ret,ret);
                BIO_dump(out,argp,(int)ret);
                return(ret);
                }
        else if (cmd == (BIO_CB_WRITE|BIO_CB_RETURN))
                {
-               BIO_printf(out,"write to %p [%p] (%d bytes => %ld (0x%lX))\n",
-                       (void *)bio,argp,argi,ret,ret);
+               BIO_printf(out,"write to %p [%p] (%lu bytes => %ld (0x%lX))\n",
+                       (void *)bio,argp,(unsigned long)argi,ret,ret);
                BIO_dump(out,argp,(int)ret);
                }
        return(ret);
@@ -590,7 +590,7 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *
                        BIO_printf(bio, " ...");
                BIO_printf(bio, "\n");
                }
-       BIO_flush(bio);
+       (void)BIO_flush(bio);
        }
 
 void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type,
@@ -638,6 +638,11 @@ void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type,
                extname = "server ticket";
                break;
 
+#ifdef TLSEXT_TYPE_opaque_prf_input
+               case TLSEXT_TYPE_opaque_prf_input:
+               extname = "opaque PRF input";
+               break;
+#endif
 
                default:
                extname = "unknown";
@@ -648,6 +653,6 @@ void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type,
        BIO_printf(bio, "TLS %s extension \"%s\" (id=%d), len=%d\n",
                        client_server ? "server": "client",
                        extname, type, len);
-       BIO_dump(bio, data, len);
-       BIO_flush(bio);
+       BIO_dump(bio, (char *)data, len);
+       (void)BIO_flush(bio);
        }