Add rs_packet_add_avp() and use it.
authorLinus Nordberg <linus@nordberg.se>
Wed, 8 May 2013 15:08:14 +0000 (17:08 +0200)
committerLinus Nordberg <linus@nordberg.se>
Wed, 8 May 2013 15:13:46 +0000 (17:13 +0200)
commit79d36d41a578451a37c134981d5698dec3d5a4d3
treee3aa2e4cf84a02bb5d89631988026fde786e29a1
parentf71f1bdd87e58fb6fb5abc90a1b2119a4f35f1b3
Add rs_packet_add_avp() and use it.

rs_packet_create_authn_request() now uses rs_packet_add_avp() instead
of rs_packet_append_avp() which makes it possible to create a
authentication packet without knowing the shared secret.

Calling rs_packet_add_avp() on a packet is incompatible with using
rs_packet_append_avp() on the same packet but since
rs_packet_create_authn_request() adds attribute-value pairs for user
name and password only if those arguments are supplied, code that
doesn't use user name and password (i.e. mech_eap) should still be
fine.
lib/include/radsec/radsec.h
lib/packet.c
lib/radius/radpkt.c