summaryrefslogtreecommitdiff
path: root/src/libradius
diff options
context:
space:
mode:
Diffstat (limited to 'src/libradius')
-rw-r--r--src/libradius/Makefile.in27
-rw-r--r--src/libradius/radius_config.c2
-rw-r--r--src/libradius/radius_config.h2
-rw-r--r--src/libradius/radius_message.c30
-rw-r--r--src/libradius/radius_message.h10
-rw-r--r--src/libradius/radius_mppe.h10
-rw-r--r--src/libradius/radius_socket.c18
-rw-r--r--src/libradius/radius_socket.h4
8 files changed, 59 insertions, 44 deletions
diff --git a/src/libradius/Makefile.in b/src/libradius/Makefile.in
index 9b03099da..f5a5d1231 100644
--- a/src/libradius/Makefile.in
+++ b/src/libradius/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@@ -79,8 +89,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/libradius
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/config/libtool.m4 \
$(top_srcdir)/m4/config/ltoptions.m4 \
@@ -94,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/config/libtool.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
@@ -196,12 +205,14 @@ am__define_uniq_tagged_files = \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
+ATOMICLIB = @ATOMICLIB@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -251,6 +262,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
@@ -285,6 +297,7 @@ PTHREADLIB = @PTHREADLIB@
PYTHON = @PYTHON@
PYTHONEGGINSTALLDIR = @PYTHONEGGINSTALLDIR@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PACKAGE_VERSION = @PYTHON_PACKAGE_VERSION@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
@@ -396,6 +409,7 @@ random_device = @random_device@
resolv_conf = @resolv_conf@
routing_table = @routing_table@
routing_table_prio = @routing_table_prio@
+runstatedir = @runstatedir@
s_plugins = @s_plugins@
sbindir = @sbindir@
scepclient_plugins = @scepclient_plugins@
@@ -457,7 +471,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libradius/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu src/libradius/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -762,6 +775,8 @@ uninstall-am: uninstall-ipseclibLTLIBRARIES
pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
uninstall-ipseclibLTLIBRARIES
+.PRECIOUS: Makefile
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/src/libradius/radius_config.c b/src/libradius/radius_config.c
index 663173411..521cd1dec 100644
--- a/src/libradius/radius_config.c
+++ b/src/libradius/radius_config.c
@@ -200,7 +200,7 @@ METHOD(radius_config_t, destroy, void,
* See header
*/
radius_config_t *radius_config_create(char *name, char *address,
- u_int16_t auth_port, u_int16_t acct_port,
+ uint16_t auth_port, uint16_t acct_port,
char *nas_identifier, char *secret,
int sockets, int preference,
u_int tries, double timeout, double base)
diff --git a/src/libradius/radius_config.h b/src/libradius/radius_config.h
index c0ff057c8..c9a2f63bd 100644
--- a/src/libradius/radius_config.h
+++ b/src/libradius/radius_config.h
@@ -118,7 +118,7 @@ struct radius_config_t {
* @param base base to calculate retransmission timeout
*/
radius_config_t *radius_config_create(char *name, char *address,
- u_int16_t auth_port, u_int16_t acct_port,
+ uint16_t auth_port, uint16_t acct_port,
char *nas_identifier, char *secret,
int sockets, int preference,
u_int tries, double timeout, double base);
diff --git a/src/libradius/radius_message.c b/src/libradius/radius_message.c
index 01c829841..9705d3b53 100644
--- a/src/libradius/radius_message.c
+++ b/src/libradius/radius_message.c
@@ -28,15 +28,15 @@ typedef struct rattr_t rattr_t;
*/
struct rmsg_t {
/** message code, radius_message_code_t */
- u_int8_t code;
+ uint8_t code;
/** message identifier */
- u_int8_t identifier;
+ uint8_t identifier;
/** length of Code, Identifier, Length, Authenticator and Attributes */
- u_int16_t length;
+ uint16_t length;
/** message authenticator, MD5 hash */
- u_int8_t authenticator[HASH_SIZE_MD5];
+ uint8_t authenticator[HASH_SIZE_MD5];
/** variable list of packed attributes */
- u_int8_t attributes[];
+ uint8_t attributes[];
} __attribute__((packed));
/**
@@ -44,11 +44,11 @@ struct rmsg_t {
*/
struct rattr_t {
/** attribute type, radius_attribute_type_t */
- u_int8_t type;
+ uint8_t type;
/** length of the attriubte, including the Type, Length and Value fields */
- u_int8_t length;
+ uint8_t length;
/** variable length attribute value */
- u_int8_t value[];
+ uint8_t value[];
} __attribute__((packed));
/**
@@ -293,7 +293,7 @@ typedef struct {
/** inner attribute enumerator */
enumerator_t *inner;
/** current vendor ID */
- u_int32_t vendor;
+ uint32_t vendor;
/** reader for current vendor ID */
bio_reader_t *reader;
} vendor_enumerator_t;
@@ -303,7 +303,7 @@ METHOD(enumerator_t, vendor_enumerate, bool,
{
chunk_t inner_data;
int inner_type;
- u_int8_t type8, len;
+ uint8_t type8, len;
while (TRUE)
{
@@ -449,7 +449,7 @@ METHOD(radius_message_t, crypt, bool,
}
METHOD(radius_message_t, sign, bool,
- private_radius_message_t *this, u_int8_t *req_auth, chunk_t secret,
+ private_radius_message_t *this, uint8_t *req_auth, chunk_t secret,
hasher_t *hasher, signer_t *signer, rng_t *rng, bool msg_auth)
{
if (rng)
@@ -516,7 +516,7 @@ METHOD(radius_message_t, sign, bool,
}
METHOD(radius_message_t, verify, bool,
- private_radius_message_t *this, u_int8_t *req_auth, chunk_t secret,
+ private_radius_message_t *this, uint8_t *req_auth, chunk_t secret,
hasher_t *hasher, signer_t *signer)
{
char buf[HASH_SIZE_MD5], res_auth[HASH_SIZE_MD5];
@@ -606,19 +606,19 @@ METHOD(radius_message_t, get_code, radius_message_code_t,
return this->msg->code;
}
-METHOD(radius_message_t, get_identifier, u_int8_t,
+METHOD(radius_message_t, get_identifier, uint8_t,
private_radius_message_t *this)
{
return this->msg->identifier;
}
METHOD(radius_message_t, set_identifier, void,
- private_radius_message_t *this, u_int8_t identifier)
+ private_radius_message_t *this, uint8_t identifier)
{
this->msg->identifier = identifier;
}
-METHOD(radius_message_t, get_authenticator, u_int8_t*,
+METHOD(radius_message_t, get_authenticator, uint8_t*,
private_radius_message_t *this)
{
return this->msg->authenticator;
diff --git a/src/libradius/radius_message.h b/src/libradius/radius_message.h
index e6cb40b18..c72773312 100644
--- a/src/libradius/radius_message.h
+++ b/src/libradius/radius_message.h
@@ -241,21 +241,21 @@ struct radius_message_t {
*
* @return message identifier
*/
- u_int8_t (*get_identifier)(radius_message_t *this);
+ uint8_t (*get_identifier)(radius_message_t *this);
/**
* Set the message identifier.
*
* @param identifier message identifier
*/
- void (*set_identifier)(radius_message_t *this, u_int8_t identifier);
+ void (*set_identifier)(radius_message_t *this, uint8_t identifier);
/**
* Get the 16 byte authenticator.
*
* @return pointer to the Authenticator field
*/
- u_int8_t* (*get_authenticator)(radius_message_t *this);
+ uint8_t* (*get_authenticator)(radius_message_t *this);
/**
* Get the RADIUS message in its encoded form.
@@ -275,7 +275,7 @@ struct radius_message_t {
* @param msg_auth calculate and add Message-Authenticator
* @return TRUE if signed successfully
*/
- bool (*sign)(radius_message_t *this, u_int8_t *req_auth, chunk_t secret,
+ bool (*sign)(radius_message_t *this, uint8_t *req_auth, chunk_t secret,
hasher_t *hasher, signer_t *signer, rng_t *rng, bool msg_auth);
/**
@@ -286,7 +286,7 @@ struct radius_message_t {
* @param signer HMAC-MD5 signer with secret set
* @param hasher MD5 hasher
*/
- bool (*verify)(radius_message_t *this, u_int8_t *req_auth, chunk_t secret,
+ bool (*verify)(radius_message_t *this, uint8_t *req_auth, chunk_t secret,
hasher_t *hasher, signer_t *signer);
/**
diff --git a/src/libradius/radius_mppe.h b/src/libradius/radius_mppe.h
index 1b7a732ec..5006ca9d0 100644
--- a/src/libradius/radius_mppe.h
+++ b/src/libradius/radius_mppe.h
@@ -30,11 +30,11 @@
typedef struct mppe_key_t mppe_key_t;
struct mppe_key_t {
- u_int32_t id;
- u_int8_t type;
- u_int8_t length;
- u_int16_t salt;
- u_int8_t key[];
+ uint32_t id;
+ uint8_t type;
+ uint8_t length;
+ uint16_t salt;
+ uint8_t key[];
} __attribute__((packed));
#endif /** RADIUS_MPPE_H_ @}*/
diff --git a/src/libradius/radius_socket.c b/src/libradius/radius_socket.c
index 065f2644e..115be79fb 100644
--- a/src/libradius/radius_socket.c
+++ b/src/libradius/radius_socket.c
@@ -60,7 +60,7 @@ struct private_radius_socket_t {
/**
* Server port for authentication
*/
- u_int16_t auth_port;
+ uint16_t auth_port;
/**
* socket file descriptor for authentication
@@ -70,7 +70,7 @@ struct private_radius_socket_t {
/**
* Server port for accounting
*/
- u_int16_t acct_port;
+ uint16_t acct_port;
/**
* socket file descriptor for accounting
@@ -85,7 +85,7 @@ struct private_radius_socket_t {
/**
* current RADIUS identifier
*/
- u_int8_t identifier;
+ uint8_t identifier;
/**
* hasher to use for response verification
@@ -127,7 +127,7 @@ struct private_radius_socket_t {
* Check or establish RADIUS connection
*/
static bool check_connection(private_radius_socket_t *this,
- int *fd, u_int16_t port)
+ int *fd, uint16_t port)
{
if (*fd == -1)
{
@@ -166,7 +166,7 @@ static bool check_connection(private_radius_socket_t *this,
/**
* Receive the response to the message with the given ID
*/
-static status_t receive_response(int fd, int timeout, u_int8_t id,
+static status_t receive_response(int fd, int timeout, uint8_t id,
radius_message_t **response)
{
radius_message_t *msg;
@@ -224,7 +224,7 @@ METHOD(radius_socket_t, request, radius_message_t*,
radius_message_t *response;
chunk_t data;
int *fd, retransmit = 0, timeout;
- u_int16_t port;
+ uint16_t port;
rng_t *rng = NULL;
if (request->get_code(request) == RMC_ACCOUNTING_REQUEST)
@@ -299,7 +299,7 @@ METHOD(radius_socket_t, request, radius_message_t*,
/**
* Decrypt a MS-MPPE-Send/Recv-Key
*/
-static chunk_t decrypt_mppe_key(private_radius_socket_t *this, u_int16_t salt,
+static chunk_t decrypt_mppe_key(private_radius_socket_t *this, uint16_t salt,
chunk_t C, radius_message_t *request)
{
chunk_t decrypted;
@@ -375,8 +375,8 @@ METHOD(radius_socket_t, destroy, void,
/**
* See header
*/
-radius_socket_t *radius_socket_create(char *address, u_int16_t auth_port,
- u_int16_t acct_port, chunk_t secret,
+radius_socket_t *radius_socket_create(char *address, uint16_t auth_port,
+ uint16_t acct_port, chunk_t secret,
u_int tries, double timeout, double base)
{
private_radius_socket_t *this;
diff --git a/src/libradius/radius_socket.h b/src/libradius/radius_socket.h
index 84b146a7d..acc6c368f 100644
--- a/src/libradius/radius_socket.h
+++ b/src/libradius/radius_socket.h
@@ -96,8 +96,8 @@ struct radius_socket_t {
* @param timeout retransmission timeout
* @param base base to calculate retransmission timeout
*/
-radius_socket_t *radius_socket_create(char *address, u_int16_t auth_port,
- u_int16_t acct_port, chunk_t secret,
+radius_socket_t *radius_socket_create(char *address, uint16_t auth_port,
+ uint16_t acct_port, chunk_t secret,
u_int tries, double timeout, double base);
#endif /** RADIUS_SOCKET_H_ @}*/