예제 #1
0
파일: openvpn.c 프로젝트: arrmo/openvpn-gui
/*
 * Handle the request to release a hold from the OpenVPN management interface
 */
void
OnPassword(connection_t *c, char *msg)
{
    if (strncmp(msg, "Verification Failed", 19) == 0)
        return;

    if (strstr(msg, "'Auth'"))
    {
        LocalizedDialogBoxParam(ID_DLG_AUTH, UserAuthDialogFunc, (LPARAM) c);
    }
    else if (strstr(msg, "'Private Key'"))
    {
        LocalizedDialogBoxParam(ID_DLG_PASSPHRASE, PrivKeyPassDialogFunc, (LPARAM) c);
    }
    else if (strstr(msg, "'HTTP Proxy'"))
    {
        QueryProxyAuth(c, http);
    }
    else if (strstr(msg, "'SOCKS Proxy'"))
    {
        QueryProxyAuth(c, socks);
    }
}
예제 #2
0
/*
 * Handle the request to release a hold from the OpenVPN management interface
 */
void
OnPassword(connection_t *c, char *msg)
{
    if (strncmp(msg, "Verification Failed", 19) == 0)
        return;

    if (strstr(msg, "'Auth'"))
    {
        char* chstr = strstr(msg, "SC:");
        auth_param_t *param = (auth_param_t *) malloc(sizeof(auth_param_t));
        param->c = c;
        if (chstr)
        {
            param->challenge_echo = *(chstr + 3) != '0';
            param->challenge_str = strdup(chstr + 5);
            LocalizedDialogBoxParam(ID_DLG_AUTH_CHALLENGE, UserAuthDialogFunc, (LPARAM) param);
        }
        else
        {
            param->challenge_echo = 0;
            param->challenge_str = NULL;
            LocalizedDialogBoxParam(ID_DLG_AUTH, UserAuthDialogFunc, (LPARAM) param);
        }
    }
    else if (strstr(msg, "'Private Key'"))
    {
        LocalizedDialogBoxParam(ID_DLG_PASSPHRASE, PrivKeyPassDialogFunc, (LPARAM) c);
    }
    else if (strstr(msg, "'HTTP Proxy'"))
    {
        QueryProxyAuth(c, http);
    }
    else if (strstr(msg, "'SOCKS Proxy'"))
    {
        QueryProxyAuth(c, socks);
    }
}
예제 #3
0
INT_PTR
LocalizedDialogBox(const UINT dialogId, DLGPROC dialogFunc)
{
    return LocalizedDialogBoxParam(dialogId, dialogFunc, 0);
}
예제 #4
0
파일: proxy.c 프로젝트: arrmo/openvpn-gui
void
QueryProxyAuth(connection_t *c, proxy_t type)
{
    c->proxy_type = type;
    LocalizedDialogBoxParam(ID_DLG_PROXY_AUTH, ProxyAuthDialogFunc, (LPARAM) c);
}