SSL_shutdown was done too early.
authorBodo Möller <bodo@openssl.org>
Sun, 1 Aug 1999 11:19:59 +0000 (11:19 +0000)
committerBodo Möller <bodo@openssl.org>
Sun, 1 Aug 1999 11:19:59 +0000 (11:19 +0000)
demos/ssl/cli.cpp

index bab4e47d67a88bec39d63f4fec41ce5b5f53bae1..b3d726961f5dee18fda170c1bf4b34fc10f7e379 100644 (file)
@@ -97,11 +97,10 @@ void main ()
 
   err = SSL_write (ssl, "Hello World!", strlen("Hello World!"));  CHK_SSL(err);
   
-  SSL_shutdown (ssl);  /* send SSL/TLS close_notify */
-  
   err = SSL_read (ssl, buf, sizeof(buf) - 1);                     CHK_SSL(err);
   buf[err] = '\0';
   printf ("Got %d chars:'%s'\n", err, buf);
+  SSL_shutdown (ssl);  /* send SSL/TLS close_notify */
 
   /* Clean up. */