~ubuntu-branches/ubuntu/natty/freeradius/natty-updates

« back to all changes in this revision

Viewing changes to src/modules/rlm_eap/types/rlm_eap_peap/rlm_eap_peap.c

  • Committer: Bazaar Package Importer
  • Author(s): Jeremie Corbier
  • Date: 2006-07-08 19:41:05 UTC
  • mto: (3.1.8 edgy) (4.1.3 sid) (1.1.14 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20060708194105-bxbr4e6m4dfw2x4x
Tags: upstream-1.1.2
ImportĀ upstreamĀ versionĀ 1.1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * rlm_eap_peap.c  contains the interfaces that are called from eap
3
3
 *
4
 
 * Version:     $Id: rlm_eap_peap.c,v 1.5 2004/02/26 19:04:31 aland Exp $
 
4
 * Version:     $Id: rlm_eap_peap.c,v 1.5.4.1 2006/02/06 16:23:56 nbk Exp $
5
5
 *
6
6
 *   This program is free software; you can redistribute it and/or modify
7
7
 *   it under the terms of the GNU General Public License as published by
21
21
 */
22
22
 
23
23
#include "autoconf.h"
24
 
#include "eap_tls.h"
25
24
#include "eap_peap.h"
26
25
 
27
26
typedef struct rlm_eap_peap_t {
131
130
 
132
131
        pairfree(&t->username);
133
132
        pairfree(&t->state);
 
133
        pairfree(&t->accept_vps);
134
134
 
135
135
        free(t);
136
136
}
186
186
                        eap_packet.length[1] = EAP_HEADER_LEN + 1;
187
187
                        eap_packet.data[0] = PW_EAP_IDENTITY;
188
188
 
189
 
                        record_plus(&tls_session->clean_in,
190
 
                                    &eap_packet, sizeof(eap_packet));
191
 
 
 
189
                        (tls_session->record_plus)(&tls_session->clean_in,
 
190
                                                  &eap_packet, sizeof(eap_packet));
 
191
                        
192
192
                        tls_handshake_send(tls_session);
193
 
                        record_init(&tls_session->clean_in);
 
193
                        (tls_session->record_init)(&tls_session->clean_in);
194
194
                }
195
195
                eaptls_request(handler->eap_ds, tls_session);
196
196
                DEBUG2("  rlm_eap_peap: EAPTLS_SUCCESS");
251
251
 
252
252
        case RLM_MODULE_OK:
253
253
                eaptls_success(handler->eap_ds, 0);
 
254
 
 
255
                /*
 
256
                 *      Move the saved VP's from the Access-Accept to
 
257
                 *      our Access-Accept.
 
258
                 */
 
259
                if (((peap_tunnel_t *) tls_session->opaque)->accept_vps) {
 
260
                        DEBUG2("  Using saved attributes from the original Access-Accept");
 
261
                }
 
262
                pairadd(&handler->request->reply->vps,
 
263
                        ((peap_tunnel_t *) tls_session->opaque)->accept_vps);
 
264
                ((peap_tunnel_t *) tls_session->opaque)->accept_vps = NULL;
 
265
 
254
266
                eaptls_gen_mppe_keys(&handler->request->reply->vps,
255
267
                                     tls_session->ssl,
256
268
                                     "client EAP encryption");
 
269
 
257
270
                return 1;
258
271
 
259
272
                /*