Added defines around renegotiation code for SSL_SRV and SSL_CLI
diff --git a/library/ssl_tls.c b/library/ssl_tls.c
index 1205947..4654ea6 100644
--- a/library/ssl_tls.c
+++ b/library/ssl_tls.c
@@ -3971,6 +3971,7 @@
     return( ret );
 }
 
+#if defined(POLARSSL_SSL_SRV_C)
 /*
  * Write HelloRequest to request renegotiation on server
  */
@@ -3996,6 +3997,7 @@
 
     return( 0 );
 }
+#endif /* POLARSSL_SSL_SRV_C */
 
 /*
  * Actually renegotiate current connection, triggered by either:
@@ -4035,8 +4037,9 @@
  */
 int ssl_renegotiate( ssl_context *ssl )
 {
-    int ret;
+    int ret = POLARSSL_ERR_SSL_FEATURE_UNAVAILABLE;
 
+#if defined(POLARSSL_SSL_SRV_C)
     /* On server, just send the request */
     if( ssl->endpoint == SSL_IS_SERVER )
     {
@@ -4045,7 +4048,9 @@
 
         return( ssl_write_hello_request( ssl ) );
     }
+#endif /* POLARSSL_SSL_SRV_C */
 
+#if defined(POLARSSL_SSL_CLI_C)
     /*
      * On client, either start the renegotiation process or,
      * if already in progress, continue the handshake
@@ -4069,8 +4074,9 @@
             return( ret );
         }
     }
+#endif /* POLARSSL_SSL_CLI_C */
 
-    return( 0 );
+    return( ret );
 }
 
 /*