mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-07 08:14:58 +03:00
Support all EAP methods for PPP sessions with RADIUS
This commit is contained in:
@ -1702,6 +1702,9 @@ bool ServerAccept(CONNECTION *c)
|
||||
case CLIENT_AUTHTYPE_CERT:
|
||||
authtype_str = _UU("LH_AUTH_CERT");
|
||||
break;
|
||||
case AUTHTYPE_EXTERNAL:
|
||||
authtype_str = _UU("LH_AUTH_EXTERNAL");
|
||||
break;
|
||||
case AUTHTYPE_WIREGUARD_KEY:
|
||||
authtype_str = _UU("LH_AUTH_WIREGUARD_KEY");
|
||||
break;
|
||||
@ -1829,6 +1832,11 @@ bool ServerAccept(CONNECTION *c)
|
||||
// Anonymous authentication (this have been already attempted)
|
||||
break;
|
||||
|
||||
case AUTHTYPE_EXTERNAL:
|
||||
// External authentication already completed
|
||||
auth_ret = true;
|
||||
break;
|
||||
|
||||
case AUTHTYPE_TICKET:
|
||||
// Ticket authentication
|
||||
if (PackGetDataSize(p, "ticket") == SHA1_SIZE)
|
||||
@ -6711,6 +6719,25 @@ PACK *PackLoginWithAnonymous(char *hubname, char *username)
|
||||
return p;
|
||||
}
|
||||
|
||||
// Create a packet for external login
|
||||
PACK *PackLoginWithExternal(char *hubname, char *username)
|
||||
{
|
||||
PACK *p;
|
||||
// Validate arguments
|
||||
if (hubname == NULL || username == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
p = NewPack();
|
||||
PackAddStr(p, "method", "login");
|
||||
PackAddStr(p, "hubname", hubname);
|
||||
PackAddStr(p, "username", username);
|
||||
PackAddInt(p, "authtype", AUTHTYPE_EXTERNAL);
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
// Create a packet for the additional connection
|
||||
PACK *PackAdditionalConnect(UCHAR *session_key)
|
||||
{
|
||||
|
Reference in New Issue
Block a user