Modernise 'selfsign.c' to use new X509_NAME code
[openssl.git] / demos / ssl / cli.cpp
index 2efe161d43830d75f050540e64131fced5390e80..daea2bd9c7afe36b3a1b42b73a119e8bb68810e4 100644 (file)
@@ -14,7 +14,6 @@
 #include <arpa/inet.h>
 #include <netdb.h>
 
-#include "rsa.h"       /* SSLeay stuff */
 #include <openssl/crypto.h>
 #include <openssl/x509.h>
 #include <openssl/pem.h>
@@ -97,11 +96,10 @@ void main ()
 
   err = SSL_write (ssl, "Hello World!", strlen("Hello World!"));  CHK_SSL(err);
   
-  shutdown (sd, 1);  /* Half close, send EOF to server. */
-  
   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. */