| 1525 | #endif //#if FREERDP_VERSION_MAJOR >= 3 |
| 1526 | |
| 1527 | BOOL CBackendFreeRDP::cb_authenticate(freerdp* instance, char** username, |
| 1528 | char** password, char** domain) |
| 1529 | { |
| 1530 | qDebug(log) << Q_FUNC_INFO; |
| 1531 | if(!instance) |
| 1532 | return FALSE; |
| 1533 | rdpContext* pContext = (rdpContext*)instance->context; |
| 1534 | CBackendFreeRDP* pThis = ((ClientContext*)pContext)->pThis; |
| 1535 | if(!username || !password || !domain) return FALSE; |
| 1536 | if(*username && *password ) return TRUE; |
| 1537 | |
| 1538 | int nRet = QDialog::Rejected; |
| 1539 | emit pThis->sigBlockShowWidget("CDlgGetUserPasswordFreeRDP", |
| 1540 | nRet, pThis->m_pParameter); |
| 1541 | if(QDialog::Accepted == nRet) |
| 1542 | { |
| 1543 | QString szPassword = pThis->m_pParameter->m_Net.m_User.GetPassword(); |
| 1544 | QString szName = pThis->m_pParameter->m_Net.m_User.GetUser(); |
| 1545 | QString szDomain = pThis->m_pParameter->GetDomain(); |
| 1546 | if(!szDomain.isEmpty() && domain) |
| 1547 | *domain = _strdup(szDomain.toStdString().c_str()); |
| 1548 | if(!szName.isEmpty() && username) |
| 1549 | *username = _strdup(szName.toStdString().c_str()); |
| 1550 | if(password) { |
| 1551 | *password = _strdup(szPassword.toStdString().c_str()); |
| 1552 | pThis->m_SecurityLevel |= CSecurityLevel::Level::Authentication; |
| 1553 | } |
| 1554 | } else |
| 1555 | return FALSE; |
| 1556 | |
| 1557 | return TRUE; |
| 1558 | } |
| 1559 | |
| 1560 | BOOL CBackendFreeRDP::cb_GatewayAuthenticate(freerdp *instance, |
| 1561 | char **username, char **password, char **domain) |
nothing calls this directly
no test coverage detected