2005-12-09 Dan Williams <dcbw@redhat.com>
* libnm-util/* - More fixups - Remove cipher-manager.* because we don't need it - Forgot to add gnome-keyring-md5 files to compile list git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1154 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2005-12-09 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
|
* libnm-util/*
|
||||||
|
- More fixups
|
||||||
|
- Remove cipher-manager.* because we don't need it
|
||||||
|
- Forgot to add gnome-keyring-md5 files to compile list
|
||||||
|
|
||||||
2005-12-09 Dan Williams <dcbw@redhat.com>
|
2005-12-09 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
* libnm-util/*
|
* libnm-util/*
|
||||||
|
@@ -11,8 +11,6 @@ endif
|
|||||||
libnm_util_la_SOURCES= \
|
libnm_util_la_SOURCES= \
|
||||||
cipher.c \
|
cipher.c \
|
||||||
cipher.h \
|
cipher.h \
|
||||||
cipher-manager.c \
|
|
||||||
cipher-manager.h \
|
|
||||||
cipher-wep-hex.c \
|
cipher-wep-hex.c \
|
||||||
cipher-wep-hex.h \
|
cipher-wep-hex.h \
|
||||||
cipher-wep-passphrase.c \
|
cipher-wep-passphrase.c \
|
||||||
@@ -23,6 +21,8 @@ libnm_util_la_SOURCES= \
|
|||||||
cipher-wpa-psk-hex.h \
|
cipher-wpa-psk-hex.h \
|
||||||
cipher-wpa-psk-passphrase.c \
|
cipher-wpa-psk-passphrase.c \
|
||||||
cipher-wpa-psk-passphrase.h \
|
cipher-wpa-psk-passphrase.h \
|
||||||
|
gnome-keyring-md5.c \
|
||||||
|
gnome-keyring-md5.h \
|
||||||
sha1.c \
|
sha1.c \
|
||||||
sha1.h
|
sha1.h
|
||||||
|
|
||||||
@@ -38,7 +38,13 @@ endif
|
|||||||
|
|
||||||
libnm_util_includedir=$(includedir)/NetworkManager
|
libnm_util_includedir=$(includedir)/NetworkManager
|
||||||
|
|
||||||
libnm_util_include_HEADERS = cipher-manager.h cipher.h
|
libnm_util_include_HEADERS = \
|
||||||
|
cipher.h \
|
||||||
|
cipher-wep-hex.h \
|
||||||
|
cipher-wep-passphrase.h \
|
||||||
|
cipher-wep-ascii.h \
|
||||||
|
cipher-wpa-psk-hex.h \
|
||||||
|
cipher-wpa-psk-passphrase.h
|
||||||
|
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
pkgconfig_DATA = libnm-util.pc
|
pkgconfig_DATA = libnm-util.pc
|
||||||
|
@@ -1,59 +0,0 @@
|
|||||||
/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
|
|
||||||
*
|
|
||||||
* Dan Williams <dcbw@redhat.com>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*
|
|
||||||
* (C) Copyright 2005 Red Hat, Inc.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <glib.h>
|
|
||||||
|
|
||||||
#include "cipher-manager.h"
|
|
||||||
#include "cipher.h"
|
|
||||||
|
|
||||||
struct CipherManager
|
|
||||||
{
|
|
||||||
GSList * ciphers;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* Singleton instance of the Cipher Manager */
|
|
||||||
static CipherManager * cipher_manager = NULL;
|
|
||||||
|
|
||||||
|
|
||||||
CipherManager * cipher_manager_get_instance (void)
|
|
||||||
{
|
|
||||||
static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
|
|
||||||
|
|
||||||
g_static_mutex_lock (&mutex);
|
|
||||||
if (!cipher_manager)
|
|
||||||
cipher_manager = g_malloc0 (sizeof (CipherManager));
|
|
||||||
g_static_mutex_unlock (&mutex);
|
|
||||||
|
|
||||||
return cipher_manager;
|
|
||||||
}
|
|
||||||
|
|
||||||
int cipher_manager_register_cipher (CipherManager *cm, IEEE_802_11_Cipher *cipher)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail (cm != NULL, -1);
|
|
||||||
g_return_val_if_fail (cipher != NULL, -1);
|
|
||||||
|
|
||||||
ieee_802_11_cipher_ref (cipher);
|
|
||||||
cm->ciphers = g_slist_prepend (cm->ciphers, cipher);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@@ -1,35 +0,0 @@
|
|||||||
/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
|
|
||||||
*
|
|
||||||
* Dan Williams <dcbw@redhat.com>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
*
|
|
||||||
* (C) Copyright 2005 Red Hat, Inc.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CIPHER_MANAGER_H
|
|
||||||
#define CIPHER_MANAGER_H
|
|
||||||
|
|
||||||
#include "cipher.h"
|
|
||||||
|
|
||||||
typedef struct CipherManager CipherManager;
|
|
||||||
|
|
||||||
|
|
||||||
CipherManager * cipher_manager_get_instance (void);
|
|
||||||
|
|
||||||
int cipher_manager_register_cipher (CipherManager *cm, IEEE_802_11_Cipher *cipher);
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* CIPHER_MANAGER_H */
|
|
@@ -22,15 +22,9 @@
|
|||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <iwlib.h>
|
#include <iwlib.h>
|
||||||
|
|
||||||
#include "cipher-wep-ascii.h"
|
|
||||||
#include "cipher.h"
|
#include "cipher.h"
|
||||||
#include "cipher-private.h"
|
#include "cipher-private.h"
|
||||||
#include "cipher-manager.h"
|
#include "cipher-wep-ascii.h"
|
||||||
#ifdef HAVE_GCRYPT
|
|
||||||
#include <gcrypt.h>
|
|
||||||
#else
|
|
||||||
#include "gnome-keyring-md5.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
static char * cipher_wep128_ascii_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input);
|
static char * cipher_wep128_ascii_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input);
|
||||||
@@ -60,9 +54,8 @@ static char * cipher_wep_ascii_hash_func (IEEE_802_11_Cipher *cipher, const char
|
|||||||
|
|
||||||
|
|
||||||
#define WEP128_ASCII_INPUT_SIZE 13
|
#define WEP128_ASCII_INPUT_SIZE 13
|
||||||
int cipher_wep128_ascii_register (void)
|
IEEE_802_11_Cipher * cipher_wep128_ascii_new (void)
|
||||||
{
|
{
|
||||||
CipherManager * cm = cipher_manager_get_instance ();
|
|
||||||
IEEE_802_11_Cipher * cipher = g_malloc0 (sizeof (IEEE_802_11_Cipher));
|
IEEE_802_11_Cipher * cipher = g_malloc0 (sizeof (IEEE_802_11_Cipher));
|
||||||
|
|
||||||
cipher->we_cipher = IW_AUTH_CIPHER_WEP104;
|
cipher->we_cipher = IW_AUTH_CIPHER_WEP104;
|
||||||
@@ -70,8 +63,9 @@ int cipher_wep128_ascii_register (void)
|
|||||||
cipher->input_max = WEP128_ASCII_INPUT_SIZE;
|
cipher->input_max = WEP128_ASCII_INPUT_SIZE;
|
||||||
cipher->cipher_hash_func = cipher_wep128_ascii_hash_func;
|
cipher->cipher_hash_func = cipher_wep128_ascii_hash_func;
|
||||||
cipher->cipher_input_validate_func = cipher_default_validate_func;
|
cipher->cipher_input_validate_func = cipher_default_validate_func;
|
||||||
|
ieee_802_11_cipher_ref (cipher);
|
||||||
|
|
||||||
return cipher_manager_register_cipher (cm, cipher);
|
return cipher;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char * cipher_wep128_ascii_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input)
|
static char * cipher_wep128_ascii_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input)
|
||||||
@@ -84,9 +78,8 @@ static char * cipher_wep128_ascii_hash_func (IEEE_802_11_Cipher *cipher, const c
|
|||||||
|
|
||||||
|
|
||||||
#define WEP64_ASCII_INPUT_SIZE 5
|
#define WEP64_ASCII_INPUT_SIZE 5
|
||||||
int cipher_wep64_ascii_register (void)
|
IEEE_802_11_Cipher * cipher_wep64_ascii_new (void)
|
||||||
{
|
{
|
||||||
CipherManager * cm = cipher_manager_get_instance ();
|
|
||||||
IEEE_802_11_Cipher * cipher = g_malloc0 (sizeof (IEEE_802_11_Cipher));
|
IEEE_802_11_Cipher * cipher = g_malloc0 (sizeof (IEEE_802_11_Cipher));
|
||||||
|
|
||||||
cipher->we_cipher = IW_AUTH_CIPHER_WEP40;
|
cipher->we_cipher = IW_AUTH_CIPHER_WEP40;
|
||||||
@@ -94,8 +87,9 @@ int cipher_wep64_ascii_register (void)
|
|||||||
cipher->input_max = WEP64_ASCII_INPUT_SIZE;
|
cipher->input_max = WEP64_ASCII_INPUT_SIZE;
|
||||||
cipher->cipher_hash_func = cipher_wep64_ascii_hash_func;
|
cipher->cipher_hash_func = cipher_wep64_ascii_hash_func;
|
||||||
cipher->cipher_input_validate_func = cipher_default_validate_func;
|
cipher->cipher_input_validate_func = cipher_default_validate_func;
|
||||||
|
ieee_802_11_cipher_ref (cipher);
|
||||||
|
|
||||||
return cipher_manager_register_cipher (cm, cipher);
|
return cipher;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char * cipher_wep64_ascii_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input)
|
static char * cipher_wep64_ascii_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input)
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
#ifndef CIPHER_WEP_ASCII_H
|
#ifndef CIPHER_WEP_ASCII_H
|
||||||
#define CIPHER_WEP_ASCII_H
|
#define CIPHER_WEP_ASCII_H
|
||||||
|
|
||||||
int cipher_wep128_ascii_register (void);
|
IEEE_802_11_Cipher * cipher_wep128_ascii_new (void);
|
||||||
int cipher_wep64_ascii_register (void);
|
IEEE_802_11_Cipher * cipher_wep64_ascii_new (void);
|
||||||
|
|
||||||
#endif /* CIPHER_WEP_ASCII_H */
|
#endif /* CIPHER_WEP_ASCII_H */
|
||||||
|
@@ -22,10 +22,9 @@
|
|||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <iwlib.h>
|
#include <iwlib.h>
|
||||||
|
|
||||||
#include "cipher-wep-hex.h"
|
|
||||||
#include "cipher.h"
|
#include "cipher.h"
|
||||||
#include "cipher-private.h"
|
#include "cipher-private.h"
|
||||||
#include "cipher-manager.h"
|
#include "cipher-wep-hex.h"
|
||||||
|
|
||||||
|
|
||||||
static char * cipher_wep128_hex_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input);
|
static char * cipher_wep128_hex_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input);
|
||||||
@@ -117,9 +116,8 @@ static char * cipher_wep_hex_convert_func (IEEE_802_11_Cipher *cipher, const cha
|
|||||||
|
|
||||||
|
|
||||||
#define WEP128_HEX_INPUT_SIZE 26
|
#define WEP128_HEX_INPUT_SIZE 26
|
||||||
int cipher_wep128_hex_register (void)
|
IEEE_802_11_Cipher * cipher_wep128_hex_new (void)
|
||||||
{
|
{
|
||||||
CipherManager * cm = cipher_manager_get_instance ();
|
|
||||||
IEEE_802_11_Cipher * cipher = g_malloc0 (sizeof (IEEE_802_11_Cipher));
|
IEEE_802_11_Cipher * cipher = g_malloc0 (sizeof (IEEE_802_11_Cipher));
|
||||||
|
|
||||||
cipher->we_cipher = IW_AUTH_CIPHER_WEP104;
|
cipher->we_cipher = IW_AUTH_CIPHER_WEP104;
|
||||||
@@ -127,8 +125,9 @@ int cipher_wep128_hex_register (void)
|
|||||||
cipher->input_max = WEP128_HEX_INPUT_SIZE;
|
cipher->input_max = WEP128_HEX_INPUT_SIZE;
|
||||||
cipher->cipher_hash_func = cipher_wep128_hex_hash_func;
|
cipher->cipher_hash_func = cipher_wep128_hex_hash_func;
|
||||||
cipher->cipher_input_validate_func = cipher_default_validate_func;
|
cipher->cipher_input_validate_func = cipher_default_validate_func;
|
||||||
|
ieee_802_11_cipher_ref (cipher);
|
||||||
|
|
||||||
return cipher_manager_register_cipher (cm, cipher);
|
return cipher;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char * cipher_wep128_hex_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input)
|
static char * cipher_wep128_hex_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input)
|
||||||
@@ -141,9 +140,8 @@ static char * cipher_wep128_hex_hash_func (IEEE_802_11_Cipher *cipher, const cha
|
|||||||
|
|
||||||
|
|
||||||
#define WEP64_HEX_INPUT_SIZE 10
|
#define WEP64_HEX_INPUT_SIZE 10
|
||||||
int cipher_wep64_hex_register (void)
|
IEEE_802_11_Cipher * cipher_wep64_hex_new (void)
|
||||||
{
|
{
|
||||||
CipherManager * cm = cipher_manager_get_instance ();
|
|
||||||
IEEE_802_11_Cipher * cipher = g_malloc0 (sizeof (IEEE_802_11_Cipher));
|
IEEE_802_11_Cipher * cipher = g_malloc0 (sizeof (IEEE_802_11_Cipher));
|
||||||
|
|
||||||
cipher->we_cipher = IW_AUTH_CIPHER_WEP40;
|
cipher->we_cipher = IW_AUTH_CIPHER_WEP40;
|
||||||
@@ -151,8 +149,9 @@ int cipher_wep64_hex_register (void)
|
|||||||
cipher->input_max = WEP64_HEX_INPUT_SIZE;
|
cipher->input_max = WEP64_HEX_INPUT_SIZE;
|
||||||
cipher->cipher_hash_func = cipher_wep64_hex_hash_func;
|
cipher->cipher_hash_func = cipher_wep64_hex_hash_func;
|
||||||
cipher->cipher_input_validate_func = cipher_default_validate_func;
|
cipher->cipher_input_validate_func = cipher_default_validate_func;
|
||||||
|
ieee_802_11_cipher_ref (cipher);
|
||||||
|
|
||||||
return cipher_manager_register_cipher (cm, cipher);
|
return cipher;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char * cipher_wep64_hex_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input)
|
static char * cipher_wep64_hex_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input)
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
#ifndef CIPHER_WEP_HEX_H
|
#ifndef CIPHER_WEP_HEX_H
|
||||||
#define CIPHER_WEP_HEX_H
|
#define CIPHER_WEP_HEX_H
|
||||||
|
|
||||||
int cipher_wep128_hex_register (void);
|
IEEE_802_11_Cipher * cipher_wep128_hex_new (void);
|
||||||
int cipher_wep64_hex_register (void);
|
IEEE_802_11_Cipher * cipher_wep64_hex_new (void);
|
||||||
|
|
||||||
#endif /* CIPHER_WEP_HEX_H */
|
#endif /* CIPHER_WEP_HEX_H */
|
||||||
|
@@ -22,10 +22,10 @@
|
|||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <iwlib.h>
|
#include <iwlib.h>
|
||||||
|
|
||||||
#include "cipher-wep-passphrase.h"
|
|
||||||
#include "cipher.h"
|
#include "cipher.h"
|
||||||
#include "cipher-private.h"
|
#include "cipher-private.h"
|
||||||
#include "cipher-manager.h"
|
#include "cipher-wep-passphrase.h"
|
||||||
|
|
||||||
#ifdef HAVE_GCRYPT
|
#ifdef HAVE_GCRYPT
|
||||||
#include <gcrypt.h>
|
#include <gcrypt.h>
|
||||||
#else
|
#else
|
||||||
@@ -98,18 +98,18 @@ static char * cipher_wep_passphrase_hash_func (IEEE_802_11_Cipher *cipher, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int cipher_wep128_passphrase_register (void)
|
IEEE_802_11_Cipher * cipher_wep128_passphrase_new (void)
|
||||||
{
|
{
|
||||||
CipherManager * cm = cipher_manager_get_instance ();
|
|
||||||
IEEE_802_11_Cipher * cipher = g_malloc0 (sizeof (IEEE_802_11_Cipher));
|
IEEE_802_11_Cipher * cipher = g_malloc0 (sizeof (IEEE_802_11_Cipher));
|
||||||
|
|
||||||
cipher->we_cipher = IW_AUTH_CIPHER_WEP104;
|
cipher->we_cipher = IW_AUTH_CIPHER_WEP104;
|
||||||
cipher->input_min = 0; /* What _is_ the min, really? */
|
cipher->input_min = 1; /* What _is_ the min, really? */
|
||||||
cipher->input_max = 64;
|
cipher->input_max = 64;
|
||||||
cipher->cipher_hash_func = cipher_wep128_passphrase_hash_func;
|
cipher->cipher_hash_func = cipher_wep128_passphrase_hash_func;
|
||||||
cipher->cipher_input_validate_func = cipher_default_validate_func;
|
cipher->cipher_input_validate_func = cipher_default_validate_func;
|
||||||
|
ieee_802_11_cipher_ref (cipher);
|
||||||
|
|
||||||
return cipher_manager_register_cipher (cm, cipher);
|
return cipher;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char * cipher_wep128_passphrase_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input)
|
static char * cipher_wep128_passphrase_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input)
|
||||||
@@ -120,9 +120,8 @@ static char * cipher_wep128_passphrase_hash_func (IEEE_802_11_Cipher *cipher, co
|
|||||||
return cipher_wep_passphrase_hash_func (cipher, input, 26);
|
return cipher_wep_passphrase_hash_func (cipher, input, 26);
|
||||||
}
|
}
|
||||||
|
|
||||||
int cipher_wep64_passphrase_register (void)
|
IEEE_802_11_Cipher * cipher_wep64_passphrase_new (void)
|
||||||
{
|
{
|
||||||
CipherManager * cm = cipher_manager_get_instance ();
|
|
||||||
IEEE_802_11_Cipher * cipher = g_malloc0 (sizeof (IEEE_802_11_Cipher));
|
IEEE_802_11_Cipher * cipher = g_malloc0 (sizeof (IEEE_802_11_Cipher));
|
||||||
|
|
||||||
cipher->we_cipher = IW_AUTH_CIPHER_WEP40;
|
cipher->we_cipher = IW_AUTH_CIPHER_WEP40;
|
||||||
@@ -130,8 +129,9 @@ int cipher_wep64_passphrase_register (void)
|
|||||||
cipher->input_max = 64;
|
cipher->input_max = 64;
|
||||||
cipher->cipher_hash_func = cipher_wep64_passphrase_hash_func;
|
cipher->cipher_hash_func = cipher_wep64_passphrase_hash_func;
|
||||||
cipher->cipher_input_validate_func = cipher_default_validate_func;
|
cipher->cipher_input_validate_func = cipher_default_validate_func;
|
||||||
|
ieee_802_11_cipher_ref (cipher);
|
||||||
|
|
||||||
return cipher_manager_register_cipher (cm, cipher);
|
return cipher;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char * cipher_wep64_passphrase_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input)
|
static char * cipher_wep64_passphrase_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input)
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
#ifndef CIPHER_WEP_PASSPHRASE_H
|
#ifndef CIPHER_WEP_PASSPHRASE_H
|
||||||
#define CIPHER_WEP_PASSPHRASE_H
|
#define CIPHER_WEP_PASSPHRASE_H
|
||||||
|
|
||||||
int cipher_wep128_passphrase_register (void);
|
IEEE_802_11_Cipher * cipher_wep128_passphrase_new (void);
|
||||||
int cipher_wep64_passphrase_register (void);
|
IEEE_802_11_Cipher * cipher_wep64_passphrase_new (void);
|
||||||
|
|
||||||
#endif /* CIPHER_WEP_PASSPHRASE_H */
|
#endif /* CIPHER_WEP_PASSPHRASE_H */
|
||||||
|
@@ -22,10 +22,9 @@
|
|||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <iwlib.h>
|
#include <iwlib.h>
|
||||||
|
|
||||||
#include "cipher-wpa-psk-hex.h"
|
|
||||||
#include "cipher.h"
|
#include "cipher.h"
|
||||||
#include "cipher-private.h"
|
#include "cipher-private.h"
|
||||||
#include "cipher-manager.h"
|
#include "cipher-wpa-psk-hex.h"
|
||||||
|
|
||||||
|
|
||||||
static char * cipher_wpa_psk_hex_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input);
|
static char * cipher_wpa_psk_hex_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input);
|
||||||
@@ -75,9 +74,8 @@ static int hexstr2bin(const char *hex, char *buf, size_t len)
|
|||||||
|
|
||||||
/* End from hostap */
|
/* End from hostap */
|
||||||
|
|
||||||
int cipher_wpa_psk_hex_register (void)
|
IEEE_802_11_Cipher * cipher_wpa_psk_hex_new (void)
|
||||||
{
|
{
|
||||||
CipherManager * cm = cipher_manager_get_instance ();
|
|
||||||
IEEE_802_11_Cipher * cipher = g_malloc0 (sizeof (IEEE_802_11_Cipher));
|
IEEE_802_11_Cipher * cipher = g_malloc0 (sizeof (IEEE_802_11_Cipher));
|
||||||
|
|
||||||
cipher->we_cipher = IW_AUTH_CIPHER_TKIP;
|
cipher->we_cipher = IW_AUTH_CIPHER_TKIP;
|
||||||
@@ -85,8 +83,9 @@ int cipher_wpa_psk_hex_register (void)
|
|||||||
cipher->input_max = WPA_PMK_LEN * 2;
|
cipher->input_max = WPA_PMK_LEN * 2;
|
||||||
cipher->cipher_hash_func = cipher_wpa_psk_hex_hash_func;
|
cipher->cipher_hash_func = cipher_wpa_psk_hex_hash_func;
|
||||||
cipher->cipher_input_validate_func = cipher_default_validate_func;
|
cipher->cipher_input_validate_func = cipher_default_validate_func;
|
||||||
|
ieee_802_11_cipher_ref (cipher);
|
||||||
|
|
||||||
return cipher_manager_register_cipher (cm, cipher);
|
return cipher;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char * cipher_wpa_psk_hex_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input)
|
static char * cipher_wpa_psk_hex_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input)
|
||||||
|
@@ -24,6 +24,6 @@
|
|||||||
|
|
||||||
#define WPA_PMK_LEN 32
|
#define WPA_PMK_LEN 32
|
||||||
|
|
||||||
int cipher_wpa_psk_hex_register (void);
|
IEEE_802_11_Cipher * cipher_wpa_psk_hex_new (void);
|
||||||
|
|
||||||
#endif /* CIPHER_WPA_PSK_HEX_H */
|
#endif /* CIPHER_WPA_PSK_HEX_H */
|
||||||
|
@@ -22,24 +22,18 @@
|
|||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <iwlib.h>
|
#include <iwlib.h>
|
||||||
|
|
||||||
#include "cipher-wpa-psk-passphrase.h"
|
|
||||||
#include "cipher-wpa-psk-hex.h"
|
|
||||||
#include "cipher.h"
|
#include "cipher.h"
|
||||||
#include "cipher-private.h"
|
#include "cipher-private.h"
|
||||||
#include "cipher-manager.h"
|
#include "cipher-wpa-psk-hex.h"
|
||||||
|
#include "cipher-wpa-psk-passphrase.h"
|
||||||
#include "sha1.h"
|
#include "sha1.h"
|
||||||
|
|
||||||
|
|
||||||
static char * cipher_wpa_psk_passphrase_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input);
|
static char * cipher_wpa_psk_passphrase_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input);
|
||||||
|
|
||||||
|
|
||||||
/* From hostap, Copyright (c) 2002-2005, Jouni Malinen <jkmaline@cc.hut.fi> */
|
IEEE_802_11_Cipher * cipher_wpa_psk_passphrase_new (void)
|
||||||
|
|
||||||
/* End from hostap */
|
|
||||||
|
|
||||||
int cipher_wpa_psk_passphrase_register (void)
|
|
||||||
{
|
{
|
||||||
CipherManager * cm = cipher_manager_get_instance ();
|
|
||||||
IEEE_802_11_Cipher * cipher = g_malloc0 (sizeof (IEEE_802_11_Cipher));
|
IEEE_802_11_Cipher * cipher = g_malloc0 (sizeof (IEEE_802_11_Cipher));
|
||||||
|
|
||||||
cipher->we_cipher = IW_AUTH_CIPHER_TKIP;
|
cipher->we_cipher = IW_AUTH_CIPHER_TKIP;
|
||||||
@@ -47,8 +41,9 @@ int cipher_wpa_psk_passphrase_register (void)
|
|||||||
cipher->input_max = WPA_PMK_LEN * 2;
|
cipher->input_max = WPA_PMK_LEN * 2;
|
||||||
cipher->cipher_hash_func = cipher_wpa_psk_passphrase_hash_func;
|
cipher->cipher_hash_func = cipher_wpa_psk_passphrase_hash_func;
|
||||||
cipher->cipher_input_validate_func = cipher_default_validate_func;
|
cipher->cipher_input_validate_func = cipher_default_validate_func;
|
||||||
|
ieee_802_11_cipher_ref (cipher);
|
||||||
|
|
||||||
return cipher_manager_register_cipher (cm, cipher);
|
return cipher;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char * cipher_wpa_psk_passphrase_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input)
|
static char * cipher_wpa_psk_passphrase_hash_func (IEEE_802_11_Cipher *cipher, const char *ssid, const char *input)
|
||||||
|
@@ -22,6 +22,6 @@
|
|||||||
#ifndef CIPHER_WPA_PSK_PASSPHRASE_H
|
#ifndef CIPHER_WPA_PSK_PASSPHRASE_H
|
||||||
#define CIPHER_WPA_PSK_PASSPHRASE_H
|
#define CIPHER_WPA_PSK_PASSPHRASE_H
|
||||||
|
|
||||||
int cipher_wpa_psk_passphrase_register (void);
|
IEEE_802_11_Cipher * cipher_wpa_psk_passphrase_new (void);
|
||||||
|
|
||||||
#endif /* CIPHER_WPA_PSK_PASSPHRASE_H */
|
#endif /* CIPHER_WPA_PSK_PASSPHRASE_H */
|
||||||
|
Reference in New Issue
Block a user