diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2015-02-03 10:44:41 +0100 | 
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2015-02-03 20:37:44 +0100 | 
| commit | 6b68aa989c9d5f6c031e992f44e5ad792ab48994 (patch) | |
| tree | c37134e94bfa6ef7755adf2eea96401f74f175d7 /tests/unit/unit1600.c | |
| parent | 8f027aa0bf5eca33a812ae8a7e92d128f90e1508 (diff) | |
unit1600: NTLM unit test
Diffstat (limited to 'tests/unit/unit1600.c')
| -rw-r--r-- | tests/unit/unit1600.c | 50 | 
1 files changed, 50 insertions, 0 deletions
| diff --git a/tests/unit/unit1600.c b/tests/unit/unit1600.c new file mode 100644 index 000000000..3cc0ebd8e --- /dev/null +++ b/tests/unit/unit1600.c @@ -0,0 +1,50 @@ +/*************************************************************************** + *                                  _   _ ____  _ + *  Project                     ___| | | |  _ \| | + *                             / __| | | | |_) | | + *                            | (__| |_| |  _ <| |___ + *                             \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at http://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ +#include "curlcheck.h" + +#include "urldata.h" +#include "curl_ntlm_core.h" + +CURL *easy; + +static CURLcode unit_setup(void) +{ +  easy = curl_easy_init(); +  return CURLE_OK; +} + +static void unit_stop(void) +{ +  curl_easy_cleanup(easy); +} + +UNITTEST_START + +  unsigned char output[21]; +  unsigned char *testp = output; +  Curl_ntlm_core_mk_nt_hash(easy, "1", output); + +  verify_memory(testp, +              "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +              "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 21); + +UNITTEST_STOP | 
