~ubuntu-branches/ubuntu/vivid/wpasupplicant/vivid

« back to all changes in this revision

Viewing changes to src/eap_common/eap_gpsk_common.h

  • Committer: Bazaar Package Importer
  • Author(s): Kel Modderman
  • Date: 2008-03-12 20:03:04 UTC
  • mfrom: (1.1.10 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20080312200304-4331y9wj46pdd34z
Tags: 0.6.3-1
* New upstream release.
* Drop patches applied upstream:
  - debian/patches/30_wpa_gui_qt4_eventhistoryui_rework.patch
  - debian/patches/31_wpa_gui_qt4_eventhistory_always_scrollbar.patch
  - debian/patches/32_wpa_gui_qt4_eventhistory_scroll_with_events.patch
  - debian/patches/40_dbus_ssid_data.patch
* Tidy up the clean target of debian/rules. Now that the madwifi headers are
  handled differently we no longer need to do any cleanup.
* Fix formatting error in debian/ifupdown/wpa_action.8 to make lintian
  quieter.
* Add patch to fix formatting errors in manpages build from sgml source. Use
  <emphasis> tags to hightlight keywords instead of surrounding them in
  strong quotes.
  - debian/patches/41_manpage_format_fixes.patch
* wpasupplicant binary package no longer suggests pcscd, guessnet, iproute
  or wireless-tools, nor does it recommend dhcp3-client. These are not
  needed.
* Add debian/patches/10_silence_siocsiwauth_icotl_failure.patch to disable
  ioctl failure messages that occur under normal conditions.
* Cherry pick two upstream git commits concerning the dbus interface:
  - debian/patches/11_avoid_dbus_version_namespace.patch
  - debian/patches/12_fix_potential_use_after_free.patch
* Add debian/patches/42_manpage_explain_available_drivers.patch to explain
  that not all of the driver backends are available in the provided
  wpa_supplicant binary, and that the canonical list of supported driver
  backends can be retrieved from the wpa_supplicant -h (help) output.
  (Closes: #466910)
* Add debian/patches/20_wpa_gui_qt4_disable_link_prl.patch to remove
  link_prl CONFIG compile flag added by qmake-qt4 >= 4.3.4-2 to avoid excess
  linking.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * EAP server/peer: EAP-GPSK shared routines
 
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
#ifndef EAP_GPSK_COMMON_H
 
16
#define EAP_GPSK_COMMON_H
 
17
 
 
18
#define EAP_GPSK_OPCODE_GPSK_1 1
 
19
#define EAP_GPSK_OPCODE_GPSK_2 2
 
20
#define EAP_GPSK_OPCODE_GPSK_3 3
 
21
#define EAP_GPSK_OPCODE_GPSK_4 4
 
22
#define EAP_GPSK_OPCODE_FAIL 5
 
23
#define EAP_GPSK_OPCODE_PROTECTED_FAIL 6
 
24
 
 
25
/* Failure-Code in GPSK-Fail and GPSK-Protected-Fail */
 
26
#define EAP_GPSK_FAIL_PSK_NOT_FOUND 0x00000001
 
27
#define EAP_GPSK_FAIL_AUTHENTICATION_FAILURE 0x00000002
 
28
#define EAP_GPSK_FAIL_AUTHORIZATION_FAILURE 0x00000003
 
29
 
 
30
#define EAP_GPSK_RAND_LEN 32
 
31
#define EAP_GPSK_MAX_SK_LEN 32
 
32
#define EAP_GPSK_MAX_PK_LEN 32
 
33
#define EAP_GPSK_MAX_MIC_LEN 32
 
34
 
 
35
#define EAP_GPSK_VENDOR_IETF            0x00000000
 
36
#define EAP_GPSK_CIPHER_RESERVED        0x000000
 
37
#define EAP_GPSK_CIPHER_AES             0x000001
 
38
#define EAP_GPSK_CIPHER_SHA256          0x000002
 
39
 
 
40
 
 
41
#ifdef _MSC_VER
 
42
#pragma pack(push, 1)
 
43
#endif /* _MSC_VER */
 
44
 
 
45
struct eap_gpsk_csuite {
 
46
        u8 vendor[4];
 
47
        u8 specifier[2];
 
48
} STRUCT_PACKED;
 
49
 
 
50
#ifdef _MSC_VER
 
51
#pragma pack(pop)
 
52
#endif /* _MSC_VER */
 
53
 
 
54
int eap_gpsk_supported_ciphersuite(int vendor, int specifier);
 
55
int eap_gpsk_derive_keys(const u8 *psk, size_t psk_len, int vendor,
 
56
                         int specifier,
 
57
                         const u8 *rand_client, const u8 *rand_server,
 
58
                         const u8 *id_client, size_t id_client_len,
 
59
                         const u8 *id_server, size_t id_server_len,
 
60
                         u8 *msk, u8 *emsk, u8 *sk, size_t *sk_len,
 
61
                         u8 *pk, size_t *pk_len);
 
62
size_t eap_gpsk_mic_len(int vendor, int specifier);
 
63
int eap_gpsk_compute_mic(const u8 *sk, size_t sk_len, int vendor,
 
64
                         int specifier, const u8 *data, size_t len, u8 *mic);
 
65
 
 
66
#endif /* EAP_GPSK_COMMON_H */