- Doxygen documentation updated

- Some minor issues stumbled upon fixed
- WIN1250 >> UTF-8
This commit is contained in:
2016-11-02 01:25:38 +01:00
parent 0387d7d593
commit d234e55ae4
61 changed files with 1840 additions and 1600 deletions

View File

@@ -22,9 +22,6 @@
namespace eap
{
///
/// MSCHAPv2 configuration
///
class config_method_mschapv2;
}
@@ -39,6 +36,12 @@ namespace eap
namespace eap
{
/// \addtogroup EAPBaseConfig
/// @{
///
/// MSCHAPv2 configuration
///
class config_method_mschapv2 : public config_method_with_cred
{
public:
@@ -82,28 +85,26 @@ namespace eap
///
config_method_mschapv2& operator=(_Inout_ config_method_mschapv2 &&other);
///
/// Clones configuration
///
/// \returns Pointer to cloned configuration
///
virtual config* clone() const;
///
/// Returns EAP method type of this configuration
///
/// \returns `eap::type_mschapv2`
/// @copydoc eap::config_method::get_method_id()
/// \returns This implementation always returns `eap::type_mschapv2`
///
virtual winstd::eap_type_t get_method_id() const;
///
/// Returns a string \c L"MSCHAPv2"
/// @copydoc eap::config_method::get_method_str()
/// \returns This implementation always returns `L"MSCHAPv2"`
///
virtual const wchar_t* get_method_str() const;
///
/// Creates a blank set of credentials suitable for this method
/// @copydoc eap::config_method::make_credentials()
/// \returns This implementation always returns `eap::credentials_pass` type of credentials
///
virtual credentials* make_credentials() const;
};
/// @}
}

View File

@@ -1,21 +1,21 @@
/*
/*
Copyright 2015-2016 Amebis
Copyright 2016 G<EFBFBD>ANT
Copyright 2016 GÉANT
This file is part of G<EFBFBD>ANTLink.
This file is part of GÉANTLink.
G<EFBFBD>ANTLink is free software: you can redistribute it and/or modify it
GÉANTLink is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
G<EFBFBD>ANTLink is distributed in the hope that it will be useful, but
GÉANTLink is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with G<EFBFBD>ANTLink. If not, see <http://www.gnu.org/licenses/>.
along with GÉANTLink. If not, see <http://www.gnu.org/licenses/>.
*/
#include <WinStd/Crypt.h>
@@ -23,30 +23,17 @@
namespace eap
{
///
/// MSCHAPv2 Challenge
///
struct challenge_mschapv2;
struct WINSTD_NOVTABLE challenge_mschapv2;
struct WINSTD_NOVTABLE challenge_hash;
struct WINSTD_NOVTABLE nt_password_hash;
struct WINSTD_NOVTABLE nt_response;
struct WINSTD_NOVTABLE authenticator_response;
///
/// MSCHAPv2 Challenge Hash
/// \defgroup MSCHAPv2 MSCHAPv2
/// Microsoft Challenge-Handshake Authentication Protocol (version 2)
///
struct challenge_hash;
///
/// NT-Password Hash
///
struct nt_password_hash;
///
/// NT-Response
///
struct nt_response;
///
/// Authenticator Response
///
struct authenticator_response;
/// @{
///
/// Creates DES encryption key with given plaintext key
@@ -55,7 +42,11 @@ namespace eap
/// \param[in] key The key (without parity bits)
/// \param[in] size Size of \p key (maximum 7B)
///
/// \returns DES encryption key
///
winstd::crypt_key create_des_key(_In_ HCRYPTPROV cp, _In_count_(size) const unsigned char *key, _In_ size_t size);
/// @}
}
#pragma once
@@ -65,10 +56,16 @@ namespace eap
namespace eap
{
/// \addtogroup MSCHAPv2
/// @{
#pragma pack(push)
#pragma pack(1)
struct __declspec(novtable) challenge_mschapv2 : public sanitizing_blob_xf<16>
///
/// MSCHAPv2 Challenge
///
struct WINSTD_NOVTABLE challenge_mschapv2 : public sanitizing_blob_xf<16>
{
///
/// Generates random challenge
@@ -79,7 +76,10 @@ namespace eap
};
struct __declspec(novtable) challenge_hash : public sanitizing_blob_xf<8>
///
/// MSCHAPv2 Challenge Hash
///
struct WINSTD_NOVTABLE challenge_hash : public sanitizing_blob_xf<8>
{
///
/// Constructor
@@ -120,7 +120,10 @@ namespace eap
};
struct __declspec(novtable) nt_password_hash : public sanitizing_blob_xf<16>
///
/// NT-Password Hash
///
struct WINSTD_NOVTABLE nt_password_hash : public sanitizing_blob_xf<16>
{
///
/// Constructor
@@ -169,7 +172,10 @@ namespace eap
};
struct __declspec(novtable) nt_response : public sanitizing_blob_xf<24>
///
/// NT-Response
///
struct WINSTD_NOVTABLE nt_response : public sanitizing_blob_xf<24>
{
///
/// Constructor
@@ -212,7 +218,10 @@ namespace eap
};
struct __declspec(novtable) authenticator_response : public sanitizing_blob_xf<20>
///
/// Authenticator Response
///
struct WINSTD_NOVTABLE authenticator_response : public sanitizing_blob_xf<20>
{
///
/// Constructor
@@ -257,4 +266,6 @@ namespace eap
};
#pragma pack(pop)
/// @}
}

View File

@@ -1,28 +1,25 @@
/*
/*
Copyright 2015-2016 Amebis
Copyright 2016 G<EFBFBD>ANT
Copyright 2016 GÉANT
This file is part of G<EFBFBD>ANTLink.
This file is part of GÉANTLink.
G<EFBFBD>ANTLink is free software: you can redistribute it and/or modify it
GÉANTLink is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
G<EFBFBD>ANTLink is distributed in the hope that it will be useful, but
GÉANTLink is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with G<EFBFBD>ANTLink. If not, see <http://www.gnu.org/licenses/>.
along with GÉANTLink. If not, see <http://www.gnu.org/licenses/>.
*/
namespace eap
{
///
/// MSCHAPv2 method
///
class method_mschapv2;
}
@@ -38,6 +35,12 @@ namespace eap
namespace eap
{
/// \addtogroup EAPBaseMethod
/// @{
///
/// MSCHAPv2 method
///
class method_mschapv2 : public method
{
WINSTD_NONCOPYABLE(method_mschapv2)
@@ -68,49 +71,34 @@ namespace eap
///
method_mschapv2& operator=(_Inout_ method_mschapv2 &&other);
/// \name Packet processing
/// \name Session management
/// @{
///
/// Starts an EAP authentication session on the peer EapHost using the EAP method.
///
/// \sa [EapPeerBeginSession function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa363600.aspx)
///
virtual void begin_session(
_In_ DWORD dwFlags,
_In_ const EapAttributes *pAttributeArray,
_In_ HANDLE hTokenImpersonateUser,
_In_opt_ DWORD dwMaxSendPacketSize = MAXDWORD);
///
/// Processes a packet received by EapHost from a supplicant.
///
/// \sa [EapPeerProcessRequestPacket function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa363621.aspx)
///
/// @}
/// \name Packet processing
/// @{
virtual EapPeerMethodResponseAction process_request_packet(
_In_bytecount_(dwReceivedPacketSize) const void *pReceivedPacket,
_In_ DWORD dwReceivedPacketSize);
///
/// Obtains a response packet from the EAP method.
///
/// \sa [EapPeerGetResponsePacket function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa363610.aspx)
///
virtual void get_response_packet(
_Out_ sanitizing_blob &packet,
_In_opt_ DWORD size_max = MAXDWORD);
///
/// Obtains the result of an authentication session from the EAP method.
///
/// \sa [EapPeerGetResult function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa363611.aspx)
///
virtual void get_result(
_In_ EapPeerMethodResultReason reason,
_Inout_ EapPeerMethodResult *pResult);
/// @}
virtual void get_result(
_In_ EapPeerMethodResultReason reason,
_Out_ EapPeerMethodResult *pResult);
friend class method_ttls; // Setting of initial challenge derived from TLS PRF
protected:
@@ -161,6 +149,9 @@ namespace eap
nt_response m_nt_resp; ///< NT-Response
bool m_success; ///< Did we receive MS-CHAP2-Success?
///
/// Communication phase
///
enum {
phase_unknown = -1, ///< Unknown phase
phase_init = 0, ///< Send client challenge
@@ -170,4 +161,6 @@ namespace eap
sanitizing_blob m_packet_res; ///< Response packet
};
/// @}
}

View File

@@ -1,21 +1,21 @@
/*
/*
Copyright 2015-2016 Amebis
Copyright 2016 G<EFBFBD>ANT
Copyright 2016 GÉANT
This file is part of G<EFBFBD>ANTLink.
This file is part of GÉANTLink.
G<EFBFBD>ANTLink is free software: you can redistribute it and/or modify it
GÉANTLink is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
G<EFBFBD>ANTLink is distributed in the hope that it will be useful, but
GÉANTLink is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with G<EFBFBD>ANTLink. If not, see <http://www.gnu.org/licenses/>.
along with GÉANTLink. If not, see <http://www.gnu.org/licenses/>.
*/
#include "StdAfx.h"

View File

@@ -1,21 +1,21 @@
/*
/*
Copyright 2015-2016 Amebis
Copyright 2016 G<EFBFBD>ANT
Copyright 2016 GÉANT
This file is part of G<EFBFBD>ANTLink.
This file is part of GÉANTLink.
G<EFBFBD>ANTLink is free software: you can redistribute it and/or modify it
GÉANTLink is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
G<EFBFBD>ANTLink is distributed in the hope that it will be useful, but
GÉANTLink is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with G<EFBFBD>ANTLink. If not, see <http://www.gnu.org/licenses/>.
along with GÉANTLink. If not, see <http://www.gnu.org/licenses/>.
*/
#include "StdAfx.h"