mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-07 08:14:58 +03:00
Openssl engine certificate authentication
TODO cert get, call finish engine, call init engine in another step, handle authentication, internatiolazion (help is needed)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
// SoftEther VPN Source Code - Developer Edition Master Branch
|
||||
// Cedar Communication Module
|
||||
|
||||
// © 2020 Nokia
|
||||
|
||||
// Protocol.c
|
||||
// SoftEther protocol related routines
|
||||
@ -5511,6 +5511,20 @@ bool ClientUploadAuth(CONNECTION *c)
|
||||
}
|
||||
break;
|
||||
|
||||
case CLIENT_AUTHTYPE_OPENSSLENGINE:
|
||||
// Certificate authentication
|
||||
if (a->ClientX != NULL && a->ClientX->is_compatible_bit &&
|
||||
a->ClientX->bits != 0 && (a->ClientX->bits / 8) <= sizeof(sign))
|
||||
{
|
||||
if (RsaSignEx(sign, c->Random, SHA1_SIZE, a->ClientK, a->ClientX->bits))
|
||||
{
|
||||
p = PackLoginWithCert(o->HubName, a->Username, a->ClientX, sign, a->ClientX->bits / 8);
|
||||
c->ClientX = CloneX(a->ClientX);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case CLIENT_AUTHTYPE_SECURE:
|
||||
// Authentication by secure device
|
||||
if (ClientSecureSign(c, sign, c->Random, &x))
|
||||
|
Reference in New Issue
Block a user