Skip to content

Commit

Permalink
Fix error message in server log when a client certificate is not trusted
Browse files Browse the repository at this point in the history
  • Loading branch information
aburgm committed Oct 27, 2014
1 parent 7fcb143 commit 631d039
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion infinoted/plugins/infinoted-plugin-certificate-auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ infinoted_plugin_certificate_auth_certificate_func(InfXmppConnection* xmpp,
if(res != GNUTLS_E_SUCCESS)
inf_gnutls_set_error(&error, res);
else if( (verify_result & GNUTLS_CERT_INVALID) != 0)
inf_gnutls_certificate_verification_set_error(&error, res);
inf_gnutls_certificate_verification_set_error(&error, verify_result);

if(error != NULL)
{
Expand Down
2 changes: 2 additions & 0 deletions libinfinity/common/inf-error.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ inf_gnutls_certificate_verification_set_error(GError** error,
message = _("The certificate has expired");
else if(verify & GNUTLS_CERT_INVALID)
message = _("The certificate is invalid");
else
g_assert_not_reached();

*error = g_error_new_literal(
inf_gnutls_certificate_verification_error_quark(),
Expand Down

0 comments on commit 631d039

Please sign in to comment.