Revert "Add formal argument 'secret' to two public functions."
authorLinus Nordberg <linus@nordberg.se>
Mon, 6 May 2013 10:00:00 +0000 (12:00 +0200)
committerLinus Nordberg <linus@nordberg.se>
Wed, 8 May 2013 15:03:49 +0000 (17:03 +0200)
This reverts commit 09d1cff2418a900b587b2113f508984f2417cc11.

Conflicts:
lib/include/radsec/request.h

lib/examples/client-blocking.c
lib/include/radsec/radsec.h
lib/include/radsec/request.h
lib/packet.c
lib/request.c

index 1303905..cce00bf 100644 (file)
@@ -55,14 +55,14 @@ blocking_client (const char *config_fn, const char *configuration,
 
   if (use_request_object_flag)
     {
-      if (rs_request_create_authn (conn, &request, USER_NAME, USER_PW, SECRET))
+      if (rs_request_create_authn (conn, &request, USER_NAME, USER_PW))
        goto cleanup;
       if (rs_request_send (request, &resp))
        goto cleanup;
     }
   else
     {
-      if (rs_packet_create_authn_request (conn, &req, USER_NAME, USER_PW, SECRET))
+      if (rs_packet_create_authn_request (conn, &req, USER_NAME, USER_PW))
        goto cleanup;
       if (rs_packet_send (req, NULL))
        goto cleanup;
index fb2aea9..2d20b6e 100644 (file)
@@ -315,14 +315,12 @@ int rs_packet_send(struct rs_packet *pkt, void *user_data);
 
 /** Create a RADIUS authentication request packet associated with
     connection \a conn.  Optionally, User-Name and User-Password
-    attributes are added to the packet using the data in \a user_name,
-    \a user_pw and \a secret where \secret is the RADIUS shared
-    secret. */
+    attributes are added to the packet using the data in \a user_name
+    and \a user_pw.  */
 int rs_packet_create_authn_request(struct rs_connection *conn,
                                   struct rs_packet **pkt,
                                   const char *user_name,
-                                  const char *user_pw,
-                                   const char *secret);
+                                  const char *user_pw);
 
 /*** Append \a tail to packet \a pkt.  */
 int
index f0151f8..7e58008 100644 (file)
@@ -20,16 +20,13 @@ int rs_request_create(struct rs_connection *conn, struct rs_request **req_out);
 void rs_request_add_reqpkt(struct rs_request *req, struct rs_packet *req_msg);
 
 /** Create a request associated with connection \a conn containing a
-    newly created RADIUS authentication message, possibly with
-    \a user_name and \a user_pw attributes.  \a user_name and \a user_pw
-    are optional and can be NULL. If \a user_name and \a user_pw are provided,
-    \a secret must also be provided. \a secret is used for "hiding" the
-    password. */
+    newly created RADIUS authentication message, possibly with \a
+    user_name and \a user_pw attributes.  \a user_name and _user_pw
+    are optional and can be NULL.  */
 int rs_request_create_authn(struct rs_connection *conn,
                            struct rs_request **req_out,
                            const char *user_name,
-                           const char *user_pw,
-                            const char *secret);
+                           const char *user_pw);
 
 /** Send request \a req and wait for a matching response.  The
     response is put in \a resp_msg (if not NULL).  NOTE: At present,
index 8073945..ba7ddb8 100644 (file)
@@ -159,9 +159,7 @@ 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 *secret)
+                               const char *user_name, const char *user_pw)
 {
   struct rs_packet *pkt;
   int err;
@@ -181,7 +179,6 @@ 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;
index 9ad7843..5649ee1 100644 (file)
@@ -51,8 +51,7 @@ int
 rs_request_create_authn (struct rs_connection *conn,
                         struct rs_request **req_out,
                         const char *user_name,
-                        const char *user_pw,
-                         const char *secret)
+                        const char *user_pw)
 {
   struct rs_request *req = NULL;
   assert (req_out);
@@ -60,7 +59,7 @@ rs_request_create_authn (struct rs_connection *conn,
   if (rs_request_create (conn, &req))
     return -1;
 
-  if (rs_packet_create_authn_request (conn, &req->req_msg, user_name, user_pw, secret))
+  if (rs_packet_create_authn_request (conn, &req->req_msg, user_name, user_pw))
     return -1;
 
   if (req_out)