Skip to content

Commit

Permalink
auth: Fail authentication if certificate username was unexpectedly mi…
Browse files Browse the repository at this point in the history
…ssing
  • Loading branch information
cmouse authored and villesavolainen committed Jan 25, 2019
1 parent ad92414 commit ff6de09
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/auth/auth-request-handler.c
Expand Up @@ -581,6 +581,14 @@ bool auth_request_handler_auth_begin(struct auth_request_handler *handler,
return TRUE;
}

if (request->set->ssl_require_client_cert &&
request->set->ssl_username_from_cert &&
!request->cert_username) {
auth_request_handler_auth_fail(handler, request,
"SSL certificate didn't contain username");
return TRUE;
}

/* Handle initial respose */
if (initial_resp == NULL) {
/* No initial response */
Expand Down

0 comments on commit ff6de09

Please sign in to comment.