~ubuntu-branches/ubuntu/lucid/wpasupplicant/lucid-updates

« back to all changes in this revision

Viewing changes to eap_peap.c

  • Committer: Bazaar Package Importer
  • Author(s): Kel Modderman
  • Date: 2006-10-05 08:04:01 UTC
  • mfrom: (1.1.5 upstream) (3 etch)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20061005080401-r8lqlix4390yos7b
Tags: 0.5.5-2
* Update madwifi headers to latest SVN. (Closes: #388316)
* Remove failed attempt at action locking. [debian/functions.sh,
  debian/wpa_action.sh]
* Add hysteresis checking functions, to avoid "event loops" while
  using wpa-roam. [debian/functions.sh, debian/wpa_action.sh]
* Change of co-maintainer email address.
* Add ishex() function to functions.sh to determine wpa-psk value type in
  plaintext or hex. This effectively eliminates the need for the bogus and
  somewhat confusing wpa-passphrase contruct specific to our scripts and
  allows wpa-psk to work with either a 8 to 63 character long plaintext
  string or 64 character long hex string.
* Adjust README.modes to not refer to the redundant wpa-passphrase stuff.
* Add big fat NOTE about acceptable wpa-psk's to top of example gallery.
* Strip surrounding quotes from wpa-ssid if present, instead of just whining
  about them.
* Update email address in copyright blurb of functions.sh, ifupdown.sh and
  wpa_action.sh.  

Show diffs side-by-side

added added

removed removed

Lines of Context:
742
742
 
743
743
                        data->resuming = 0;
744
744
                }
 
745
 
 
746
                if (res == 2) {
 
747
                        /*
 
748
                         * Application data included in the handshake message.
 
749
                         */
 
750
                        free(data->pending_phase2_req);
 
751
                        data->pending_phase2_req = resp;
 
752
                        data->pending_phase2_req_len = *respDataLen;
 
753
                        resp = NULL;
 
754
                        *respDataLen = 0;
 
755
                        res = eap_peap_decrypt(sm, data, ret, req, pos, left,
 
756
                                               &resp, respDataLen);
 
757
                }
745
758
        }
746
759
 
747
760
        if (ret->methodState == METHOD_DONE) {
782
795
                free(data);
783
796
                return NULL;
784
797
        }
 
798
        if (data->phase2_priv && data->phase2_method &&
 
799
            data->phase2_method->init_for_reauth)
 
800
                data->phase2_method->init_for_reauth(sm, data->phase2_priv);
785
801
        data->phase2_success = 0;
786
802
        data->resuming = 1;
787
803
        sm->peap_done = FALSE;
793
809
                               size_t buflen, int verbose)
794
810
{
795
811
        struct eap_peap_data *data = priv;
796
 
        int len;
 
812
        int len, ret;
797
813
 
798
814
        len = eap_tls_status(sm, &data->ssl, buf, buflen, verbose);
799
815
        if (data->phase2_method) {
800
 
                len += snprintf(buf + len, buflen - len,
801
 
                                "EAP-PEAPv%d Phase2 method=%s\n",
802
 
                                data->peap_version, data->phase2_method->name);
 
816
                ret = snprintf(buf + len, buflen - len,
 
817
                               "EAP-PEAPv%d Phase2 method=%s\n",
 
818
                               data->peap_version, data->phase2_method->name);
 
819
                if (ret < 0 || (size_t) ret >= buflen - len)
 
820
                        return len;
 
821
                len += ret;
803
822
        }
804
823
        return len;
805
824
}