don't prematurely shut down socket -- use SSL_shutdown
authorBodo Möller <bodo@openssl.org>
Sun, 1 Aug 1999 10:04:37 +0000 (10:04 +0000)
committerBodo Möller <bodo@openssl.org>
Sun, 1 Aug 1999 10:04:37 +0000 (10:04 +0000)
demos/ssl/cli.cpp

index 2efe161d43830d75f050540e64131fced5390e80..bab4e47d67a88bec39d63f4fec41ce5b5f53bae1 100644 (file)
@@ -97,7 +97,7 @@ void main ()
 
   err = SSL_write (ssl, "Hello World!", strlen("Hello World!"));  CHK_SSL(err);
   
-  shutdown (sd, 1);  /* Half close, send EOF to server. */
+  SSL_shutdown (ssl);  /* send SSL/TLS close_notify */
   
   err = SSL_read (ssl, buf, sizeof(buf) - 1);                     CHK_SSL(err);
   buf[err] = '\0';