diff options
author | Simo Sorce <simo@redhat.com> | 2014-08-10 09:31:59 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2014-08-10 14:29:38 -0400 |
commit | 4149cbd77bba720db460f42fcd88e547ba2bbdfc (patch) | |
tree | 4196556735581a73558132bbdaa1751875aa6695 /tests | |
parent | fb6ffe0c50e166bf095736a051e4840bd5a5ad4f (diff) | |
download | gss-ntlmssp-4149cbd77bba720db460f42fcd88e547ba2bbdfc.tar.gz gss-ntlmssp-4149cbd77bba720db460f42fcd88e547ba2bbdfc.tar.xz gss-ntlmssp-4149cbd77bba720db460f42fcd88e547ba2bbdfc.zip |
Add support for printing internal NTLM error codes
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ntlmssptest.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ntlmssptest.c b/tests/ntlmssptest.c index ddc9d75..e549c3b 100644 --- a/tests/ntlmssptest.c +++ b/tests/ntlmssptest.c @@ -1425,6 +1425,17 @@ static void print_min_status(uint32_t err) } while (msgctx); } +int test_Errors(void) +{ + int i; + for (i = ERR_BASE; i < ERR_LAST; i++) { + fprintf(stderr, "%x: ", i); + print_min_status(i); + fprintf(stderr, "\n"); + } + return 0; +} + static void print_gss_error(const char *text, uint32_t maj, uint32_t min) { @@ -1978,6 +1989,10 @@ int main(int argc, const char *argv[]) /* enable trace debugging by dfault in tests */ setenv("GSSNTLMSSP_DEBUG", "tests-trace.log", 0); + fprintf(stdout, "Test errors\n"); + ret = test_Errors(); + fprintf(stdout, "Test: %s\n", (ret ? "FAIL":"SUCCESS")); + ret = ntlm_init_ctx(&ctx); if (ret) goto done; |