1 #ifndef HEADER_CURL_NTLM_CORE_H 2 #define HEADER_CURL_NTLM_CORE_H 31 #if !defined(USE_OPENSSL) && \ 32 !defined(USE_GNUTLS_NETTLE) && \ 33 !defined(USE_GNUTLS) && \ 35 #define NTLM_NEEDS_NSS_INIT 38 #if !defined(USE_WINDOWS_SSPI) || defined(USE_WIN32_CRYPTO) 41 # include <openssl/ssl.h> 46 #if !defined(USE_OPENSSL) || !defined(OPENSSL_NO_MD4) 47 #define USE_NTRESPONSES 53 #if defined(USE_NTRESPONSES) && !defined(USE_WIN32_CRYPTO) 54 #define USE_NTLM2SESSION 60 #if defined(USE_NTRESPONSES) && (CURL_SIZEOF_CURL_OFF_T > 4) 64 void Curl_ntlm_core_lm_resp(
const unsigned char *keys,
65 const unsigned char *plaintext,
66 unsigned char *results);
70 unsigned char *lmbuffer );
72 #ifdef USE_NTRESPONSES 75 unsigned char *ntbuffer );
77 #if defined(USE_NTLM_V2) && !defined(USE_WINDOWS_SSPI) 79 CURLcode Curl_hmac_md5(
const unsigned char *
key,
unsigned int keylen,
80 const unsigned char *
data,
unsigned int datalen,
83 CURLcode Curl_ntlm_core_mk_ntlmv2_hash(
const char *user,
size_t userlen,
84 const char *domain,
size_t domlen,
85 unsigned char *ntlmhash,
86 unsigned char *ntlmv2hash);
88 CURLcode Curl_ntlm_core_mk_ntlmv2_resp(
unsigned char *ntlmv2hash,
89 unsigned char *challenge_client,
90 struct ntlmdata *ntlm,
91 unsigned char **ntresp,
92 unsigned int *ntresp_len);
94 CURLcode Curl_ntlm_core_mk_lmv2_resp(
unsigned char *ntlmv2hash,
95 unsigned char *challenge_client,
96 unsigned char *challenge_server,
97 unsigned char *lmresp);
UNITTEST_START char * output