summaryrefslogtreecommitdiff
path: root/libcli/auth/tests
AgeCommit message (Collapse)AuthorFilesLines
2026-01-20lib: Remove &data_blob_null refsVolker Lendecke1-1/+2
The next patch will remove the data_blob_null global constant. The APIs here are a bit weird in that they don't work fine with a NULL pointer but require a reference to a NULL blob. But that's few enough to add the special case in the callers. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2024-05-14test: Align integer typesVolker Lendecke1-2/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2023-06-30Remove rudundent check and fallback for AES CFB8 as we now require GnuTLS 3.6.13Andrew Bartlett1-4/+0
This allows us to remove a lot of conditionally compiled code and so know with more certaintly that our tests are covering our codepaths. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2022-07-28libcli:auth: Add test for decode_pwd_string_from_buffer514()Andreas Schneider1-0/+17
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2022-07-28libcli:auth: Add test for extract_pwd_blob_from_buffer514()Andreas Schneider1-0/+17
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2022-07-28libcli:auth: Add test for encode_pwd_buffer514_from_str()Andreas Schneider1-0/+128
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-12-10smbdes: remove old unused DES builtin-cryptoIsaac Boukris1-6/+0
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10session: convert sess_crypt_blob to use gnutlsIsaac Boukris1-2/+5
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10smbdes: convert des_crypt112_16 to use gnutlsIsaac Boukris1-2/+5
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10smbdes: convert des_crypt112 to use gnutlsIsaac Boukris1-2/+5
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10smbdes: convert E_old_pw_hash to use gnutlsIsaac Boukris1-1/+3
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10smbdes: convert des_crypt128() to use gnutlsIsaac Boukris1-1/+3
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10smbdes: convert E_P24() and SMBOWFencrypt to use gnutlsIsaac Boukris1-2/+6
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10smbdes: convert E_P16() to use gnutlsIsaac Boukris1-1/+4
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10smbdes: convert sam_rid_crypt() to use gnutlsIsaac Boukris1-2/+5
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10SMBsesskeygen_lm_sess_key: use gnutls and return NTSTATUSIsaac Boukris1-1/+3
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10smbdes: add des_crypt56_gnutls() using DES-CBC with zeroed IVIsaac Boukris1-0/+9
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10selftest: test sess_crypt_blobIsaac Boukris1-0/+29
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10selftest: test SMBsesskeygen_lm_sess_keyIsaac Boukris1-0/+23
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10selftest: test des_crypt112_16Isaac Boukris1-0/+26
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10selftest: test des_crypt112 and fix (unused) decryptionIsaac Boukris1-0/+24
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10selftest: test des_crypt128Isaac Boukris1-0/+20
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10selftest: test E_old_pw_hashIsaac Boukris1-0/+22
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10selftest: test E_P24 and SMBOWFencryptIsaac Boukris1-0/+44
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10selftest: test sam_rid_cryptIsaac Boukris1-0/+23
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10selftest: test E_P16Isaac Boukris1-0/+20
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10libcli/auth: test des_crypt56() and add test_gnutls to selftestIsaac Boukris1-0/+24
Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10auth:tests: Only enable torture_gnutls_aes_128_cfb() on GnuTLS >= 3.6.11Andreas Schneider1-2/+2
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10auth:tests: Improve debug output of test_gnutlsAndreas Schneider1-2/+8
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-10-07libcli/auth: add gnutls test for aes-128-cfb8 cipher bugGünther Deschner1-0/+239
Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Oct 7 09:31:35 UTC 2019 on sn-devel-184
2019-10-07libcli/auth: add test for gensec_schannel codeGünther Deschner1-0/+305
Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2019-07-26libcli:auth: Add test for (encode|decode)_wkssvc_join_password_bufferAndreas Schneider1-0/+129
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14031 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-07-26libcli:auth: Add test for encode_rc4_passwd_buffer()Andreas Schneider1-0/+31
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14031 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-07-26libcli:auth: Pass samr_CryptPasswordEx to decode_rc4_passwd_buffer()Andreas Schneider1-2/+3
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14031 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-07-26libcli:auth: Rename encode_or_decode_arc4_passwd_buffer()Andreas Schneider1-4/+2
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14031 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-07-26libcli:auth: Add test for decoding an RC4 password bufferAndreas Schneider1-0/+177
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14031 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-02-27libcli:auth: Remove unused header fileAndreas Schneider1-1/+0
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Feb 27 10:00:32 UTC 2019 on sn-devel-144
2019-02-03libcli: Solaris cc can't return void valuesVolker Lendecke1-2/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2018-08-24Fix uClibc build on 64bit platforms by including stdint.hBernd Kuhls1-0/+1
Fixes an error detected by buildroot autobuilders: http://autobuild.buildroot.net/results/573/573e2268e205e10d1352fa81122d8f225fdb4575/build-end.log /home/rclinux/rc-buildroot-test/scripts/instance-1/output/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/stdint.h:122:27: error: conflicting types for 'uintptr_t' typedef unsigned long int uintptr_t; ^ In file included from ../lib/ldb/tests/ldb_msg.c:17:0: ../third_party/cmocka/cmocka.h:126:28: note: previous declaration of 'uintptr_t' was here typedef unsigned int uintptr_t; The define __WORDSIZE is missing when cmocka.h decides how to define uintptr_t, this patch includes stdint.h when needed. Patch sent upstream: https://lists.samba.org/archive/samba-technical/2018-January/125306.html Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Aug 24 17:22:10 CEST 2018 on sn-devel-144
2018-08-14CVE-2018-1139 libcli/auth: Add initial tests for ntlm_password_check()Andrew Bartlett1-0/+413
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13360 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>