unit1600.c
Go to the documentation of this file.
1 /***************************************************************************
2  * _ _ ____ _
3  * Project ___| | | | _ \| |
4  * / __| | | | |_) | |
5  * | (__| |_| | _ <| |___
6  * \___|\___/|_| \_\_____|
7  *
8  * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
9  *
10  * This software is licensed as described in the file COPYING, which
11  * you should have received as part of this distribution. The terms
12  * are also available at https://curl.haxx.se/docs/copyright.html.
13  *
14  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15  * copies of the Software, and permit persons to whom the Software is
16  * furnished to do so, under the terms of the COPYING file.
17  *
18  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19  * KIND, either express or implied.
20  *
21  ***************************************************************************/
22 #include "curlcheck.h"
23 
24 #include "urldata.h"
25 #include "curl_ntlm_core.h"
26 
27 static CURL *easy;
28 
29 static CURLcode unit_setup(void)
30 {
31  int res = CURLE_OK;
32 
34  easy = curl_easy_init();
35  if(!easy)
36  return CURLE_OUT_OF_MEMORY;
37  return res;
38 }
39 
40 static void unit_stop(void)
41 {
44 }
45 
47 
48 #if defined(USE_NTLM) && (!defined(USE_WINDOWS_SSPI) || \
49  defined(USE_WIN32_CRYPTO))
50  unsigned char output[21];
51  unsigned char *testp = output;
52  Curl_ntlm_core_mk_nt_hash(easy, "1", output);
53 
55  "\x69\x94\x3c\x5e\x63\xb4\xd2\xc1\x04\xdb"
56  "\xbc\xc1\x51\x38\xb7\x2b\x00\x00\x00\x00\x00", 21);
57 
58  Curl_ntlm_core_mk_nt_hash(easy, "hello-you-fool", output);
59 
61  "\x39\xaf\x87\xa6\x75\x0a\x7a\x00\xba\xa0"
62  "\xd3\x4f\x04\x9e\xc1\xd0\x00\x00\x00\x00\x00", 21);
63 
64 /* !checksrc! disable LONGLINE 2 */
65  Curl_ntlm_core_mk_nt_hash(easy, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", output);
66 
68  "\x36\x9d\xae\x06\x84\x7e\xe1\xc1\x4a\x94\x39\xea\x6f\x44\x8c\x65\x00\x00\x00\x00\x00", 21);
69 #endif
70 
#define UNITTEST_START
Definition: curlcheck.h:86
static CURL * easy
Definition: unit1600.c:27
#define global_init(A)
Definition: test.h:431
CURLcode
Definition: curl.h:454
static int res
unsigned char * testp
Definition: unit1601.c:40
UNITTEST_START char * output
Definition: unit1302.c:50
#define verify_memory(dynamic, check, len)
Definition: curlcheck.h:39
CURL_EXTERN CURL * curl_easy_init(void)
Definition: easy.c:343
static void unit_stop(void)
Definition: unit1600.c:40
CURL_EXTERN void curl_easy_cleanup(CURL *curl)
Definition: curl.h:455
#define UNITTEST_STOP
Definition: curlcheck.h:95
void CURL
Definition: curl.h:102
CURL_EXTERN void curl_global_cleanup(void)
curl_global_cleanup() globally cleanups curl, uses the value of "init_flags" to determine what needs ...
Definition: easy.c:312
#define CURL_GLOBAL_ALL
Definition: curl.h:2519
static CURLcode unit_setup(void)
Definition: unit1600.c:29


rc_tagdetect_client
Author(s): Monika Florek-Jasinska , Raphael Schaller
autogenerated on Sat Feb 13 2021 03:42:16