65 Commits

Author SHA1 Message Date
a6bdb42ece Deprecate encrypted BLOB checksum
The MD5 checksum was calculated on unencrypted data. This offered a
possibility for a dictionary attack.

Signed-off-by: Simon Rozman <simon@rozman.si>
2020-05-13 08:26:07 +02:00
75488ba870 credentials: Move user impersonation to peer::get_identity()
To retrieve user credentials, EapHost provides us the interactive user's
token we can use to impersonate.

By doing the impersonation early in peer::get_identity(), we don't need
to pass the token down the lower methods. This is rather a
simplification than a performance optimization.

Signed-off-by: Simon Rozman <simon@rozman.si>
2020-02-07 13:10:57 +01:00
e8b1e157d9 module: Make make_config() pure virtual
It is important to implement this method in derived classes. When we
provided default implementation returning NULL, introducing new methods
might leave this method not implemented without a compiler error.

Signed-off-by: Simon Rozman <simon@rozman.si>
2020-02-07 13:10:57 +01:00
6511d826a0 peer: Move all generic methods upstream from peer_tls_base
Signed-off-by: Simon Rozman <simon@rozman.si>
2020-02-07 13:10:57 +01:00
5b02352f1a Resolve the make_...() methods
Signed-off-by: Simon Rozman <simon@rozman.si>
2020-02-07 13:10:56 +01:00
1d558c939e Rename method_tls_tunnel to method_tls and move upstream
CRL checking was also moved upstream as method_tls triggers it.

Signed-off-by: Simon Rozman <simon@rozman.si>
2020-02-07 13:10:37 +01:00
9e9648c924 Make modules and methods non-copyable & non-movable
Modules and methods are never duplicated or moved in a memory. Moving
constructors and operators are dead code.

Signed-off-by: Simon Rozman <simon@rozman.si>
2020-02-06 11:53:42 +01:00
5a7827e85e Make enums scoped
Signed-off-by: Simon Rozman <simon@rozman.si>
2020-02-06 11:53:38 +01:00
840e055bf6 Relocate data encryption key
Signed-off-by: Simon Rozman <simon@rozman.si>
2020-02-06 11:52:44 +01:00
059710d83c Update Copyright year
Signed-off-by: Simon Rozman <simon@rozman.si>
2020-02-05 11:45:51 +01:00
fac33ee0b1 Remove UTF-8 BOM
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-11-28 17:04:16 +01:00
6fb5cb88d2 Address code analysis warnings
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-09-04 13:11:48 +02:00
058ec398e6 __DANGEROUS__LOG_CONFIDENTIAL_DATA is now 0/1 #defined 2017-02-02 13:57:44 +01:00
57372b8f95 Simple BLOB encryption/decryption added & comment updates 2017-02-01 10:23:07 +01:00
172cd18c16 Missing namespace added 2017-02-01 09:54:17 +01:00
e8d2e33aac WideCharToMultiByte() and MultiByteToWideChar() optimization 2016-11-07 13:44:40 +01:00
3b6d2b2c14 Password and certificate output to log is no longer conditioned by _DEBUG 2016-11-07 10:48:13 +01:00
d234e55ae4 - Doxygen documentation updated
- Some minor issues stumbled upon fixed
- WIN1250 >> UTF-8
2016-11-02 01:25:38 +01:00
0d8f243d31 eap::module::make_error() extended to support EAP_ERROR duplication 2016-10-31 16:23:42 +01:00
d87b3d37e5 Discrete output of credentials to event log centralized 2016-10-25 13:37:39 +02:00
7d1668e2e0 Configuration value logging replaced with array variant instead of varadic event_provider::write() method for performance reasons 2016-10-25 13:04:12 +02:00
e7e1a6735d pEapOutput Prefast specifier for process_request_packet() methods changed 2016-10-24 14:55:31 +02:00
2c91b6ca8c pEapOutput Prefast specifier for set_response_attributes() methods changed 2016-10-24 14:42:56 +02:00
0d73e2f7a2 Incorrect pEapOutput in method::set_ui_context() methods fixed 2016-10-24 14:11:15 +02:00
a1f9a7bab9 ppResult >> pResult 2016-10-24 13:33:01 +02:00
c53ed21d55 Code clean-up 2016-10-03 14:54:02 +02:00
559ffc5ead ID 3. C style pointer casting from security audit fixed 2016-10-03 14:53:50 +02:00
bb8e766db7 Module decryption templates fixed 2016-09-26 10:18:55 +02:00
79cc1af86f Clean-up and XML handling enhancement:
- XML helper functions always return objects by winstd::com_obj or winstd::bstr reference now to ensure proper release by caller
- get_element_value()/put_element_value() can optionally return reference to the XML object if required
- WinStd macros to simplify dplhandle<> and handle<> inherited classes reused by non-copyable classes
2016-09-23 14:43:31 +02:00
9daa5b52a4 Incorrect letter case referencing EapHost service fixed 2016-08-27 06:58:57 +02:00
1bf51fda25 win_runtime_error moved to WinStd; eapxml functions return HRESULT now 2016-08-09 01:05:00 +02:00
b71e30f642 EAP_ERROR replaced with C++ exceptions for increased code readability 2016-08-08 22:59:17 +02:00
a0efb6742d EAP-TTLS work continues... 2016-08-06 16:27:15 +02:00
4114863a94 Duplicate error logging removed 2016-08-06 08:21:14 +02:00
afe5450b95 Peer (Main.cpp) no longer manipulates session directly. Session management moved to eap::peer. 2016-08-06 08:06:38 +02:00
2711425677 Documentation update 2016-08-05 15:52:27 +02:00
54bb2050fa peer and peer_ui are no longer templates; method specific BLOB management moved from Main(_UI).cpp to modules. 2016-08-05 15:45:45 +02:00
437f5f91b8 eap::peer<> and eap::session<> redundant template argument removed 2016-08-05 13:45:18 +02:00
91dcc0bbbc peer_base eliminated 2016-08-05 13:40:54 +02:00
a60458cdab eap::module is no longer abstract 2016-08-05 13:18:25 +02:00
460adb9858 m_module is now a pointer instead of reference 2016-08-05 11:23:59 +02:00
f2aa43913d EAP-TTLS session development continues... 2016-08-05 00:32:57 +02:00
a102b43a19 eap::type_t >> winstd::eap_type_t 2016-08-04 12:08:20 +02:00
3e82b7df49 eap::method_property => winstd::eap_method_prop 2016-08-03 15:09:58 +02:00
cb24fbd6a3 eap::peer_ttls::get_method_properties() implemented 2016-08-03 13:50:12 +02:00
6ae8029a47 config_method split into config_method and config_method_with_cred<> 2016-07-21 22:30:03 +02:00
6d8bd3f1c1 Cached credentials are correctly honored now 2016-07-21 13:21:40 +02:00
627b20aabc pack() => operator <<, unpack() => operator >>, get_pk_size() => pksizeof() 2016-07-21 09:20:09 +02:00
51428d290f Memory overflow detection when packing/unpacking BLOB added 2016-07-20 19:29:21 +02:00
9376404164 eap::config_provider changed from template to class followed by a mass detemplatization of other classes 2016-07-20 17:57:43 +02:00