Commit e3fa52a6 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

secur32: Ignore GNUTLS_A_UNRECOGNIZED_NAME warning alert.

parent 5114deda
...@@ -193,9 +193,11 @@ void schan_imp_set_session_target(schan_imp_session session, const char *target) ...@@ -193,9 +193,11 @@ void schan_imp_set_session_target(schan_imp_session session, const char *target)
SECURITY_STATUS schan_imp_handshake(schan_imp_session session) SECURITY_STATUS schan_imp_handshake(schan_imp_session session)
{ {
gnutls_session_t s = (gnutls_session_t)session; gnutls_session_t s = (gnutls_session_t)session;
int err = pgnutls_handshake(s); int err;
switch(err)
{ while(1) {
err = pgnutls_handshake(s);
switch(err) {
case GNUTLS_E_SUCCESS: case GNUTLS_E_SUCCESS:
TRACE("Handshake completed\n"); TRACE("Handshake completed\n");
return SEC_E_OK; return SEC_E_OK;
...@@ -205,11 +207,24 @@ SECURITY_STATUS schan_imp_handshake(schan_imp_session session) ...@@ -205,11 +207,24 @@ SECURITY_STATUS schan_imp_handshake(schan_imp_session session)
return SEC_I_CONTINUE_NEEDED; return SEC_I_CONTINUE_NEEDED;
case GNUTLS_E_WARNING_ALERT_RECEIVED: case GNUTLS_E_WARNING_ALERT_RECEIVED:
{
gnutls_alert_description_t alert = pgnutls_alert_get(s);
WARN("WARNING ALERT: %d %s\n", alert, pgnutls_alert_get_name(alert));
switch(alert) {
case GNUTLS_A_UNRECOGNIZED_NAME:
TRACE("Ignoring\n");
continue;
default:
return SEC_E_INTERNAL_ERROR;
}
}
case GNUTLS_E_FATAL_ALERT_RECEIVED: case GNUTLS_E_FATAL_ALERT_RECEIVED:
{ {
gnutls_alert_description_t alert = pgnutls_alert_get(s); gnutls_alert_description_t alert = pgnutls_alert_get(s);
const char *alert_name = pgnutls_alert_get_name(alert); WARN("FATAL ALERT: %d %s\n", alert, pgnutls_alert_get_name(alert));
WARN("ALERT: %d %s\n", alert, alert_name);
return SEC_E_INTERNAL_ERROR; return SEC_E_INTERNAL_ERROR;
} }
...@@ -217,6 +232,7 @@ SECURITY_STATUS schan_imp_handshake(schan_imp_session session) ...@@ -217,6 +232,7 @@ SECURITY_STATUS schan_imp_handshake(schan_imp_session session)
pgnutls_perror(err); pgnutls_perror(err);
return SEC_E_INTERNAL_ERROR; return SEC_E_INTERNAL_ERROR;
} }
}
/* Never reached */ /* Never reached */
return SEC_E_OK; return SEC_E_OK;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment