Modernise 'selfsign.c' to use new X509_NAME code
[openssl.git] / demos / ssl / cli.cpp
index bab4e47d67a88bec39d63f4fec41ce5b5f53bae1..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);
   
-  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. */