Update for libradsec changes
authorLuke Howard <lukeh@padl.com>
Mon, 28 Feb 2011 22:48:15 +0000 (09:48 +1100)
committerLuke Howard <lukeh@padl.com>
Mon, 28 Feb 2011 22:48:15 +0000 (09:48 +1100)
accept_sec_context.c
export_sec_context.c
radsec.conf

index b3a56c6..dd8ec4e 100644 (file)
@@ -307,7 +307,7 @@ createRadiusHandle(OM_uint32 *minor,
     }
 
     if (actx->radServer != NULL) {
-        if (rs_conn_select_server(actx->radConn, actx->radServer) != 0) {
+        if (rs_conn_select_peer(actx->radConn, actx->radServer) != 0) {
             err = rs_err_conn_pop(actx->radConn);
             goto fail;
         }
@@ -349,7 +349,7 @@ eapGssSmAcceptAuthenticate(OM_uint32 *minor,
 
     rconn = ctx->acceptorCtx.radConn;
 
-    if (rs_packet_create_auth_request(rconn, &req, NULL, NULL) != 0) {
+    if (rs_packet_create_authn_request(rconn, &req, NULL, NULL) != 0) {
         major = gssEapRadiusMapError(minor, rs_err_conn_pop(rconn));
         goto cleanup;
     }
@@ -375,8 +375,14 @@ eapGssSmAcceptAuthenticate(OM_uint32 *minor,
         gss_release_buffer(&tmpMinor, &ctx->acceptorCtx.state);
     }
 
-    if (rs_request_create(rconn, &request) != 0 ||
-        rs_request_send(request, req, &resp) != 0) {
+    if (rs_request_create(rconn, &request) != 0) {
+        major = gssEapRadiusMapError(minor, rs_err_conn_pop(rconn));
+        goto cleanup;
+    }
+
+    rs_request_add_reqpkt(request, req);
+
+    if (rs_request_send(request, &resp) != 0) {
         major = gssEapRadiusMapError(minor, rs_err_conn_pop(rconn));
         goto cleanup;
     }
index eb9042f..e50b6e5 100644 (file)
@@ -48,8 +48,8 @@ gssEapExportPartialContext(OM_uint32 *minor,
     char serverBuf[MAXHOSTNAMELEN];
 
     if (ctx->acceptorCtx.radConn != NULL) {
-        if (rs_conn_get_current_server(ctx->acceptorCtx.radConn,
-                                       serverBuf, sizeof(serverBuf)) != 0) {
+        if (rs_conn_get_current_peer(ctx->acceptorCtx.radConn,
+                                     serverBuf, sizeof(serverBuf)) != 0) {
             return gssEapRadiusMapError(minor,
                                         rs_err_conn_pop(ctx->acceptorCtx.radConn));
         }
index 3b09894..bc825c9 100644 (file)
@@ -1,10 +1,10 @@
 config gss-eap {
-        type = UDP
-        server {
-            hostname = "localhost"
-            service = "1812"
-            secret = "testing123"
-            timeout = 1
-            tries = 10
+    type = UDP
+    timeout = 1
+    retries = 10
+    server {
+        hostname = "localhost"
+        service = "1812"
+        secret = "testing123"
     }
 }