radsecproxy.git
11 years agoMerge branch 'libradsec-new-client' into libradsec
Linus Nordberg [Mon, 21 Jan 2013 10:02:17 +0000 (11:02 +0100)]
Merge branch 'libradsec-new-client' into libradsec

11 years agoUpdate README and HACKING. libradsec-new-client
Linus Nordberg [Mon, 21 Jan 2013 09:50:53 +0000 (10:50 +0100)]
Update README and HACKING.

Whitespace fixes.
Say Debian instead of Ubuntu.
Update versions of library dependencies.

HACKING:
Revive the "fully reentrant" design goal.
Admit that we don't implement a server API.

11 years agoFix a doc comment.
Linus Nordberg [Wed, 16 Jan 2013 14:39:53 +0000 (15:39 +0100)]
Fix a doc comment.

11 years agoDefine WITHOUT_OPENSSL if we don't have openssl.
Linus Nordberg [Wed, 19 Dec 2012 14:45:42 +0000 (15:45 +0100)]
Define WITHOUT_OPENSSL if we don't have openssl.

This is for radius/client.h.

We will want an alternative way of getting MD5. Include md5.[ch] from
FreeBSD? Link with libnettle?

11 years agoFix typos.
Linus Nordberg [Wed, 19 Dec 2012 11:15:15 +0000 (12:15 +0100)]
Fix typos.

#error messages.

11 years agoRemove generated autotools files.
Linus Nordberg [Wed, 19 Dec 2012 09:49:24 +0000 (10:49 +0100)]
Remove generated autotools files.

11 years agoRename COPYING -> LICENSE.
Linus Nordberg [Wed, 19 Dec 2012 09:41:57 +0000 (10:41 +0100)]
Rename COPYING -> LICENSE.

And distribute LICENSE and HACKING.

11 years agoRemove the option to use GPLv2 as the license.
Linus Nordberg [Tue, 18 Dec 2012 13:40:35 +0000 (14:40 +0100)]
Remove the option to use GPLv2 as the license.

This follows the changes to the upstream radsecproxy repository.
Also, Stig Venaas is removed from all copyright, replaced by UNINETT.

Add JANET as copyright holder (avp.c).

11 years agoConfig docu.
Linus Nordberg [Tue, 18 Dec 2012 12:24:59 +0000 (13:24 +0100)]
Config docu.

11 years agoWhitespace.
Linus Nordberg [Tue, 18 Dec 2012 12:24:45 +0000 (13:24 +0100)]
Whitespace.

11 years agoInclude <sys/types.h> for Junos.
Linus Nordberg [Tue, 18 Dec 2012 07:40:00 +0000 (08:40 +0100)]
Include <sys/types.h> for Junos.

Fix from Luke Howard.

11 years agoWhitespace.
Linus Nordberg [Mon, 17 Dec 2012 15:11:42 +0000 (16:11 +0100)]
Whitespace.

11 years agoAdd formal argument 'secret' to two public functions.
Linus Nordberg [Mon, 17 Dec 2012 15:11:14 +0000 (16:11 +0100)]
Add formal argument 'secret' to two public functions.

The functions are rs_packet_create_authn_request() and
rs_request_create_authn().

Attributes of type PW_USER_PASSWORD are supposed to be MD5
obfuscated (see vp2data_any()).

NOTE: This is a non-backward compatible API change.

11 years agoExample code: Print a little bit more helpful information on failure.
Linus Nordberg [Mon, 17 Dec 2012 15:07:16 +0000 (16:07 +0100)]
Example code: Print a little bit more helpful information on failure.

11 years agoExample code: Don't create rs_error on failing context creation.
Linus Nordberg [Mon, 17 Dec 2012 15:05:55 +0000 (16:05 +0100)]
Example code: Don't create rs_error on failing context creation.

We don't export err_create() and the error is ENOMEM nowadays.

11 years agoDocu: Fix libevent url.
Linus Nordberg [Mon, 17 Dec 2012 15:04:30 +0000 (16:04 +0100)]
Docu: Fix libevent url.

11 years agoDocu: Remove dependency on libradius.
Linus Nordberg [Mon, 17 Dec 2012 15:03:12 +0000 (16:03 +0100)]
Docu: Remove dependency on libradius.

11 years agoFix language.
Linus Nordberg [Wed, 12 Dec 2012 10:04:31 +0000 (11:04 +0100)]
Fix language.

12 years agoMerge libradsec-new-client.
Linus Nordberg [Fri, 27 Apr 2012 15:00:17 +0000 (17:00 +0200)]
Merge libradsec-new-client.

12 years agoFix struct in6_addr undefined.
Linus Nordberg [Fri, 27 Apr 2012 14:58:03 +0000 (16:58 +0200)]
Fix struct in6_addr undefined.

Have lib/rsp_tlscommon.h include netinet/in.h since it's included by radsecproxy.h.

12 years agoVerify certificate CN against configured hostname.
Linus Nordberg [Thu, 26 Apr 2012 08:19:52 +0000 (10:19 +0200)]
Verify certificate CN against configured hostname.

NOTE: The subjectAltName check is not well tested.

12 years agoImplement cert verification.
Linus Nordberg [Thu, 26 Apr 2012 08:18:33 +0000 (10:18 +0200)]
Implement cert verification.

NOTE: Not used yet.

12 years agoHandle failing rs_context_create().
Linus Nordberg [Thu, 26 Apr 2012 08:17:24 +0000 (10:17 +0200)]
Handle failing rs_context_create().

12 years agoUse existing temporary variable conn.
Linus Nordberg [Thu, 26 Apr 2012 08:15:51 +0000 (10:15 +0200)]
Use existing temporary variable conn.

12 years agoAdd an error code.
Linus Nordberg [Thu, 26 Apr 2012 08:12:36 +0000 (10:12 +0200)]
Add an error code.

Also add error text for missing RSE_CRED.

12 years agoDon't resolve DNS names in rs_peer_set_address().
Linus Nordberg [Thu, 26 Apr 2012 08:10:33 +0000 (10:10 +0200)]
Don't resolve DNS names in rs_peer_set_address().

It simply stores (a copy of) hostname and service name in PEER.

12 years agoUse rs_strdup().
Linus Nordberg [Thu, 26 Apr 2012 08:08:59 +0000 (10:08 +0200)]
Use rs_strdup().

12 years agoAdd util.h and util.c.
Linus Nordberg [Thu, 26 Apr 2012 08:03:42 +0000 (10:03 +0200)]
Add util.h and util.c.

12 years agoFollow name change of rs_resolv().
Linus Nordberg [Thu, 26 Apr 2012 07:48:36 +0000 (09:48 +0200)]
Follow name change of rs_resolv().

12 years agoAdd missing radsec.h.
Linus Nordberg [Wed, 25 Apr 2012 15:45:24 +0000 (17:45 +0200)]
Add missing radsec.h.

12 years agoPostpone resolving of DNS names of server.
Linus Nordberg [Wed, 25 Apr 2012 15:41:27 +0000 (17:41 +0200)]
Postpone resolving of DNS names of server.

We used to resolve DNS names when reading configuration.  We now do it
in event_init_socket() and cache the result in the connection object.

The imminent need for changing this is to keep host names around for
X509 certificate verification (CNAME and subjectAltName).  This will
also help later when we implement server failover (and later, when
people want to do more dynamic configuration, f.ex. NAPTR).

12 years agoUpdate HACKING.
Linus Nordberg [Wed, 25 Apr 2012 15:33:40 +0000 (17:33 +0200)]
Update HACKING.

12 years agoMissing response packet in rs_conn_receive_packet doesn't have to be a bug.
Linus Nordberg [Wed, 25 Apr 2012 13:23:06 +0000 (15:23 +0200)]
Missing response packet in rs_conn_receive_packet doesn't have to be a bug.

12 years agoFix a comment.
Linus Nordberg [Wed, 25 Apr 2012 13:22:36 +0000 (15:22 +0200)]
Fix a comment.

12 years agoConditionally compile TLS-PSK code (--enable-tls-psk).
Linus Nordberg [Mon, 23 Apr 2012 12:44:49 +0000 (14:44 +0200)]
Conditionally compile TLS-PSK code (--enable-tls-psk).

Also, allow for PSK-only configuration, i.e. don't barf on missing cert stuff.

12 years agoDon't say RADPROT_TLS when we mean RAD_TLS.
Linus Nordberg [Thu, 19 Apr 2012 09:23:06 +0000 (11:23 +0200)]
Don't say RADPROT_TLS when we mean RAD_TLS.

RADPROT_TLS is legacy from radsecproxy and will go away.
It happens to be defined to 1, the same as RAD_TLS, so it happens to work.

12 years agoUpdate copyright to JANET(UK)
Luke Howard [Fri, 30 Mar 2012 22:22:53 +0000 (09:22 +1100)]
Update copyright to JANET(UK)

12 years agoClarify comments about PSK string encoding.
Linus Nordberg [Wed, 1 Feb 2012 12:54:05 +0000 (13:54 +0100)]
Clarify comments about PSK string encoding.

12 years agoGet the test suite going again. libradsec-psk
Linus Nordberg [Tue, 31 Jan 2012 14:03:59 +0000 (15:03 +0100)]
Get the test suite going again.

12 years agoImplement TLS-PSK.
Linus Nordberg [Tue, 31 Jan 2012 12:15:20 +0000 (13:15 +0100)]
Implement TLS-PSK.

12 years agoFree the transport credentials struct.
Linus Nordberg [Thu, 26 Jan 2012 15:55:22 +0000 (16:55 +0100)]
Free the transport credentials struct.

12 years agoBump library interface revision.
Linus Nordberg [Tue, 24 Jan 2012 13:51:22 +0000 (14:51 +0100)]
Bump library interface revision.

Should really have been done as part of bumping the library version
(0.0.2.dev in configure.ac).

12 years agoBe user friendly in example program.
Linus Nordberg [Tue, 24 Jan 2012 12:17:40 +0000 (13:17 +0100)]
Be user friendly in example program.

12 years agoMove a comment, for clarification.
Linus Nordberg [Tue, 24 Jan 2012 12:17:12 +0000 (13:17 +0100)]
Move a comment, for clarification.

12 years agoAdd TLS PSK configuration options.
Linus Nordberg [Tue, 24 Jan 2012 12:16:26 +0000 (13:16 +0100)]
Add TLS PSK configuration options.

12 years agoCosmetic changes.
Linus Nordberg [Thu, 19 Jan 2012 08:11:48 +0000 (09:11 +0100)]
Cosmetic changes.

Language and typos in a README.

12 years agoCosmetic changes.
Linus Nordberg [Thu, 19 Jan 2012 08:10:07 +0000 (09:10 +0100)]
Cosmetic changes.

Better names of formal arguments in test program.

12 years agoAvoid unused variable warning when building without DEBUG.
Linus Nordberg [Wed, 4 Jan 2012 09:05:41 +0000 (10:05 +0100)]
Avoid unused variable warning when building without DEBUG.

Spotted by Sam Hartman.

12 years agoFix a typo in a comment.
Linus Nordberg [Wed, 14 Dec 2011 17:13:21 +0000 (18:13 +0100)]
Fix a typo in a comment.

12 years agofix dangling reference to dictionary pointer
Luke Howard [Thu, 1 Dec 2011 06:44:10 +0000 (17:44 +1100)]
fix dangling reference to dictionary pointer

12 years agoadd MS-Windows-Group-Sid
Luke Howard [Thu, 1 Dec 2011 03:19:46 +0000 (14:19 +1100)]
add MS-Windows-Group-Sid

12 years agosmall cleanups
Luke Howard [Mon, 14 Nov 2011 11:58:53 +0000 (22:58 +1100)]
small cleanups

12 years agoadd rs_attr_display_name/rs_attr_parse_name
Luke Howard [Mon, 14 Nov 2011 07:54:44 +0000 (18:54 +1100)]
add rs_attr_display_name/rs_attr_parse_name

12 years agoremove dictionary configuration parameter
Luke Howard [Mon, 14 Nov 2011 06:05:55 +0000 (17:05 +1100)]
remove dictionary configuration parameter

12 years agoremove rs_packet_frpkt
Luke Howard [Mon, 14 Nov 2011 06:05:17 +0000 (17:05 +1100)]
remove rs_packet_frpkt

12 years agoport new RADIUS library to Windows
Luke Howard [Mon, 14 Nov 2011 05:59:55 +0000 (16:59 +1100)]
port new RADIUS library to Windows

Conflicts:

lib/configure.ac
lib/include/radsec/radsec.h
lib/radius/client.h

12 years agodon't return in void function
Luke Howard [Mon, 14 Nov 2011 05:51:25 +0000 (16:51 +1100)]
don't return in void function

Conflicts:

lib/NTMakefile

12 years agodon't return in void function
Luke Howard [Mon, 14 Nov 2011 03:43:24 +0000 (14:43 +1100)]
don't return in void function

12 years agodon't use GCC extensions in generated code
Luke Howard [Mon, 14 Nov 2011 02:42:10 +0000 (13:42 +1100)]
don't use GCC extensions in generated code

12 years agoremove rs_context_init_freeradius_dict
Luke Howard [Mon, 14 Nov 2011 01:43:48 +0000 (12:43 +1100)]
remove rs_context_init_freeradius_dict

12 years agoport to new RADIUS client library
Luke Howard [Sun, 13 Nov 2011 06:16:14 +0000 (17:16 +1100)]
port to new RADIUS client library

12 years agoadd new RADIUS client library
Luke Howard [Sun, 13 Nov 2011 05:16:05 +0000 (16:16 +1100)]
add new RADIUS client library

12 years agoChange version 0.0.2-dev --> 0.0.2.dev.
Linus Nordberg [Fri, 14 Oct 2011 14:01:24 +0000 (16:01 +0200)]
Change version 0.0.2-dev --> 0.0.2.dev.

Sam Hartman: "I propose changing the version from 0.1-dev or whatever
to 0.1.dev or whetever because RPM versions (and really debian
versions too) cannot contain dashes"

12 years agoGet rid of warning for strict aliasing breakage.
Linus Nordberg [Wed, 5 Oct 2011 07:11:29 +0000 (09:11 +0200)]
Get rid of warning for strict aliasing breakage.

12 years agoevent_enable_debug_mode() must be called at most once.
Linus Nordberg [Thu, 22 Sep 2011 10:30:12 +0000 (12:30 +0200)]
event_enable_debug_mode() must be called at most once.

12 years agoExport only symbols listed in radsec.sym.
Linus Nordberg [Mon, 18 Jul 2011 11:34:49 +0000 (13:34 +0200)]
Export only symbols listed in radsec.sym.

12 years agoTreat warnings as errors when compiling libradsec.
Linus Nordberg [Mon, 18 Jul 2011 11:17:04 +0000 (13:17 +0200)]
Treat warnings as errors when compiling libradsec.

12 years agoRefine HACKING slightly.
Linus Nordberg [Mon, 4 Jul 2011 14:47:33 +0000 (16:47 +0200)]
Refine HACKING slightly.

12 years agoCleanup conf.c.
Linus Nordberg [Sun, 3 Jul 2011 08:38:53 +0000 (10:38 +0200)]
Cleanup conf.c.

Don't promote a pointer to a boolean in if clauses.
Compare strcmp to 0.

12 years agoHandle all libconfuse parse errors.
Linus Nordberg [Sun, 3 Jul 2011 08:36:08 +0000 (10:36 +0200)]
Handle all libconfuse parse errors.

12 years agoHandle configuration errors better.
Linus Nordberg [Sun, 3 Jul 2011 08:13:51 +0000 (10:13 +0200)]
Handle configuration errors better.

12 years agoRemove spurious comment.
Linus Nordberg [Sat, 2 Jul 2011 12:16:01 +0000 (14:16 +0200)]
Remove spurious comment.

rs_resolv() doesn't have a connection to push an error on and should
indeed return a struct rs_error.

12 years agoResolve IPv6 addresses too.
Linus Nordberg [Sat, 2 Jul 2011 12:07:29 +0000 (14:07 +0200)]
Resolve IPv6 addresses too.

12 years agolib/rsp_tlscommon.c: Include sys/types.h before netinet/in.h.
Linus Nordberg [Mon, 23 May 2011 08:07:32 +0000 (10:07 +0200)]
lib/rsp_tlscommon.c: Include sys/types.h before netinet/in.h.

12 years agoCompile on BSD.
Linus Nordberg [Wed, 18 May 2011 07:35:07 +0000 (09:35 +0200)]
Compile on BSD.

Thanks to Luke Howard for reporting.

13 years agoexamples/client.conf: Correct key file.
Linus Nordberg [Fri, 1 Apr 2011 18:54:10 +0000 (20:54 +0200)]
examples/client.conf: Correct key file.

13 years agoDon't install example programs.
Linus Nordberg [Fri, 25 Mar 2011 16:58:23 +0000 (17:58 +0100)]
Don't install example programs.

13 years agoAdd cert 3 ("client cert") with key.
Linus Nordberg [Fri, 25 Mar 2011 15:07:12 +0000 (16:07 +0100)]
Add cert 3 ("client cert") with key.

13 years agodemoCA: Rename c1key --> c2key to match certificate file name.
Linus Nordberg [Fri, 25 Mar 2011 15:06:10 +0000 (16:06 +0100)]
demoCA: Rename c1key --> c2key to match certificate file name.

13 years agoAdd tests/demoCA and use certs and key in there for the examples.
Linus Nordberg [Fri, 25 Mar 2011 12:47:32 +0000 (13:47 +0100)]
Add tests/demoCA and use certs and key in there for the examples.

13 years agoChange version to libradsec-0.0.2-dev.
Linus Nordberg [Thu, 24 Mar 2011 16:24:14 +0000 (17:24 +0100)]
Change version to libradsec-0.0.2-dev.

13 years agoReady for libradsec-0.0.1. libradsec-0.0.1
Linus Nordberg [Thu, 24 Mar 2011 16:22:38 +0000 (17:22 +0100)]
Ready for libradsec-0.0.1.

13 years agoHarmonise with radsecproxy licensing.
Linus Nordberg [Thu, 24 Mar 2011 15:29:48 +0000 (16:29 +0100)]
Harmonise with radsecproxy licensing.

Dual license the library by adding GPL v2 or later.
Change the 2-clause BSD to a 3-clause.

13 years agoUpdate README and HACKING.
Linus Nordberg [Thu, 24 Mar 2011 15:26:55 +0000 (16:26 +0100)]
Update README and HACKING.

13 years agoDefine RS_FREERADIUS_DICT and use it when missing "dictionary" in config.
Linus Nordberg [Mon, 21 Mar 2011 13:58:52 +0000 (14:58 +0100)]
Define RS_FREERADIUS_DICT and use it when missing "dictionary" in config.

13 years agoMemory alloc/free cleanup for contexts.
Linus Nordberg [Mon, 21 Mar 2011 13:32:31 +0000 (14:32 +0100)]
Memory alloc/free cleanup for contexts.

(rs_context_create): Don't touch *ctx on failure.  Keep allocation and
zeroing of allocated memory together.

(rs_context_destroy): Fix typo.
(rs_context_destroy): Don't rs_free the context since it's allocated
with calloc.

13 years ago(rs_context_destroy): Use free() rather than rs_free() for realm->name.
Linus Nordberg [Mon, 21 Mar 2011 13:17:55 +0000 (14:17 +0100)]
(rs_context_destroy): Use free() rather than rs_free() for realm->name.

13 years agoAPI AND CONFIG CHANGE: rs_context_create() doesn't take DICT any more.
Linus Nordberg [Mon, 21 Mar 2011 12:33:22 +0000 (13:33 +0100)]
API AND CONFIG CHANGE: rs_context_create() doesn't take DICT any more.

Use rs_context_create() to read FreeRADIUS dictionary, possibly by
taking dict file from configuration file.

CONFIG CHANGE: s/config/realm/g.

13 years agoDon't touch TLS specific things w/o RS_ENABLE_TLS.
Linus Nordberg [Tue, 15 Mar 2011 09:43:22 +0000 (10:43 +0100)]
Don't touch TLS specific things w/o RS_ENABLE_TLS.

13 years agoVerify result in example program. Also, don't leak a package.
Linus Nordberg [Mon, 14 Mar 2011 14:20:52 +0000 (15:20 +0100)]
Verify result in example program.  Also, don't leak a package.

13 years ago[TLS] Do free SSL and SSL_CTX objects.
Linus Nordberg [Mon, 14 Mar 2011 14:20:17 +0000 (15:20 +0100)]
[TLS] Do free SSL and SSL_CTX objects.

13 years ago(rs_packet_destroy): Free unconditionally.
Linus Nordberg [Mon, 14 Mar 2011 12:32:59 +0000 (13:32 +0100)]
(rs_packet_destroy): Free unconditionally.

13 years agoRemove struct rs_attr and all use of it.
Linus Nordberg [Mon, 14 Mar 2011 12:27:39 +0000 (13:27 +0100)]
Remove struct rs_attr and all use of it.

A new API for attributes will be added once we've decided how to deal
with RADIUS packets internally.  For now, removing the half baked
wrapping seems more sensible than trying to free rs_attr objects and
their VALUE_PAIR's.

13 years agoAdd short blurb about bug hunting in HACKING.
Linus Nordberg [Mon, 14 Mar 2011 12:23:24 +0000 (13:23 +0100)]
Add short blurb about bug hunting in HACKING.

13 years agoAvoid potential double free.
Linus Nordberg [Sun, 13 Mar 2011 23:45:18 +0000 (00:45 +0100)]
Avoid potential double free.

(udp_init): Set conn.rev = NULL in fault case.

13 years ago[UDP] Free the event base _after_ freeing the read and write events.
Linus Nordberg [Sun, 13 Mar 2011 23:44:00 +0000 (00:44 +0100)]
[UDP] Free the event base _after_ freeing the read and write events.

Duh!

13 years agoRemove unused resp_msg from struct request.
Linus Nordberg [Sun, 13 Mar 2011 23:27:54 +0000 (00:27 +0100)]
Remove unused resp_msg from struct request.

13 years agoAdd rs_request_get_reqmsg() and update documentation.
Linus Nordberg [Sun, 13 Mar 2011 23:26:05 +0000 (00:26 +0100)]
Add rs_request_get_reqmsg() and update documentation.

13 years agoDon't free connection on error, just close it.
Linus Nordberg [Sun, 13 Mar 2011 23:22:41 +0000 (00:22 +0100)]
Don't free connection on error, just close it.

13 years ago[UDP] Free read/write events when destroying connection.
Linus Nordberg [Sun, 13 Mar 2011 14:30:36 +0000 (15:30 +0100)]
[UDP] Free read/write events when destroying connection.