tlsv1_server_read.c (209158) | tlsv1_server_read.c (214734) |
---|---|
1/* 2 * TLSv1 server - read handshake message 3 * Copyright (c) 2006-2007, Jouni Malinen <j@w1.fi> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License version 2 as 7 * published by the Free Software Foundation. 8 * 9 * Alternatively, this software may be distributed under the terms of BSD 10 * license. 11 * 12 * See README and COPYING for more details. 13 */ 14 15#include "includes.h" 16 17#include "common.h" | 1/* 2 * TLSv1 server - read handshake message 3 * Copyright (c) 2006-2007, Jouni Malinen <j@w1.fi> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License version 2 as 7 * published by the Free Software Foundation. 8 * 9 * Alternatively, this software may be distributed under the terms of BSD 10 * license. 11 * 12 * See README and COPYING for more details. 13 */ 14 15#include "includes.h" 16 17#include "common.h" |
18#include "md5.h" 19#include "sha1.h" | 18#include "crypto/md5.h" 19#include "crypto/sha1.h" 20#include "crypto/tls.h" |
20#include "x509v3.h" | 21#include "x509v3.h" |
21#include "tls.h" | |
22#include "tlsv1_common.h" 23#include "tlsv1_record.h" 24#include "tlsv1_server.h" 25#include "tlsv1_server_i.h" 26 27 28static int tls_process_client_key_exchange(struct tlsv1_server *conn, u8 ct, 29 const u8 *in_data, size_t *in_len); --- 532 unchanged lines hidden (view full) --- 562 563 return 0; 564} 565 566 567static int tls_process_client_key_exchange_dh_anon( 568 struct tlsv1_server *conn, const u8 *pos, const u8 *end) 569{ | 22#include "tlsv1_common.h" 23#include "tlsv1_record.h" 24#include "tlsv1_server.h" 25#include "tlsv1_server_i.h" 26 27 28static int tls_process_client_key_exchange(struct tlsv1_server *conn, u8 ct, 29 const u8 *in_data, size_t *in_len); --- 532 unchanged lines hidden (view full) --- 562 563 return 0; 564} 565 566 567static int tls_process_client_key_exchange_dh_anon( 568 struct tlsv1_server *conn, const u8 *pos, const u8 *end) 569{ |
570#ifdef EAP_FAST | |
571 const u8 *dh_yc; 572 u16 dh_yc_len; 573 u8 *shared; 574 size_t shared_len; 575 int res; 576 577 /* 578 * struct { --- 81 unchanged lines hidden (view full) --- 660 if (res) { 661 wpa_printf(MSG_DEBUG, "TLSv1: Failed to derive keys"); 662 tlsv1_server_alert(conn, TLS_ALERT_LEVEL_FATAL, 663 TLS_ALERT_INTERNAL_ERROR); 664 return -1; 665 } 666 667 return 0; | 570 const u8 *dh_yc; 571 u16 dh_yc_len; 572 u8 *shared; 573 size_t shared_len; 574 int res; 575 576 /* 577 * struct { --- 81 unchanged lines hidden (view full) --- 659 if (res) { 660 wpa_printf(MSG_DEBUG, "TLSv1: Failed to derive keys"); 661 tlsv1_server_alert(conn, TLS_ALERT_LEVEL_FATAL, 662 TLS_ALERT_INTERNAL_ERROR); 663 return -1; 664 } 665 666 return 0; |
668#else /* EAP_FAST */ 669 return -1; 670#endif /* EAP_FAST */ | |
671} 672 673 674static int tls_process_client_key_exchange(struct tlsv1_server *conn, u8 ct, 675 const u8 *in_data, size_t *in_len) 676{ 677 const u8 *pos, *end; 678 size_t left, len; --- 460 unchanged lines hidden --- | 667} 668 669 670static int tls_process_client_key_exchange(struct tlsv1_server *conn, u8 ct, 671 const u8 *in_data, size_t *in_len) 672{ 673 const u8 *pos, *end; 674 size_t left, len; --- 460 unchanged lines hidden --- |