summaryrefslogtreecommitdiff
path: root/lib/packet.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2012-12-17 16:11:14 +0100
committerLinus Nordberg <linus@nordberg.se>2012-12-17 16:11:14 +0100
commit09d1cff2418a900b587b2113f508984f2417cc11 (patch)
tree95dce8da09eccdeb8e70f10adcb285d7047b3120 /lib/packet.c
parent5b117878698519e798f928cef18eafc9dad4c15a (diff)
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.
Diffstat (limited to 'lib/packet.c')
-rw-r--r--lib/packet.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/packet.c b/lib/packet.c
index ce68bea..fe87bfd 100644
--- a/lib/packet.c
+++ b/lib/packet.c
@@ -169,7 +169,9 @@ rs_packet_create (struct rs_connection *conn, struct rs_packet **pkt_out)
int
rs_packet_create_authn_request (struct rs_connection *conn,
struct rs_packet **pkt_out,
- const char *user_name, const char *user_pw)
+ const char *user_name,
+ const char *user_pw,
+ const char *secret)
{
struct rs_packet *pkt;
int err;
@@ -189,6 +191,7 @@ rs_packet_create_authn_request (struct rs_connection *conn,
if (user_pw)
{
+ pkt->rpkt->secret = secret;
err = rs_packet_append_avp (pkt, PW_USER_PASSWORD, 0, user_pw, 0);
if (err)
return err;