]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
and more cleanups
authorAlan T. DeKok <aland@freeradius.org>
Sat, 3 Apr 2021 17:38:13 +0000 (13:38 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 3 Apr 2021 17:38:13 +0000 (13:38 -0400)
src/main/listen.c
src/main/tls.c
src/main/tls_listen.c

index 6ef912c003679335edc0a31f0d8141d0c907e41b..aa33ddbe6431d20280e50568cd4e9db8109a59c5 100644 (file)
@@ -369,19 +369,21 @@ int rad_status_server(REQUEST *request)
                listen_socket_t *sock = request->listener->data;
 
                if (sock->state == LISTEN_TLS_CHECKING) {
-                       RDEBUG("Checking TLS connection to see if it is authorized.");
+                       RDEBUG("(TLS) Checking connection to see if it is authorized.");
 
                        dval = dict_valbyname(PW_AUTZ_TYPE, 0, "New-TLS-Connection");
                        if (dval) {
                                rcode = process_authorize(dval->value, request);
                        } else {
                                rcode = RLM_MODULE_OK;
-                               RWDEBUG("Did not find 'Autz-Type New-TLS-Connection' - defaulting to accept");
+                               RWDEBUG("(TLS) Did not find 'Autz-Type New-TLS-Connection' - defaulting to accept");
                        }
 
                        if ((rcode == RLM_MODULE_OK) || (rcode == RLM_MODULE_UPDATED)) {
+                               RDEBUG("(TLS) Connection is authorized");
                                request->reply->code = PW_CODE_ACCESS_ACCEPT;
                        } else {
+                               RWDEBUG("(TLS) Connection is not authorized - closing TCP socket.");
                                request->reply->code = PW_CODE_ACCESS_REJECT;
                        }
 
index 951e3424919336c82765099e3bba08a9600ebee8..0076e18896f8f2ca16b48e049d24caa0efae4c95 100644 (file)
@@ -589,7 +589,7 @@ tls_session_t *tls_new_session(TALLOC_CTX *ctx, fr_tls_server_conf_t *conf, REQU
 
        rad_assert(request != NULL);
 
-       RDEBUG2("Initiating new TLS session");
+       RDEBUG2("(TLS) Initiating new session");
 
        /*
         *      Replace X509 store if it is time to update CRLs/certs in ca_path
@@ -686,7 +686,7 @@ tls_session_t *tls_new_session(TALLOC_CTX *ctx, fr_tls_server_conf_t *conf, REQU
         *      Verify the peer certificate, if asked.
         */
        if (client_cert) {
-               RDEBUG2("Setting verify mode to require certificate from client");
+               RDEBUG2("(TLS) Setting verify mode to require certificate from client");
                verify_mode = SSL_VERIFY_PEER;
                verify_mode |= SSL_VERIFY_FAIL_IF_NO_PEER_CERT;
                verify_mode |= SSL_VERIFY_CLIENT_ONCE;
index f0eaf62dfe8437960a666d298df0a95ea48a755d..aff4cde93aff595d837af90e84306332128e7e46 100644 (file)
@@ -549,7 +549,6 @@ int dual_tls_send(rad_listen_t *listener, REQUEST *request)
         */
        if (sock->state == LISTEN_TLS_CHECKING) {
                if (request->reply->code != PW_CODE_ACCESS_ACCEPT) {
-                       REDEBUG("Rejecting client TLS connection");
                        listener->status = RAD_LISTEN_STATUS_REMOVE_NOW;
                        listener->tls = NULL; /* parent owns this! */
 
@@ -562,7 +561,6 @@ int dual_tls_send(rad_listen_t *listener, REQUEST *request)
 
                rad_assert(sock->request->packet != request->packet);
 
-               RDEBUG("Accepting client TLS connection");
                sock->state = LISTEN_TLS_SETUP;
                (void) dual_tls_recv(listener);
                return 0;