unit1600.c
Go to the documentation of this file.
00001 /***************************************************************************
00002  *                                  _   _ ____  _
00003  *  Project                     ___| | | |  _ \| |
00004  *                             / __| | | | |_) | |
00005  *                            | (__| |_| |  _ <| |___
00006  *                             \___|\___/|_| \_\_____|
00007  *
00008  * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
00009  *
00010  * This software is licensed as described in the file COPYING, which
00011  * you should have received as part of this distribution. The terms
00012  * are also available at https://curl.haxx.se/docs/copyright.html.
00013  *
00014  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
00015  * copies of the Software, and permit persons to whom the Software is
00016  * furnished to do so, under the terms of the COPYING file.
00017  *
00018  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
00019  * KIND, either express or implied.
00020  *
00021  ***************************************************************************/
00022 #include "curlcheck.h"
00023 
00024 #include "urldata.h"
00025 #include "curl_ntlm_core.h"
00026 
00027 CURL *easy;
00028 
00029 static CURLcode unit_setup(void)
00030 {
00031   easy = curl_easy_init();
00032   return CURLE_OK;
00033 }
00034 
00035 static void unit_stop(void)
00036 {
00037   curl_easy_cleanup(easy);
00038 }
00039 
00040 UNITTEST_START
00041 
00042 #if defined(USE_NTLM) && (!defined(USE_WINDOWS_SSPI) || \
00043                           defined(USE_WIN32_CRYPTO))
00044   unsigned char output[21];
00045   unsigned char *testp = output;
00046   Curl_ntlm_core_mk_nt_hash(easy, "1", output);
00047 
00048   verify_memory(testp,
00049               "\x69\x94\x3c\x5e\x63\xb4\xd2\xc1\x04\xdb"
00050               "\xbc\xc1\x51\x38\xb7\x2b\x00\x00\x00\x00\x00", 21);
00051 
00052   Curl_ntlm_core_mk_nt_hash(easy, "hello-you-fool", output);
00053 
00054   verify_memory(testp,
00055               "\x39\xaf\x87\xa6\x75\x0a\x7a\x00\xba\xa0"
00056               "\xd3\x4f\x04\x9e\xc1\xd0\x00\x00\x00\x00\x00", 21);
00057 
00058 /* !checksrc! disable LONGLINE 2 */
00059   Curl_ntlm_core_mk_nt_hash(easy, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", output);
00060 
00061   verify_memory(testp,
00062                 "\x36\x9d\xae\x06\x84\x7e\xe1\xc1\x4a\x94\x39\xea\x6f\x44\x8c\x65\x00\x00\x00\x00\x00", 21);
00063 #endif
00064 
00065 UNITTEST_STOP


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:07