winstd::eap_attr tested and stabilized
This commit is contained in:
parent
25c886754d
commit
028979524a
@ -63,7 +63,7 @@ namespace winstd
|
||||
///
|
||||
/// EAP_ATTRIBUTE wrapper class
|
||||
///
|
||||
class WINSTD_API eap_attr : public EAP_ATTRIBUTE
|
||||
class WINSTD_API __declspec(novtable) eap_attr : public EAP_ATTRIBUTE
|
||||
{
|
||||
public:
|
||||
///
|
||||
@ -94,12 +94,13 @@ namespace winstd
|
||||
///
|
||||
/// Moves an existing EAP attribute.
|
||||
///
|
||||
inline eap_attr(_Inout_ EAP_ATTRIBUTE &&a)
|
||||
inline eap_attr(_Inout_ eap_attr &&a)
|
||||
{
|
||||
eaType = a.eaType;
|
||||
dwLength = a.dwLength;
|
||||
if (a.dwLength) {
|
||||
pValue = a.pValue;
|
||||
a.dwLength = 0;
|
||||
a.pValue = NULL;
|
||||
} else
|
||||
pValue = NULL;
|
||||
@ -108,7 +109,7 @@ namespace winstd
|
||||
///
|
||||
/// Destroys the EAP attribute.
|
||||
///
|
||||
virtual ~eap_attr();
|
||||
~eap_attr();
|
||||
|
||||
///
|
||||
/// Copies an existing EAP attribute.
|
||||
@ -136,7 +137,7 @@ namespace winstd
|
||||
///
|
||||
/// Moves an existing EAP attribute.
|
||||
///
|
||||
inline eap_attr& operator=(_Inout_ EAP_ATTRIBUTE &&a)
|
||||
inline eap_attr& operator=(_Inout_ eap_attr &&a)
|
||||
{
|
||||
if (this != &a) {
|
||||
eaType = a.eaType;
|
||||
@ -145,6 +146,7 @@ namespace winstd
|
||||
delete [] pValue;
|
||||
if (a.dwLength) {
|
||||
pValue = a.pValue;
|
||||
a.dwLength = 0;
|
||||
a.pValue = NULL;
|
||||
} else
|
||||
pValue = NULL;
|
||||
@ -169,7 +171,7 @@ namespace winstd
|
||||
///
|
||||
/// EAP_METHOD_PROPERTY wrapper class
|
||||
///
|
||||
class WINSTD_API eap_method_prop : public EAP_METHOD_PROPERTY
|
||||
class WINSTD_API __declspec(novtable) eap_method_prop : public EAP_METHOD_PROPERTY
|
||||
{
|
||||
public:
|
||||
///
|
||||
|
@ -34,7 +34,7 @@ winstd::eap_attr::~eap_attr()
|
||||
|
||||
void winstd::eap_attr::create_ms_mppe_key(_In_ BYTE bVendorType, _In_count_(nKeySize) LPCBYTE pbKey, _In_ BYTE nKeySize)
|
||||
{
|
||||
BYTE nPaddingLength = (BYTE)((16 - (1 + nKeySize)) % 16);
|
||||
BYTE nPaddingLength = (BYTE)((16 - (1 + (DWORD)nKeySize)) % 16);
|
||||
DWORD dwLengthNew =
|
||||
4 + // Vendor-Id
|
||||
1 + // Vendor type
|
||||
|
Loading…
x
Reference in New Issue
Block a user