diff options
-rw-r--r-- | libfreerdp-core/credssp.c | 14 | ||||
-rw-r--r-- | libfreerdp-core/ntlmssp.c | 54 |
2 files changed, 36 insertions, 32 deletions
diff --git a/libfreerdp-core/credssp.c b/libfreerdp-core/credssp.c index a80cd7b..773061e 100644 --- a/libfreerdp-core/credssp.c +++ b/libfreerdp-core/credssp.c @@ -39,7 +39,9 @@ #include <time.h> #include "ntlmssp.h" #include <freerdp/rdpset.h> +#include <freerdp/types/base.h> #include <freerdp/utils/memory.h> +#include <freerdp/utils/hexdump.h> #include "credssp.h" @@ -189,15 +191,15 @@ void credssp_encrypt_public_key(rdpCredssp *credssp, DATABLOB *d) #ifdef WITH_DEBUG_NLA printf("Public Key (length = %d)\n", credssp->public_key.length); - hexdump(credssp->public_key.data, credssp->public_key.length); + freerdp_hexdump(credssp->public_key.data, credssp->public_key.length); printf("\n"); printf("Encrypted Public Key (length = %d)\n", encrypted_public_key.length); - hexdump(encrypted_public_key.data, encrypted_public_key.length); + freerdp_hexdump(encrypted_public_key.data, encrypted_public_key.length); printf("\n"); printf("Signature\n"); - hexdump(signature, 16); + freerdp_hexdump(signature, 16); printf("\n"); #endif @@ -262,15 +264,15 @@ void credssp_encrypt_ts_credentials(rdpCredssp *credssp, DATABLOB *d) #ifdef WITH_DEBUG_NLA printf("TSCredentials (length = %d)\n", credssp->ts_credentials.length); - hexdump(credssp->ts_credentials.data, credssp->ts_credentials.length); + freerdp_hexdump(credssp->ts_credentials.data, credssp->ts_credentials.length); printf("\n"); printf("Encrypted TSCredentials (length = %d)\n", encrypted_ts_credentials.length); - hexdump(encrypted_ts_credentials.data, encrypted_ts_credentials.length); + freerdp_hexdump(encrypted_ts_credentials.data, encrypted_ts_credentials.length); printf("\n"); printf("Signature\n"); - hexdump(signature, 16); + freerdp_hexdump(signature, 16); printf("\n"); #endif diff --git a/libfreerdp-core/ntlmssp.c b/libfreerdp-core/ntlmssp.c index b89fed2..218d10f 100644 --- a/libfreerdp-core/ntlmssp.c +++ b/libfreerdp-core/ntlmssp.c @@ -27,7 +27,9 @@ #include <openssl/hmac.h> #include <openssl/rand.h> #include <openssl/engine.h> +#include <freerdp/types/base.h> #include <freerdp/utils/memory.h> +#include <freerdp/utils/hexdump.h> #include "ntlmssp.h" @@ -539,19 +541,19 @@ void ntlmssp_compute_ntlm_v2_response(NTLMSSP *ntlmssp) #ifdef WITH_DEBUG_NLA printf("Password (length = %d)\n", ntlmssp->password.length); - hexdump(ntlmssp->password.data, ntlmssp->password.length); + freerdp_hexdump(ntlmssp->password.data, ntlmssp->password.length); printf("\n"); printf("Username (length = %d)\n", ntlmssp->username.length); - hexdump(ntlmssp->username.data, ntlmssp->username.length); + freerdp_hexdump(ntlmssp->username.data, ntlmssp->username.length); printf("\n"); printf("Domain (length = %d)\n", ntlmssp->domain.length); - hexdump(ntlmssp->domain.data, ntlmssp->domain.length); + freerdp_hexdump(ntlmssp->domain.data, ntlmssp->domain.length); printf("\n"); printf("NTOWFv2, NTLMv2 Hash\n"); - hexdump(ntlm_v2_hash, 16); + freerdp_hexdump(ntlm_v2_hash, 16); printf("\n"); #endif @@ -567,7 +569,7 @@ void ntlmssp_compute_ntlm_v2_response(NTLMSSP *ntlmssp) #ifdef WITH_DEBUG_NLA printf("NTLMv2 Response Temp Blob\n"); - hexdump(ntlm_v2_temp.data, ntlm_v2_temp.length); + freerdp_hexdump(ntlm_v2_temp.data, ntlm_v2_temp.length); printf("\n"); #endif @@ -1204,7 +1206,7 @@ void ntlmssp_send_negotiate_message(NTLMSSP *ntlmssp, STREAM s) #ifdef WITH_DEBUG_NLA printf("NEGOTIATE_MESSAGE (length = %d)\n", length); - hexdump(s->data, length); + freerdp_hexdump(s->data, length); printf("\n"); #endif @@ -1270,7 +1272,7 @@ void ntlmssp_recv_challenge_message(NTLMSSP *ntlmssp, STREAM s) #ifdef WITH_DEBUG_NLA printf("targetName (length = %d, offset = %d)\n", targetNameLen, targetNameBufferOffset); - hexdump(ntlmssp->target_name.data, ntlmssp->target_name.length); + freerdp_hexdump(ntlmssp->target_name.data, ntlmssp->target_name.length); printf("\n"); #endif } @@ -1283,7 +1285,7 @@ void ntlmssp_recv_challenge_message(NTLMSSP *ntlmssp, STREAM s) #ifdef WITH_DEBUG_NLA printf("targetInfo (length = %d, offset = %d)\n", targetInfoLen, targetInfoBufferOffset); - hexdump(ntlmssp->target_info.data, ntlmssp->target_info.length); + freerdp_hexdump(ntlmssp->target_info.data, ntlmssp->target_info.length); printf("\n"); #endif @@ -1301,7 +1303,7 @@ void ntlmssp_recv_challenge_message(NTLMSSP *ntlmssp, STREAM s) #ifdef WITH_DEBUG_NLA printf("CHALLENGE_MESSAGE (length = %d)\n", length); - hexdump(start_offset, length); + freerdp_hexdump(start_offset, length); printf("\n"); #endif @@ -1311,7 +1313,7 @@ void ntlmssp_recv_challenge_message(NTLMSSP *ntlmssp, STREAM s) #ifdef WITH_DEBUG_NLA printf("targetInfo (populated) (length = %d)\n", ntlmssp->target_info.length); - hexdump(ntlmssp->target_info.data, ntlmssp->target_info.length); + freerdp_hexdump(ntlmssp->target_info.data, ntlmssp->target_info.length); printf("\n"); #endif @@ -1346,39 +1348,39 @@ void ntlmssp_recv_challenge_message(NTLMSSP *ntlmssp, STREAM s) #ifdef WITH_DEBUG_NLA printf("ClientChallenge\n"); - hexdump(ntlmssp->client_challenge, 8); + freerdp_hexdump(ntlmssp->client_challenge, 8); printf("\n"); printf("ServerChallenge\n"); - hexdump(ntlmssp->server_challenge, 8); + freerdp_hexdump(ntlmssp->server_challenge, 8); printf("\n"); printf("SessionBaseKey\n"); - hexdump(ntlmssp->session_base_key, 16); + freerdp_hexdump(ntlmssp->session_base_key, 16); printf("\n"); printf("KeyExchangeKey\n"); - hexdump(ntlmssp->key_exchange_key, 16); + freerdp_hexdump(ntlmssp->key_exchange_key, 16); printf("\n"); printf("ExportedSessionKey\n"); - hexdump(ntlmssp->exported_session_key, 16); + freerdp_hexdump(ntlmssp->exported_session_key, 16); printf("\n"); printf("RandomSessionKey\n"); - hexdump(ntlmssp->random_session_key, 16); + freerdp_hexdump(ntlmssp->random_session_key, 16); printf("\n"); printf("ClientSignKey\n"); - hexdump(ntlmssp->client_signing_key, 16); + freerdp_hexdump(ntlmssp->client_signing_key, 16); printf("\n"); printf("ClientSealingKey\n"); - hexdump(ntlmssp->client_sealing_key, 16); + freerdp_hexdump(ntlmssp->client_sealing_key, 16); printf("\n"); printf("Timestamp\n"); - hexdump(ntlmssp->timestamp, 8); + freerdp_hexdump(ntlmssp->timestamp, 8); printf("\n"); #endif @@ -1535,7 +1537,7 @@ void ntlmssp_send_authenticate_message(NTLMSSP *ntlmssp, STREAM s) out_uint8p(s, DomainNameBuffer, DomainNameLen); #ifdef WITH_DEBUG_NLA printf("DomainName (length = %d, offset = %d)\n", DomainNameLen, DomainNameBufferOffset); - hexdump(DomainNameBuffer, DomainNameLen); + freerdp_hexdump(DomainNameBuffer, DomainNameLen); printf("\n"); #endif } @@ -1545,7 +1547,7 @@ void ntlmssp_send_authenticate_message(NTLMSSP *ntlmssp, STREAM s) #ifdef WITH_DEBUG_NLA printf("UserName (length = %d, offset = %d)\n", UserNameLen, UserNameBufferOffset); - hexdump(UserNameBuffer, UserNameLen); + freerdp_hexdump(UserNameBuffer, UserNameLen); printf("\n"); #endif @@ -1555,7 +1557,7 @@ void ntlmssp_send_authenticate_message(NTLMSSP *ntlmssp, STREAM s) out_uint8p(s, WorkstationBuffer, WorkstationLen); #ifdef WITH_DEBUG_NLA printf("Workstation (length = %d, offset = %d)\n", WorkstationLen, WorkstationBufferOffset); - hexdump(WorkstationBuffer, WorkstationLen); + freerdp_hexdump(WorkstationBuffer, WorkstationLen); printf("\n"); #endif } @@ -1565,7 +1567,7 @@ void ntlmssp_send_authenticate_message(NTLMSSP *ntlmssp, STREAM s) #ifdef WITH_DEBUG_NLA printf("LmChallengeResponse (length = %d, offset = %d)\n", LmChallengeResponseLen, LmChallengeResponseBufferOffset); - hexdump(ntlmssp->lm_challenge_response.data, LmChallengeResponseLen); + freerdp_hexdump(ntlmssp->lm_challenge_response.data, LmChallengeResponseLen); printf("\n"); #endif @@ -1574,7 +1576,7 @@ void ntlmssp_send_authenticate_message(NTLMSSP *ntlmssp, STREAM s) #ifdef WITH_DEBUG_NLA printf("NtChallengeResponse (length = %d, offset = %d)\n", NtChallengeResponseLen, NtChallengeResponseBufferOffset); - hexdump(ntlmssp->nt_challenge_response.data, NtChallengeResponseLen); + freerdp_hexdump(ntlmssp->nt_challenge_response.data, NtChallengeResponseLen); printf("\n"); #endif @@ -1584,7 +1586,7 @@ void ntlmssp_send_authenticate_message(NTLMSSP *ntlmssp, STREAM s) #ifdef WITH_DEBUG_NLA printf("EncryptedRandomSessionKey (length = %d, offset = %d)\n", EncryptedRandomSessionKeyLen, EncryptedRandomSessionKeyBufferOffset); - hexdump(EncryptedRandomSessionKeyBuffer, EncryptedRandomSessionKeyLen); + freerdp_hexdump(EncryptedRandomSessionKeyBuffer, EncryptedRandomSessionKeyLen); printf("\n"); #endif @@ -1603,7 +1605,7 @@ void ntlmssp_send_authenticate_message(NTLMSSP *ntlmssp, STREAM s) #ifdef WITH_DEBUG_NLA printf("AUTHENTICATE_MESSAGE (length = %d)\n", length); - hexdump(s->data, length); + freerdp_hexdump(s->data, length); printf("\n"); #endif |