GnuTLS: Fix compilation with newer GnuTLS versions
[libeap.git] / src / crypto / tls_gnutls.c
index db66ae1..05d6dd3 100644 (file)
@@ -35,8 +35,12 @@ int gnutls_ia_verify_endphase(gnutls_session_t session, char *checksum);
 #include "tls.h"
 
 
+#ifndef TLS_RANDOM_SIZE
 #define TLS_RANDOM_SIZE 32
+#endif
+#ifndef TLS_MASTER_SIZE
 #define TLS_MASTER_SIZE 48
+#endif
 
 
 #if LIBGNUTLS_VERSION_NUMBER < 0x010302
@@ -989,11 +993,13 @@ u8 * tls_connection_handshake(void *ssl_ctx, struct tls_connection *conn,
                        return NULL;
                }
 
+#ifdef CONFIG_GNUTLS_EXTRA
                if (conn->tls_ia && !gnutls_ia_handshake_p(conn->session)) {
                        wpa_printf(MSG_INFO, "TLS: No TLS/IA negotiation");
                        conn->failed++;
                        return NULL;
                }
+#endif /* CONFIG_GNUTLS_EXTRA */
 
                if (conn->tls_ia)
                        wpa_printf(MSG_DEBUG, "TLS: Start TLS/IA handshake");