├── .gitignore ├── etc ├── debian │ ├── compat │ ├── copyright │ ├── source │ │ └── format │ ├── install │ ├── changelog │ ├── rules │ └── control ├── .gitignore ├── version.conf └── sign.conf ├── src ├── unit-tests │ ├── config.h │ ├── faux │ │ ├── windows │ │ │ ├── HFILE.h │ │ │ ├── WM_APP.h │ │ │ ├── SetLastError.cpp │ │ │ ├── LocalFree.c │ │ │ ├── OUT.h │ │ │ ├── DestroyWindow.c │ │ │ ├── GetLastError.cpp │ │ │ ├── HWND.h │ │ │ ├── IsUserAnAdmin.c │ │ │ ├── CloseHandle.cpp │ │ │ ├── GetCurrentProcess.c │ │ │ ├── SetCursor.c │ │ │ ├── ShowWindow.c │ │ │ ├── CALLBACK.h │ │ │ ├── FlushFileBuffers.cpp │ │ │ ├── GetSystemMetrics.c │ │ │ ├── WINAPI.h │ │ │ ├── UINT.h │ │ │ ├── MAX_PATH.h │ │ │ ├── GetFileSize.cpp │ │ │ ├── HDC.h │ │ │ ├── LPCSTR.h │ │ │ ├── PVOID.h │ │ │ ├── FAR.h │ │ │ ├── LPCWSTR.h │ │ │ ├── LPVOID.h │ │ │ ├── UINT_PTR.h │ │ │ ├── BOOLEAN.h │ │ │ ├── CP_ACP.h │ │ │ ├── GetProcAddress.c │ │ │ ├── HFONT.h │ │ │ ├── IsWellKnownSid.c │ │ │ ├── LPSTR.h │ │ │ ├── LPWSTR.h │ │ │ ├── NEAR.h │ │ │ ├── PDWORD.h │ │ │ ├── ULONG.h │ │ │ ├── HMODULE.h │ │ │ ├── SHORT.h │ │ │ ├── HBITMAP.h │ │ │ ├── RESTRICTED_POINTER.h │ │ │ ├── LPARAM.h │ │ │ ├── WPARAM.h │ │ │ ├── LRESULT.h │ │ │ ├── PSID.h │ │ │ ├── OpenProcessToken.c │ │ │ ├── CONST.h │ │ │ ├── ATOM.h │ │ │ ├── HMENU.h │ │ │ ├── PHANDLE.h │ │ │ ├── _wcsicmp.cpp │ │ │ ├── HBRUSH.h │ │ │ ├── HICON.h │ │ │ ├── GetFileTime.cpp │ │ │ ├── LONG_PTR.h │ │ │ ├── SetLayeredWindowAttributes.c │ │ │ ├── OutputDebugString.cpp │ │ │ ├── SetFilePointer.cpp │ │ │ ├── ZeroMemory.h │ │ │ ├── DECLARE_HANDLE.h │ │ │ ├── SetCursor.h │ │ │ ├── SetFileTime.cpp │ │ │ ├── stdcall.h │ │ │ ├── COLORREF.h │ │ │ ├── RtlZeroMemory.h │ │ │ ├── swprintf_s.cpp │ │ │ ├── GetModuleHandle.c │ │ │ ├── RegisterClassEx.c │ │ │ ├── GetTokenInformation.c │ │ │ ├── GetVersionEx.c │ │ │ ├── UnregisterClass.c │ │ │ ├── strcpy_s.h │ │ │ ├── LoadCursor.c │ │ │ ├── ShellNotifyIcon.c │ │ │ ├── NULL.h │ │ │ ├── WORD.h │ │ │ ├── BYTE.h │ │ │ ├── HINSTANCE.h │ │ │ ├── DeviceIoControl.cpp │ │ │ ├── GUID.h │ │ │ ├── DWORD.h │ │ │ ├── DefWindowProc.c │ │ │ ├── FILETIME.h │ │ │ ├── TOKEN_USER.h │ │ │ ├── POINT.h │ │ │ ├── _wcsicmp.h │ │ │ ├── QueryDosDevice.cpp │ │ │ ├── GetLastError.h │ │ │ ├── GetSystemMetrics.h │ │ │ ├── CloseHandle.h │ │ │ ├── NIM.h │ │ │ ├── SetLastError.h │ │ │ ├── VOID.h │ │ │ ├── LIST_ENTRY.h │ │ │ ├── CodePages.h │ │ │ ├── IsUserAnAdmin.h │ │ │ ├── LocalFree.h │ │ │ ├── FlushFileBuffers.h │ │ │ ├── DestroyWindow.h │ │ │ ├── swprintf_s.h │ │ │ ├── WNDPROC.h │ │ │ ├── GetCurrentProcess.h │ │ │ ├── GetFileSize.h │ │ │ ├── EnableWindow.cpp │ │ │ ├── DISK_GEOMETRY.h │ │ │ ├── ShowWindow.h │ │ │ ├── FormatMessage.c │ │ │ ├── GetFileTime.h │ │ │ ├── BOOL.h │ │ │ ├── EnableWindow.h │ │ │ ├── HCURSOR.h │ │ │ ├── SECURITY_ATTRIBUTES.h │ │ │ ├── IsWellKnownSid.h │ │ │ ├── NIF.h │ │ │ ├── SetFilePointer.h │ │ │ ├── SetFileTime.h │ │ │ ├── __nullterminated.h │ │ │ ├── NIIF.h │ │ │ ├── LONG.h │ │ │ ├── ShellNotifyIcon.h │ │ │ ├── MessageBox.c │ │ │ ├── LARGE_INTEGER.h │ │ │ ├── HANDLE.h │ │ │ ├── ARRAYSIZE.h │ │ │ ├── OpenProcessToken.h │ │ │ ├── CreateWindowEx.c │ │ │ ├── OutputDebugString.h │ │ │ ├── GetProcAddress.h │ │ │ ├── DeviceIoControl.h │ │ │ ├── ERROR.h │ │ │ ├── SID_AND_ATTRIBUTES.h │ │ │ ├── GetModuleHandle.h │ │ │ ├── LoadCursor.h │ │ │ ├── QueryDosDevice.h │ │ │ ├── RegisterClassEx.h │ │ │ ├── FILE.h │ │ │ ├── GetTokenInformation.h │ │ │ ├── GetWindowText.h │ │ │ ├── SetLayeredWindowAttributes.h │ │ │ ├── MAKEINTRESOURCE.h │ │ │ ├── PARTITION_INFORMATION.h │ │ │ ├── UnregisterClass.h │ │ │ ├── RegOpenKeyEx.c │ │ │ ├── CreateFile.cpp │ │ │ ├── GetVersionEx.h │ │ │ ├── DefWindowProc.h │ │ │ ├── OVERLAPPED.h │ │ │ ├── GetWindowTextLength.h │ │ │ ├── FPO_DATA.h │ │ │ ├── lang.h │ │ │ ├── CreateFile.h │ │ │ ├── CHAR.h │ │ │ ├── TOKEN_INFORMATION_CLASS.h │ │ │ └── IDC_x.h │ │ └── c │ │ │ └── stdlib │ │ │ └── size_t.h │ ├── .gitignore │ ├── app.ico │ └── resource.h ├── Common │ ├── types │ │ ├── uint8.h │ │ └── password.h │ ├── Makefile │ ├── CipherShed.ico │ ├── CipherShed_Volume.ico │ ├── CipherShed_mounted.ico │ ├── Textual_logo_288dpi.bmp │ ├── Textual_logo_96dpi.bmp │ ├── Textual_logo_background.bmp │ ├── constants.h │ ├── util │ │ ├── arrays.h │ │ ├── process.h │ │ ├── memory.h │ │ ├── memory.cpp │ │ ├── unicode │ │ │ ├── strcmpw.h │ │ │ └── strcmpw.c │ │ └── csstringutil.h │ ├── strcpys.h │ ├── bool.h │ ├── Sources │ ├── fsutil │ │ ├── fsutil.h │ │ └── diskutil.h │ ├── strcpys.c │ ├── dialog │ │ ├── cursor.h │ │ └── userperms.h │ ├── snprintf.h │ ├── Dictionary.h │ ├── volume │ │ └── volutil.h │ ├── Xml.h │ ├── Progress.h │ ├── Language.h │ ├── Cache.h │ ├── Tests.h │ ├── Combo.h │ ├── Inflate.h │ └── Wipe.h ├── Crypto │ ├── Makefile │ ├── Sources │ ├── Cast.h │ ├── Serpent.h │ ├── Makefile.inc │ ├── Blowfish.h │ ├── Des.h │ ├── Rmd160.h │ └── Aes_hw_cpu.h ├── Driver │ ├── Makefile │ ├── Fuse │ │ └── Driver.make │ ├── Resource.h │ ├── Sources │ ├── VolumeFilter.h │ └── DumpFilter.h ├── Main │ ├── man │ │ └── .gitignore │ ├── System.cpp │ ├── Main.h │ ├── UserInterfaceType.h │ ├── Forms │ │ ├── LegalNoticesDialog.h │ │ ├── AboutDialog.h │ │ ├── VolumePropertiesDialog.h │ │ ├── LegalNoticesDialog.cpp │ │ ├── SelectDirectoryWizardPage.cpp │ │ ├── BenchmarkDialog.h │ │ ├── KeyfilesDialog.h │ │ ├── InfoWizardPage.h │ │ ├── RandomPoolEnrichmentDialog.h │ │ ├── InfoWizardPage.cpp │ │ ├── KeyfileGeneratorDialog.h │ │ ├── NewSecurityTokenKeyfileDialog.h │ │ └── DeviceSelectionDialog.h │ ├── SystemPrecompiled.h │ ├── FatalErrorHandler.h │ ├── Resources.h │ └── LanguageStrings.h ├── Setup │ ├── Setup.ico │ ├── CipherShed_setup.bmp │ ├── CipherShed_setup.psd │ ├── CipherShed_setup_background.bmp │ ├── ComSetup.h │ ├── Dir.h │ ├── Setup.manifest │ ├── SelfExtract.h │ └── Wizard.h ├── Mount │ ├── Logo_288dpi.bmp │ ├── Logo_288dpi.psd │ ├── Logo_96dpi.bmp │ ├── Drive_icon_96dpi.bmp │ ├── Drive_icon_mask_96dpi.bmp │ ├── System_drive_icon_96dpi.bmp │ ├── System_drive_icon_mask_96dpi.bmp │ ├── Mount.manifest │ └── MainCom.h ├── Format │ ├── CipherShed_Wizard.bmp │ ├── CipherShed_Wizard.psd │ ├── Format.manifest │ └── FormatCom.h ├── Resources │ └── Icons │ │ └── CipherShed.icns ├── Platform │ ├── Windows │ │ └── System.h │ ├── Unix │ │ ├── System.h │ │ ├── Time.cpp │ │ ├── SystemLog.cpp │ │ ├── Poller.h │ │ ├── Pipe.h │ │ └── Process.h │ ├── System.h │ ├── Functor.h │ ├── Time.h │ ├── User.h │ ├── SystemInfo.h │ ├── Platform.h │ ├── Directory.h │ ├── Stream.h │ ├── TextReader.cpp │ ├── TextReader.h │ ├── Platform.make │ ├── PlatformTest.h │ ├── MemoryStream.h │ ├── SyncEvent.h │ └── Event.cpp ├── Core │ ├── Unix │ │ ├── System.h │ │ ├── Linux │ │ │ └── System.h │ │ ├── MacOSX │ │ │ ├── System.h │ │ │ └── CoreMacOSX.h │ │ ├── FreeBSD │ │ │ └── System.h │ │ ├── Solaris │ │ │ └── System.h │ │ └── MountedFilesystem.h │ ├── Core.h │ ├── FatFormatter.h │ ├── Core.make │ ├── CoreException.cpp │ └── HostDevice.h ├── include │ └── rcversion.h ├── Boot │ └── Windows │ │ ├── IntFilter.h │ │ ├── BootCrt.asm │ │ ├── BootMemory.h │ │ ├── BootStrings.h │ │ ├── Bios.h │ │ ├── BootEncryptedIo.h │ │ └── BootMain.h ├── CipherShed.vsmdi ├── Volume │ ├── VolumeSlot.h │ ├── Version.h │ ├── VolumeException.cpp │ ├── VolumePasswordCache.h │ └── Crc32.h └── Build │ └── Resources │ └── MacOSX │ └── Info.plist.xml ├── doc ├── .gitignore ├── userdocs │ └── guide │ │ ├── .gitignore │ │ ├── logo.wmf │ │ ├── font-palate.psd │ │ ├── images-0000.png │ │ ├── images-0000.psd │ │ ├── images-0001.png │ │ ├── images-0001.psd │ │ ├── images-0002.png │ │ ├── images-0002.psd │ │ ├── images-0003.png │ │ ├── images-0003.psd │ │ ├── images-0004.png │ │ ├── images-0005.png │ │ ├── images-0005.psd │ │ ├── images-0006.png │ │ ├── images-0007.png │ │ ├── images-0008.png │ │ ├── images-0009.png │ │ ├── images-0010.png │ │ ├── images-0010.psd │ │ ├── images-0011.png │ │ ├── images-0011.psd │ │ ├── images-0012.png │ │ ├── images-0012.psd │ │ ├── images-0013.png │ │ ├── images-0013.psd │ │ ├── images-0014.png │ │ ├── images-0014.psd │ │ ├── images-0015.png │ │ ├── images-0015.psd │ │ ├── images-0016.png │ │ ├── images-0016.psd │ │ ├── images-0017.png │ │ ├── images-0017.psd │ │ ├── images-0018.png │ │ ├── images-0018.psd │ │ ├── images-0019.png │ │ ├── images-0020.png │ │ ├── images-0020.psd │ │ ├── images-0021.png │ │ ├── images-0022.png │ │ ├── images-0022.psd │ │ ├── images-0023.png │ │ ├── images-0024.png │ │ ├── images-0024.psd │ │ ├── images-0025.png │ │ ├── images-0025.psd │ │ ├── images-0026.png │ │ ├── images-0026.psd │ │ ├── images-0027.png │ │ ├── images-0027.psd │ │ ├── images-0028.png │ │ ├── images-0029.png │ │ ├── images-0030.png │ │ └── CipherShed-User-Guide-0.7.4.0.pdf ├── devdocs │ ├── generated │ │ └── .gitignore │ ├── notes-determinstic-build.txt │ ├── boot │ │ └── cpu │ │ │ └── minimal_boot.pdf │ ├── windows │ │ └── driver │ │ │ └── signing-howto.doc │ ├── continuous-integration │ │ └── network-PDInc-lab.vsd │ ├── notes.txt │ ├── building-tests-nonVS.txt │ └── compile │ │ └── linux-manjaro-xfce-0.8.11-x86_64.txt └── trust │ ├── contributors │ ├── p │ │ ├── y │ │ │ └── pyeron,jason │ │ │ │ └── cla-v2.0.1.pdf │ │ └── d │ │ │ └── pd-inc-international │ │ │ └── cla-v2.0.1.pdf │ ├── CLA-Corporate-Template-v2.0.1.pdf │ └── CLA-Individual-Template-v2.0.1.pdf │ └── audits │ ├── i │ └── s │ │ └── iSECpartners │ │ ├── TrueCrypt_Phase_II_NCC_OCAP_final.pdf │ │ └── iSec_Final_Open_Crypto_Audit_Project_TrueCrypt_Security_Assessment.pdf │ ├── p │ └── y │ │ └── pyeron,jason │ │ ├── audit-report-2014-08-16-88d24b9bcd5c83b4a0afd3d5baa47f224f901653.pdf │ │ ├── audit-report-2014-12-09-e8529e95d89d3f519a31ef7de5bd7f0d0d318e8c.pdf │ │ └── audit-report-2014-12-18-04af5c7cbff47b17bd4b0153330028adb28eae4c.pdf │ └── l │ └── n │ └── lemcke,niklas │ └── audit_2014-12-28 ├── bin ├── shell.sh ├── unittest.sh ├── build-ubuntu.sh ├── unittest-compile.sh ├── prepare-ubuntu.sh ├── build-docs.sh ├── launch-visual-studio.sh ├── artifacts-tar.sh ├── unittest-windows.sh ├── build-windows.sh ├── artifacts-cp.sh └── unittest-coverage-parse.pl ├── GnuWin32 ├── dd.exe └── gzip.exe ├── var └── opt │ └── nasm-2.08 │ └── nasm.exe ├── README.md └── .gitmodules /.gitignore: -------------------------------------------------------------------------------- 1 | tmp/ 2 | -------------------------------------------------------------------------------- /etc/debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /etc/debian/copyright: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/unit-tests/config.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /doc/.gitignore: -------------------------------------------------------------------------------- 1 | ~*.doc 2 | -------------------------------------------------------------------------------- /etc/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /src/Common/types/uint8.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /etc/version.conf: -------------------------------------------------------------------------------- 1 | VERSION=0.7.5.0 2 | -------------------------------------------------------------------------------- /etc/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /doc/userdocs/guide/.gitignore: -------------------------------------------------------------------------------- 1 | Thumbs.db 2 | 3 | -------------------------------------------------------------------------------- /etc/debian/install: -------------------------------------------------------------------------------- 1 | src/Main/ciphershed usr/bin 2 | -------------------------------------------------------------------------------- /doc/devdocs/generated/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /src/Common/Makefile: -------------------------------------------------------------------------------- 1 | !INCLUDE $(NTMAKEENV)\makefile.def 2 | -------------------------------------------------------------------------------- /src/Crypto/Makefile: -------------------------------------------------------------------------------- 1 | !INCLUDE $(NTMAKEENV)\makefile.def 2 | -------------------------------------------------------------------------------- /src/Driver/Makefile: -------------------------------------------------------------------------------- 1 | !INCLUDE $(NTMAKEENV)\makefile.def 2 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/HFILE.h: -------------------------------------------------------------------------------- 1 | #include "HCURSOR.h" -------------------------------------------------------------------------------- /bin/shell.sh: -------------------------------------------------------------------------------- 1 | bash --rcfile "$(dirname "$0")/../etc/env.sh" 2 | -------------------------------------------------------------------------------- /src/Main/man/.gitignore: -------------------------------------------------------------------------------- 1 | /ciphershed.1 2 | /ciphershed.1.gz 3 | -------------------------------------------------------------------------------- /GnuWin32/dd.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/GnuWin32/dd.exe -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/WM_APP.h: -------------------------------------------------------------------------------- 1 | #define WM_APP 0x8000 2 | -------------------------------------------------------------------------------- /GnuWin32/gzip.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/GnuWin32/gzip.exe -------------------------------------------------------------------------------- /src/Setup/Setup.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/src/Setup/Setup.ico -------------------------------------------------------------------------------- /src/unit-tests/.gitignore: -------------------------------------------------------------------------------- 1 | /unittesting.exe 2 | /unittesting 3 | *.gcno 4 | *.gcda 5 | *.gcov 6 | -------------------------------------------------------------------------------- /src/unit-tests/app.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/src/unit-tests/app.ico -------------------------------------------------------------------------------- /src/Common/CipherShed.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/src/Common/CipherShed.ico -------------------------------------------------------------------------------- /src/Mount/Logo_288dpi.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/src/Mount/Logo_288dpi.bmp -------------------------------------------------------------------------------- /src/Mount/Logo_288dpi.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/src/Mount/Logo_288dpi.psd -------------------------------------------------------------------------------- /src/Mount/Logo_96dpi.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/src/Mount/Logo_96dpi.bmp -------------------------------------------------------------------------------- /doc/userdocs/guide/logo.wmf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/logo.wmf -------------------------------------------------------------------------------- /var/opt/nasm-2.08/nasm.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/var/opt/nasm-2.08/nasm.exe -------------------------------------------------------------------------------- /bin/unittest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | DIR="$(dirname "$0")/../" 3 | cd "$DIR"/src/unit-tests/ 4 | make coverage.xml 5 | -------------------------------------------------------------------------------- /src/Mount/Drive_icon_96dpi.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/src/Mount/Drive_icon_96dpi.bmp -------------------------------------------------------------------------------- /src/Setup/CipherShed_setup.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/src/Setup/CipherShed_setup.bmp -------------------------------------------------------------------------------- /src/Setup/CipherShed_setup.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/src/Setup/CipherShed_setup.psd -------------------------------------------------------------------------------- /src/Common/CipherShed_Volume.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/src/Common/CipherShed_Volume.ico -------------------------------------------------------------------------------- /src/Format/CipherShed_Wizard.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/src/Format/CipherShed_Wizard.bmp -------------------------------------------------------------------------------- /src/Format/CipherShed_Wizard.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/src/Format/CipherShed_Wizard.psd -------------------------------------------------------------------------------- /doc/devdocs/notes-determinstic-build.txt: -------------------------------------------------------------------------------- 1 | http://stackoverflow.com/questions/1180852/deterministic-builds-under-windows 2 | 3 | -------------------------------------------------------------------------------- /doc/userdocs/guide/font-palate.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/font-palate.psd -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0000.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0000.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0000.psd -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0001.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0001.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0001.psd -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0002.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0002.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0002.psd -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0003.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0003.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0003.psd -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0004.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0005.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0005.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0005.psd -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0006.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0007.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0008.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0008.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0009.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0009.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0010.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0010.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0010.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0010.psd -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0011.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0011.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0011.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0011.psd -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0012.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0012.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0012.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0012.psd -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0013.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0013.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0013.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0013.psd -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0014.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0014.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0014.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0014.psd -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0015.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0015.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0015.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0015.psd -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0016.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0016.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0016.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0016.psd -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0017.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0017.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0017.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0017.psd -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0018.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0018.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0018.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0018.psd -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0019.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0019.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0020.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0020.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0020.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0020.psd -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0021.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0021.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0022.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0022.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0022.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0022.psd -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0023.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0023.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0024.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0024.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0024.psd -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0025.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0025.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0025.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0025.psd -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0026.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0026.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0026.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0026.psd -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0027.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0027.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0027.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0027.psd -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0028.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0028.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0029.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0029.png -------------------------------------------------------------------------------- /doc/userdocs/guide/images-0030.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/images-0030.png -------------------------------------------------------------------------------- /src/Common/CipherShed_mounted.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/src/Common/CipherShed_mounted.ico -------------------------------------------------------------------------------- /src/Common/Textual_logo_288dpi.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/src/Common/Textual_logo_288dpi.bmp -------------------------------------------------------------------------------- /src/Common/Textual_logo_96dpi.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/src/Common/Textual_logo_96dpi.bmp -------------------------------------------------------------------------------- /src/Mount/Drive_icon_mask_96dpi.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/src/Mount/Drive_icon_mask_96dpi.bmp -------------------------------------------------------------------------------- /src/Resources/Icons/CipherShed.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/src/Resources/Icons/CipherShed.icns -------------------------------------------------------------------------------- /src/unit-tests/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by app.rc 4 | -------------------------------------------------------------------------------- /bin/build-ubuntu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | . "$(dirname "$0")/../etc/env.sh" 3 | cd "$(dirname "$0")/../src" 4 | make -j $(nproc) 5 | -------------------------------------------------------------------------------- /doc/devdocs/boot/cpu/minimal_boot.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/devdocs/boot/cpu/minimal_boot.pdf -------------------------------------------------------------------------------- /src/Mount/System_drive_icon_96dpi.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/src/Mount/System_drive_icon_96dpi.bmp -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/SetLastError.cpp: -------------------------------------------------------------------------------- 1 | #include "SetLastError.h" 2 | 3 | VOID SetLastError(DWORD dwErrCode) 4 | { 5 | } -------------------------------------------------------------------------------- /bin/unittest-compile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | DIR="$(dirname "$0")/../" 3 | cd "$DIR"/src/unit-tests/ 4 | make unittests 5 | exit $? 6 | 7 | -------------------------------------------------------------------------------- /src/Common/Textual_logo_background.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/src/Common/Textual_logo_background.bmp -------------------------------------------------------------------------------- /src/Platform/Windows/System.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _CS_Platform_Windows_System_h_ 3 | #define _CS_Platform_Windows_System_h_ 4 | 5 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/LocalFree.c: -------------------------------------------------------------------------------- 1 | #include "LocalFree.h" 2 | 3 | 4 | HLOCAL LocalFree(HLOCAL hMem) 5 | { 6 | return 0; 7 | } -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/OUT.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_OUT_h_ 2 | #define _faux_windows_OUT_h_ 3 | 4 | #define OUT 5 | 6 | #endif -------------------------------------------------------------------------------- /src/Mount/System_drive_icon_mask_96dpi.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/src/Mount/System_drive_icon_mask_96dpi.bmp -------------------------------------------------------------------------------- /src/Setup/CipherShed_setup_background.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/src/Setup/CipherShed_setup_background.bmp -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/DestroyWindow.c: -------------------------------------------------------------------------------- 1 | #include "DestroyWindow.h" 2 | 3 | BOOL DestroyWindow(HWND hWnd) 4 | { 5 | return 0; 6 | } -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/GetLastError.cpp: -------------------------------------------------------------------------------- 1 | #include "GetLastError.h" 2 | 3 | DWORD GetLastError(VOID) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/HWND.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_hwnd_h_ 2 | #define _faux_windows_hwnd_h_ 3 | #define HWND void* 4 | #endif 5 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/IsUserAnAdmin.c: -------------------------------------------------------------------------------- 1 | #include "IsUserAnAdmin.h" 2 | 3 | BOOL IsUserAnAdmin(void) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /doc/devdocs/windows/driver/signing-howto.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/devdocs/windows/driver/signing-howto.doc -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/CloseHandle.cpp: -------------------------------------------------------------------------------- 1 | #include "CloseHandle.h" 2 | 3 | BOOL CloseHandle(HANDLE hObject) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /bin/prepare-ubuntu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -x 2 | sudo apt-get update 3 | sudo apt-get install build-essential nasm libfuse-dev libwxgtk2.8-dev pkgconf 4 | 5 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/GetCurrentProcess.c: -------------------------------------------------------------------------------- 1 | #include "GetCurrentProcess.h" 2 | 3 | HANDLE GetCurrentProcess(VOID) 4 | { 5 | return 0; 6 | } -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/SetCursor.c: -------------------------------------------------------------------------------- 1 | #include "SetCursor.h" 2 | 3 | 4 | HCURSOR SetCursor(HCURSOR hCursor) 5 | { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/ShowWindow.c: -------------------------------------------------------------------------------- 1 | #include "ShowWindow.h" 2 | 3 | BOOL ShowWindow(HWND hWnd, int nCmdShow) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /bin/build-docs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | DIR="$(dirname "$0")/../" 3 | cd "$DIR" 4 | . etc/env.sh 5 | doxygen.exe etc/Doxyfile 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/CALLBACK.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_callback_h_ 2 | #define _faux_windows_callback_h_ 3 | 4 | #define CALLBACK 5 | 6 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/FlushFileBuffers.cpp: -------------------------------------------------------------------------------- 1 | #include "FlushFileBuffers.h" 2 | 3 | BOOL FlushFileBuffers(HANDLE hFile) 4 | { 5 | return 0; 6 | } -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/GetSystemMetrics.c: -------------------------------------------------------------------------------- 1 | #include "GetSystemMetrics.h" 2 | 3 | int GetSystemMetrics(int nIndex) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/WINAPI.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_WINAPI_h_ 2 | #define _faux_windows_WINAPI_h_ 3 | 4 | #define WINAPI 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /doc/userdocs/guide/CipherShed-User-Guide-0.7.4.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/userdocs/guide/CipherShed-User-Guide-0.7.4.0.pdf -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/UINT.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_unit_h_ 2 | #define _faux_windows_unit_h_ 3 | 4 | typedef unsigned int UINT; 5 | 6 | #endif -------------------------------------------------------------------------------- /doc/trust/contributors/p/y/pyeron,jason/cla-v2.0.1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/trust/contributors/p/y/pyeron,jason/cla-v2.0.1.pdf -------------------------------------------------------------------------------- /bin/launch-visual-studio.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | . "$(dirname "$0")/../etc/env.sh" 3 | DIR="$(dirname "$0")/.." 4 | cd "$DIR"/src 5 | cygstart "$DEVENV" CipherShed.sln 6 | -------------------------------------------------------------------------------- /doc/devdocs/continuous-integration/network-PDInc-lab.vsd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/devdocs/continuous-integration/network-PDInc-lab.vsd -------------------------------------------------------------------------------- /doc/trust/contributors/CLA-Corporate-Template-v2.0.1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/trust/contributors/CLA-Corporate-Template-v2.0.1.pdf -------------------------------------------------------------------------------- /doc/trust/contributors/CLA-Individual-Template-v2.0.1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/trust/contributors/CLA-Individual-Template-v2.0.1.pdf -------------------------------------------------------------------------------- /src/unit-tests/faux/c/stdlib/size_t.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_c_stdlib_size_t_h_ 2 | #define _faux_windows_c_stdlib_size_t_h_ 3 | 4 | #include 5 | 6 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/MAX_PATH.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_max_path_h_ 2 | #define _faux_windows_max_path_h_ 3 | 4 | #define MAX_PATH 260 5 | 6 | #endif -------------------------------------------------------------------------------- /bin/artifacts-tar.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | DIR="$(dirname "$0")/../" 3 | cd "$DIR"/ 4 | (git clean -ndX ; git clean -nd) | sort -u | sed 's/^Would remove //' | xargs -rd '\n' tar c 5 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/GetFileSize.cpp: -------------------------------------------------------------------------------- 1 | #include "GetFileSize.h" 2 | 3 | BOOL GetFileSizeEx(HANDLE hFile, PLARGE_INTEGER lpFileSize) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/HDC.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_hdc_h_ 2 | #define _faux_windows_hdc_h_ 3 | 4 | #include "DECLARE_HANDLE.h" 5 | DECLARE_HANDLE(HDC); 6 | 7 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/LPCSTR.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittests_faux_windows_LPCSTR_h_ 2 | #define _CS_unittests_faux_windows_LPCSTR_h_ 3 | 4 | #include "CHAR.h" 5 | 6 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/PVOID.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_PVOID_h_ 2 | #define _CS_unittesting_faux_windows_PVOID_h_ 3 | 4 | #include "VOID.h" 5 | 6 | #endif -------------------------------------------------------------------------------- /doc/trust/contributors/p/d/pd-inc-international/cla-v2.0.1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/trust/contributors/p/d/pd-inc-international/cla-v2.0.1.pdf -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/FAR.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_far_h_ 2 | #define _faux_windows_far_h_ 3 | 4 | #define far 5 | 6 | #define FAR far 7 | 8 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/LPCWSTR.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittests_faux_windows_LPCWSTR_h_ 2 | #define _CS_unittests_faux_windows_LPCWSTR_h_ 3 | 4 | #include "WCHAR.h" 5 | 6 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/LPVOID.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_LPVOID_h_ 2 | #define _CS_unittesting_faux_windows_LPVOID_h_ 3 | 4 | #include "VOID.h" 5 | 6 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/UINT_PTR.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_uint_ptr_h_ 2 | #define _faux_windows_uint_ptr_h_ 3 | 4 | typedef unsigned int UINT_PTR, *PUINT_PTR; 5 | 6 | #endif -------------------------------------------------------------------------------- /src/Common/constants.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_Common_constants_h_ 2 | #define _CS_Common_constants_h_ 3 | 4 | #define MAX_PASSWORD 64 // Maximum possible password length 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /src/Common/util/arrays.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_Common_util_arrays_h_ 2 | #define _CS_Common_util_arrays_h_ 3 | 4 | #define array_capacity(arr) (sizeof (arr) / sizeof ((arr)[0])) 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/BOOLEAN.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_boolean_h_ 2 | #define _faux_windows_boolean_h_ 3 | 4 | #include "BYTE.h" 5 | 6 | typedef BYTE BOOLEAN; 7 | 8 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/CP_ACP.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unit_tests_faux_windows_CP_ACP_h_ 2 | #define _CS_unit_tests_faux_windows_CP_ACP_h_ 3 | 4 | #include "CodePages.h" 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/GetProcAddress.c: -------------------------------------------------------------------------------- 1 | 2 | #include "GetProcAddress.h" 3 | 4 | FARPROC GetProcAddress (HMODULE hModule, LPCSTR lpProcName) 5 | { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/HFONT.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_hfont_h_ 2 | #define _faux_windows_hfont_h_ 3 | 4 | #include "DECLARE_HANDLE.h" 5 | DECLARE_HANDLE(HFONT); 6 | 7 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/IsWellKnownSid.c: -------------------------------------------------------------------------------- 1 | #include "IsWellKnownSid.h" 2 | 3 | BOOL IsWellKnownSid (PSID pSid, WELL_KNOWN_SID_TYPE WellKnownSidType) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/LPSTR.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_LPSTR_h_ 2 | #define _CS_unittesting_faux_windows_LPSTR_h_ 3 | 4 | #include "CHAR.h" 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/LPWSTR.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittests_faux_windows_LPWSTR_h_ 2 | #define _CS_unittests_faux_windows_LPWSTR_h_ 3 | 4 | #include "WCHAR.h" 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/NEAR.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_near_h_ 2 | #define _faux_windows_near_h_ 3 | 4 | #define near 5 | 6 | #define NEAR near 7 | 8 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/PDWORD.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_PDWORD_h_ 2 | #define _CS_unittesting_faux_windows_PDWORD_h_ 3 | 4 | #include "DWORD.h" 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/ULONG.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_ULONG_h_ 2 | #define _CS_unittesting_faux_windows_ULONG_h_ 3 | 4 | #include "LONG.h" 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/HMODULE.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_HMODULE_h_ 2 | #define _CS_unittesting_faux_windows_HMODULE_h_ 3 | 4 | #include "HINSTANCE.h" 5 | 6 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/SHORT.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_SHORT_h_ 2 | #define _faux_windows_SHORT_h_ 3 | 4 | typedef unsigned short USHORT; 5 | typedef USHORT *PUSHORT; 6 | 7 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/HBITMAP.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_hbitmap_h_ 2 | #define _faux_windows_hbitmap_h_ 3 | 4 | #include "DECLARE_HANDLE.h" 5 | DECLARE_HANDLE(HBITMAP); 6 | 7 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/RESTRICTED_POINTER.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_RESTRICTED_POINTER_h 2 | #define _faux_windows_RESTRICTED_POINTER_h 3 | 4 | #define RESTRICTED_POINTER 5 | 6 | #endif -------------------------------------------------------------------------------- /doc/trust/audits/i/s/iSECpartners/TrueCrypt_Phase_II_NCC_OCAP_final.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/trust/audits/i/s/iSECpartners/TrueCrypt_Phase_II_NCC_OCAP_final.pdf -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/LPARAM.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_lparam_h_ 2 | #define _faux_windows_lparam_h_ 3 | 4 | #include "LONG_PTR.h" 5 | 6 | typedef LONG_PTR LPARAM; 7 | 8 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/WPARAM.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_wparam_h_ 2 | #define _faux_windows_wparam_h_ 3 | 4 | #include "UINT_PTR.h" 5 | 6 | typedef UINT_PTR WPARAM; 7 | 8 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/LRESULT.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_lresult_h_ 2 | #define _faux_windows_lresult_h_ 3 | 4 | #include "LONG_PTR.h" 5 | 6 | typedef LONG_PTR LRESULT; 7 | 8 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/PSID.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_PSID_h_ 2 | #define _CS_unittesting_faux_windows_PSID_h_ 3 | 4 | #include "PVOID.h" 5 | 6 | typedef PVOID PSID; 7 | 8 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/OpenProcessToken.c: -------------------------------------------------------------------------------- 1 | #include "OpenProcessToken.h" 2 | 3 | BOOL OpenProcessToken (HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/CONST.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_const_h_ 2 | #define _faux_windows_const_h_ 3 | 4 | 5 | #ifndef CONST 6 | #define CONST const 7 | #endif 8 | 9 | 10 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/ATOM.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_ATOM_h_ 2 | #define _CS_unittesting_faux_windows_ATOM_h_ 3 | 4 | #include "WORD.h" 5 | 6 | typedef WORD ATOM; 7 | 8 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/HMENU.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_HMENU_h_ 2 | #define _CS_unittesting_faux_windows_HMENU_h_ 3 | 4 | #include "DECLARE_HANDLE.h" 5 | 6 | DECLARE_HANDLE(HMENU); 7 | 8 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/PHANDLE.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_PHANDLE_h_ 2 | #define _CS_unittesting_faux_windows_PHANDLE_h_ 3 | 4 | #include "HANDLE.h" 5 | 6 | typedef HANDLE *PHANDLE; 7 | 8 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/_wcsicmp.cpp: -------------------------------------------------------------------------------- 1 | #include "_wcsicmp.h" 2 | 3 | 4 | #ifndef _MSC_VER 5 | int _wcsicmp(const wchar_t *string1, const wchar_t *string2) 6 | { 7 | return 0; 8 | } 9 | #endif 10 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/HBRUSH.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_HBRUSH_h_ 2 | #define _CS_unittesting_faux_windows_HBRUSH_h_ 3 | 4 | #include "DECLARE_HANDLE.h" 5 | 6 | DECLARE_HANDLE(HBRUSH); 7 | 8 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/HICON.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_unittesting_faux_windows_hicon_h_ 2 | #define CS_unittesting_faux_windows_hicon_h_ 3 | 4 | #include "DECLARE_HANDLE.h" 5 | 6 | DECLARE_HANDLE(HICON); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/GetFileTime.cpp: -------------------------------------------------------------------------------- 1 | #include "GetFileTime.h" 2 | 3 | BOOL GetFileTime(HANDLE hFile, LPFILETIME lpCreationTime, LPFILETIME lpLastAccessTime, LPFILETIME lpLastWriteTime ) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/LONG_PTR.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_long_ptr_h_ 2 | #define _faux_windows_long_ptr_h_ 3 | 4 | typedef long LONG_PTR, *PLONG_PTR; 5 | typedef unsigned long ULONG_PTR, *PULONG_PTR; 6 | 7 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/SetLayeredWindowAttributes.c: -------------------------------------------------------------------------------- 1 | #include "SetLayeredWindowAttributes.h" 2 | 3 | BOOL SetLayeredWindowAttributes(HWND hwnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /bin/unittest-windows.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | . "$(dirname "$0")/../etc/env.sh" 3 | cd "$(dirname "$0")/../" 4 | cd src 5 | "$DEVENVcon" CipherShed.sln /build "All Debug" /project unit-tests 6 | "$MSTEST" /testcontainer:Debug/unit-tests.dll 7 | -------------------------------------------------------------------------------- /etc/debian/changelog: -------------------------------------------------------------------------------- 1 | ciphershed (0.7.3.0.0~git-20150713.003416-5f5b0d1-1) unstable; urgency=medium 2 | 3 | * default change log entry text 4 | 5 | -- Kyle Sun, 12 Jul 2015 20:34:18 -0400 6 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/OutputDebugString.cpp: -------------------------------------------------------------------------------- 1 | #include "OutputDebugString.h" 2 | 3 | VOID OutputDebugStringA(LPCSTR lpOutputString) 4 | { 5 | } 6 | 7 | VOID OutputDebugStringW(LPCWSTR lpOutputString) 8 | { 9 | } 10 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/SetFilePointer.cpp: -------------------------------------------------------------------------------- 1 | #include "SetFilePointer.h" 2 | 3 | BOOL SetFilePointerEx(HANDLE hFile, LARGE_INTEGER liDistanceToMove, PLARGE_INTEGER lpNewFilePointer, DWORD dwMoveMethod) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/ZeroMemory.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_unittests_faux_windows_ZeroMemory_h_ 2 | #define CS_unittests_faux_windows_ZeroMemory_h_ 3 | 4 | #include "RtlZeroMemory.h" 5 | 6 | #define ZeroMemory RtlZeroMemory 7 | 8 | #endif -------------------------------------------------------------------------------- /src/Common/strcpys.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_Common_strcpys_h_ 2 | #define _CS_Common_strcpys_h_ 3 | 4 | 5 | #ifndef _MSC_VER 6 | 7 | int strcpy_s(char * s1, unsigned int s1max, const char * s2); 8 | 9 | #endif 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/DECLARE_HANDLE.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_declare_handle_h_ 2 | #define _faux_windows_declare_handle_h_ 3 | 4 | #define DECLARE_HANDLE(name) struct name##__{int unused;}; typedef struct name##__ *name 5 | 6 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/SetCursor.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_unittesting_faux_windows_SetCursor_h_ 2 | #define CS_unittesting_faux_windows_SetCursor_h_ 3 | 4 | #include "HCURSOR.h" 5 | 6 | HCURSOR SetCursor(HCURSOR hCursor); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/SetFileTime.cpp: -------------------------------------------------------------------------------- 1 | #include "SetFileTime.h" 2 | 3 | BOOL SetFileTime(HANDLE hFile, CONST FILETIME *lpCreationTime, CONST FILETIME *lpLastAccessTime, CONST FILETIME *lpLastWriteTime) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/stdcall.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_unittesting_faux_windows_stdcall_h_ 2 | #define CS_unittesting_faux_windows_stdcall_h_ 3 | 4 | #ifdef __stdcall 5 | #undef __stdcall 6 | #endif 7 | 8 | #define __stdcall 9 | 10 | #endif -------------------------------------------------------------------------------- /doc/trust/audits/p/y/pyeron,jason/audit-report-2014-08-16-88d24b9bcd5c83b4a0afd3d5baa47f224f901653.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/trust/audits/p/y/pyeron,jason/audit-report-2014-08-16-88d24b9bcd5c83b4a0afd3d5baa47f224f901653.pdf -------------------------------------------------------------------------------- /doc/trust/audits/p/y/pyeron,jason/audit-report-2014-12-09-e8529e95d89d3f519a31ef7de5bd7f0d0d318e8c.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/trust/audits/p/y/pyeron,jason/audit-report-2014-12-09-e8529e95d89d3f519a31ef7de5bd7f0d0d318e8c.pdf -------------------------------------------------------------------------------- /doc/trust/audits/p/y/pyeron,jason/audit-report-2014-12-18-04af5c7cbff47b17bd4b0153330028adb28eae4c.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/trust/audits/p/y/pyeron,jason/audit-report-2014-12-18-04af5c7cbff47b17bd4b0153330028adb28eae4c.pdf -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/COLORREF.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_COLORREF_h_ 2 | #define _CS_unittesting_faux_windows_COLORREF_h_ 3 | 4 | #include "DWORD.h" 5 | 6 | typedef DWORD COLORREF; 7 | typedef DWORD *LPCOLORREF; 8 | 9 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/RtlZeroMemory.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_unittests_faux_windows_RtlZeroMemory_h_ 2 | #define CS_unittests_faux_windows_RtlZeroMemory_h_ 3 | 4 | #define RtlZeroMemory(Destination,Length) memset((Destination),0,(Length)) 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /doc/trust/audits/i/s/iSECpartners/iSec_Final_Open_Crypto_Audit_Project_TrueCrypt_Security_Assessment.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/CipherShed/master/doc/trust/audits/i/s/iSECpartners/iSec_Final_Open_Crypto_Audit_Project_TrueCrypt_Security_Assessment.pdf -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/swprintf_s.cpp: -------------------------------------------------------------------------------- 1 | #include "swprintf_s.h" 2 | 3 | 4 | //stdio.h 5 | #ifndef _MSC_VER 6 | int swprintf_s(wchar_t * _Dst, unsigned int _SizeInWords, const wchar_t * _Format, ...) 7 | { 8 | return 0; 9 | } 10 | #endif 11 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/GetModuleHandle.c: -------------------------------------------------------------------------------- 1 | #include "GetModuleHandle.h" 2 | 3 | HMODULE GetModuleHandleA(LPCSTR lpModuleName) 4 | { 5 | return 0; 6 | } 7 | 8 | HMODULE GetModuleHandleW(LPCWSTR lpModuleName) 9 | { 10 | return 0; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/RegisterClassEx.c: -------------------------------------------------------------------------------- 1 | #include "RegisterClassEx.h" 2 | 3 | 4 | ATOM RegisterClassExA(CONST WNDCLASSEXA * x) 5 | { 6 | return 0; 7 | } 8 | 9 | ATOM RegisterClassExW(CONST WNDCLASSEXW * x) 10 | { 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/GetTokenInformation.c: -------------------------------------------------------------------------------- 1 | #include "GetTokenInformation.h" 2 | 3 | BOOL GetTokenInformation (HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength) 4 | { 5 | return 0; 6 | } -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/GetVersionEx.c: -------------------------------------------------------------------------------- 1 | #include "GetVersionEx.h" 2 | 3 | 4 | BOOL GetVersionExA(LPOSVERSIONINFOA lpVersionInformation) 5 | { 6 | return 0; 7 | } 8 | 9 | BOOL GetVersionExW(LPOSVERSIONINFOW lpVersionInformation) 10 | { 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/UnregisterClass.c: -------------------------------------------------------------------------------- 1 | #include "UnregisterClass.h" 2 | 3 | BOOL UnregisterClassA(LPCSTR lpClassName, HINSTANCE hInstance) 4 | { 5 | return 0; 6 | } 7 | 8 | BOOL UnregisterClassW(LPCWSTR lpClassName, HINSTANCE hInstance) 9 | { 10 | return 0; 11 | } -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/strcpy_s.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_strcpy_s_h_ 2 | #define _CS_unittesting_faux_windows_strcpy_s_h_ 3 | 4 | #ifndef _MSC_VER 5 | #include "../../../Common/strcpys.h" 6 | #else 7 | #include 8 | #endif 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /src/Common/bool.h: -------------------------------------------------------------------------------- 1 | #ifndef _bool_h_ 2 | #define _bool_h_ 3 | 4 | #ifdef CS_UNITTESTING 5 | 6 | #include "../unit-tests/faux/windows/BOOL.h" 7 | 8 | #else 9 | 10 | #define BOOL int 11 | #ifndef FALSE 12 | #define FALSE 0 13 | #define TRUE 1 14 | #endif 15 | 16 | #endif 17 | 18 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/LoadCursor.c: -------------------------------------------------------------------------------- 1 | #include "LoadCursor.h" 2 | 3 | 4 | HCURSOR LoadCursorA(HINSTANCE hInstance, LPCSTR lpCursorName) 5 | { 6 | return 0; 7 | } 8 | 9 | HCURSOR LoadCursorW(HINSTANCE hInstance, LPCWSTR lpCursorName) 10 | { 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/ShellNotifyIcon.c: -------------------------------------------------------------------------------- 1 | #include "ShellNotifyIcon.h" 2 | 3 | BOOL Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA lpData) 4 | { 5 | return 0; 6 | } 7 | 8 | BOOL Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW lpData) 9 | { 10 | return 0; 11 | } -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/NULL.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittests_faux_windows_NULL_h_ 2 | #define _CS_unittests_faux_windows_NULL_h_ 3 | 4 | #ifndef NULL 5 | #ifdef __cplusplus 6 | #define NULL 0 7 | #else 8 | #define NULL ((void *)0) 9 | #endif 10 | #endif 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/WORD.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_WORD_h_ 2 | #define _faux_windows_WORD_h_ 3 | 4 | #include "FAR.h" 5 | #include "NEAR.h" 6 | 7 | typedef unsigned short WORD; 8 | typedef WORD near *PWORD; 9 | typedef WORD far *LPWORD; 10 | 11 | #endif -------------------------------------------------------------------------------- /etc/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | %: 3 | # --parallel: We support parallel compiling. 4 | # --sourcedirectory=src: this calls our actual Makefile, which is 5 | # expected to be in the root of the ciphershed directory, but it is in 6 | # the src directory. 7 | dh $@ --parallel --sourcedirectory=src 8 | -------------------------------------------------------------------------------- /etc/sign.conf: -------------------------------------------------------------------------------- 1 | XCRT=./doc/trust/id/a/d/addtrust/AddTrust_External_CA_Root-signedby-Microsoft_Code_Verification_Root.crt 2 | CRT='./doc/trust/id/Release-Certificate-matching-private-key-in-the-windows-certificate-store.crt' 3 | SIGNTOOL=/cygdrive/c/Program\ Files\ \(x86\)/Windows\ Kits/8.1/bin/x64/signtool.exe 4 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/BYTE.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_byte_h_ 2 | #define _faux_windows_byte_h_ 3 | 4 | #include "NEAR.h" 5 | #include "FAR.h" 6 | 7 | typedef unsigned char BYTE; 8 | 9 | typedef BYTE near *PBYTE; 10 | typedef BYTE far *LPBYTE; 11 | 12 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/HINSTANCE.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_hinstance_h_ 2 | #define _faux_windows_hinstance_h_ 3 | 4 | #include "DECLARE_HANDLE.h" 5 | DECLARE_HANDLE(HINSTANCE); 6 | 7 | 8 | typedef HINSTANCE HMODULE; /* HMODULEs can be used in place of HINSTANCEs */ 9 | 10 | #endif -------------------------------------------------------------------------------- /bin/build-windows.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | . "$(dirname "$0")/../etc/env.sh" 3 | cd "$(dirname "$0")/../src" 4 | declare -a BUILDS 5 | [ $# -eq 0 ] && BUILDS=("All Debug" "All") || BUILDS=("$@") 6 | for BUILD in "${BUILDS[@]}"; 7 | do 8 | "$DEVENVcon" CipherShed.sln /build "$BUILD" || exit $? 9 | done 10 | -------------------------------------------------------------------------------- /src/Common/util/process.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_Common_util_process_h_ 2 | #define _CS_Common_util_process_h_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void AbortProcess (char *stringId); 9 | void AbortProcessSilent (void); 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/DeviceIoControl.cpp: -------------------------------------------------------------------------------- 1 | #include "DeviceIoControl.h" 2 | 3 | BOOL DeviceIoControl(HANDLE hDevice, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/GUID.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_unittests_faux_windows_guid_h_ 2 | #define CS_unittests_faux_windows_guid_h_ 3 | 4 | typedef struct { 5 | unsigned long Data1; 6 | unsigned short Data2; 7 | unsigned short Data3; 8 | unsigned char Data4[ 8 ]; 9 | } GUID; 10 | 11 | #endif -------------------------------------------------------------------------------- /src/Common/util/memory.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_Common_util_memory_h_ 2 | #define _CS_Common_util_memory_h_ 3 | 4 | #include "../Dlgcode.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | void *err_malloc ( size_t size ); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/DWORD.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_dword_h_ 2 | #define _faux_windows_dword_h_ 3 | 4 | #include "NEAR.h" 5 | #include "FAR.h" 6 | 7 | typedef unsigned long DWORD; 8 | typedef DWORD near *PDWORD; 9 | typedef DWORD far *LPDWORD; 10 | 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/DefWindowProc.c: -------------------------------------------------------------------------------- 1 | #include "DefWindowProc.h" 2 | 3 | LRESULT DefWindowProcA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) 4 | { 5 | return 0; 6 | } 7 | 8 | LRESULT DefWindowProcW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) 9 | { 10 | return 0; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/FILETIME.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_filetime_h_ 2 | #define _faux_windows_filetime_h_ 3 | 4 | #include "DWORD.h" 5 | typedef struct _FILETIME { 6 | DWORD dwLowDateTime; 7 | DWORD dwHighDateTime; 8 | } FILETIME, *PFILETIME, *LPFILETIME; 9 | #define _FILETIME_ 10 | 11 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/TOKEN_USER.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_TOKEN_USER_h_ 2 | #define _CS_unittesting_faux_windows_TOKEN_USER_h_ 3 | 4 | #include "SID_AND_ATTRIBUTES.h" 5 | 6 | typedef struct _TOKEN_USER { 7 | SID_AND_ATTRIBUTES User; 8 | } TOKEN_USER, *PTOKEN_USER; 9 | 10 | #endif -------------------------------------------------------------------------------- /src/Common/util/memory.cpp: -------------------------------------------------------------------------------- 1 | #include "memory.h" 2 | 3 | #pragma warning(push) 4 | #pragma warning(disable:4702) 5 | 6 | void *err_malloc (size_t size) 7 | { 8 | void *z = (void *) TCalloc (size); 9 | if (z) 10 | return z; 11 | AbortProcess ("OUTOFMEMORY"); 12 | return 0; 13 | } 14 | 15 | #pragma warning(pop) 16 | -------------------------------------------------------------------------------- /src/Common/Sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=Common 2 | TARGETTYPE=DRIVER_LIBRARY 3 | 4 | INCLUDES = ..;../Crypto 5 | 6 | SOURCES = \ 7 | Cache.c \ 8 | Crc.c \ 9 | Crypto.c \ 10 | EncryptionThreadPool.c \ 11 | Endian.c \ 12 | GfMul.c \ 13 | Pkcs5.c \ 14 | Volumes.c \ 15 | Xts.c \ 16 | Tests.c \ 17 | Wipe.c 18 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/POINT.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_point_h_ 2 | #define _faux_windows_point_h_ 3 | 4 | #include "LONG.h" 5 | #include "NEAR.h" 6 | #include "FAR.h" 7 | 8 | typedef struct tagPOINT 9 | { 10 | LONG x; 11 | LONG y; 12 | } POINT, *PPOINT, NEAR *NPPOINT, FAR *LPPOINT; 13 | 14 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/_wcsicmp.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows__wcsicmp_h_ 2 | #define _CS_unittesting_faux_windows__wcsicmp_h_ 3 | 4 | #ifndef _MSC_VER 5 | int _wcsicmp(const wchar_t *string1, const wchar_t *string2); 6 | #else 7 | #include 8 | #include 9 | #endif 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /bin/artifacts-cp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | DIR="$(dirname "$0")/../" 3 | TDIR="$1" 4 | if [ ! -d "$TDIR" ]; then 5 | echo $TDIR does not exist or is not a directory 6 | exit 1 7 | fi 8 | 9 | if [[ ! "$TDIR" = /* ]]; then 10 | TDIR="$(pwd)"/"$TDIR" 11 | fi 12 | 13 | cd "$DIR"/ 14 | 15 | ./bin/artifacts-tar.sh | (cd "$TDIR" && tar xv) 16 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/QueryDosDevice.cpp: -------------------------------------------------------------------------------- 1 | #include "QueryDosDevice.h" 2 | 3 | 4 | DWORD QueryDosDeviceA(LPCSTR lpDeviceName, LPSTR lpTargetPath, DWORD ucchMax) 5 | { 6 | return 0; 7 | } 8 | 9 | DWORD QueryDosDeviceW(LPCWSTR lpDeviceName, LPWSTR lpTargetPath, DWORD ucchMax) 10 | { 11 | return 0; 12 | } 13 | 14 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/GetLastError.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_GetLastError_h_ 2 | #define _faux_windows_GetLastError_h_ 3 | 4 | #include "DWORD.h" 5 | #include "VOID.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | DWORD GetLastError(VOID); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/GetSystemMetrics.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_GetSystemMetrics_h_ 2 | #define _CS_unittesting_faux_windows_GetSystemMetrics_h_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | int GetSystemMetrics(int nIndex); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | 14 | #endif -------------------------------------------------------------------------------- /src/Main/System.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | // Precompiled header 10 | #include "System.h" -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/CloseHandle.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_CloseHandle_h_ 2 | #define _faux_windows_CloseHandle_h_ 3 | 4 | #include "BOOL.h" 5 | #include "HANDLE.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | BOOL CloseHandle(HANDLE hObject); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/NIM.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_unittests_faux_windows_nim_h_ 2 | #define CS_unittests_faux_windows_nim_h_ 3 | 4 | 5 | #define NIM_ADD 0x00000000 6 | #define NIM_MODIFY 0x00000001 7 | #define NIM_DELETE 0x00000002 8 | #define NIM_SETFOCUS 0x00000003 9 | #define NIM_SETVERSION 0x00000004 10 | 11 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/SetLastError.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_SetLastError_h_ 2 | #define _faux_windows_SetLastError_h_ 3 | 4 | #include "DWORD.h" 5 | #include "VOID.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | VOID SetLastError(DWORD dwErrCode); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/VOID.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_VOID_h_ 2 | #define _faux_windows_VOID_h_ 3 | 4 | #include "FAR.h" 5 | #include "CONST.h" 6 | 7 | #ifndef VOID 8 | #define VOID void 9 | #endif 10 | 11 | typedef void *PVOID; 12 | typedef void far *LPVOID; 13 | typedef CONST void far *LPCVOID; 14 | 15 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/LIST_ENTRY.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_LIST_ENTRY_h_ 2 | #define _faux_windows_LIST_ENTRY_h_ 3 | 4 | #include "RESTRICTED_POINTER.h" 5 | 6 | typedef struct _LIST_ENTRY { 7 | struct _LIST_ENTRY *Flink; 8 | struct _LIST_ENTRY *Blink; 9 | } LIST_ENTRY, *PLIST_ENTRY, *RESTRICTED_POINTER PRLIST_ENTRY; 10 | 11 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/CodePages.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unit_tests_faux_windows_CodePages_h_ 2 | #define _CS_unit_tests_faux_windows_CodePages_h_ 3 | 4 | //see winnls.h 5 | #define CP_ACP 0 6 | #define CP_OEMCP 1 7 | #define CP_MACCP 2 8 | #define CP_THREAD_ACP 3 9 | #define CP_SYMBOL 42 10 | #define CP_UTF7 65000 11 | #define CP_UTF8 65001 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/IsUserAnAdmin.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_IsUserAnAdmin_h_ 2 | #define _CS_unittesting_faux_windows_IsUserAnAdmin_h_ 3 | 4 | #include "BOOL.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | BOOL IsUserAnAdmin(void); 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/LocalFree.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_unittests_faux_windows_localfree_h_ 2 | #define CS_unittests_faux_windows_localfree_h_ 3 | 4 | 5 | #include "HANDLE.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" 9 | { 10 | #endif 11 | 12 | HLOCAL LocalFree(HLOCAL hMem); 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/FlushFileBuffers.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_FlushFileBuffers_h_ 2 | #define _faux_windows_FlushFileBuffers_h_ 3 | 4 | #include "BOOL.h" 5 | #include "HANDLE.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | BOOL FlushFileBuffers(HANDLE hFile); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/DestroyWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_DestroyWindow_h_ 2 | #define _CS_unittesting_faux_windows_DestroyWindow_h_ 3 | 4 | #include "BOOL.h" 5 | #include "HWND.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | BOOL DestroyWindow(HWND hWnd); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/swprintf_s.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_swprintf_s_h_ 2 | #define _CS_unittesting_faux_windows_swprintf_s_h_ 3 | 4 | //stdio.h 5 | #ifndef _MSC_VER 6 | int swprintf_s(wchar_t * _Dst, unsigned int _SizeInWords, const wchar_t * _Format, ...); 7 | #else 8 | #include 9 | #include 10 | #endif 11 | 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/WNDPROC.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_wndproc_h_ 2 | #define _CS_unittesting_faux_windows_wndproc_h_ 3 | 4 | #include "LRESULT.h" 5 | #include "CALLBACK.h" 6 | #include "HWND.h" 7 | #include "UINT.h" 8 | #include "WPARAM.h" 9 | #include "LPARAM.h" 10 | 11 | typedef LRESULT (CALLBACK* WNDPROC)(HWND, UINT, WPARAM, LPARAM); 12 | 13 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/GetCurrentProcess.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_unittesting_faux_windows_GetCurrentProcess_h_ 2 | #define CS_unittesting_faux_windows_GetCurrentProcess_h_ 3 | 4 | #include "HANDLE.h" 5 | #include "VOID.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | HANDLE GetCurrentProcess(VOID); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/GetFileSize.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_GetFileSize_h_ 2 | #define _faux_windows_GetFileSize_h_ 3 | 4 | #include "HANDLE.h" 5 | #include "LARGE_INTEGER.h" 6 | #include "BOOL.h" 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | BOOL GetFileSizeEx(HANDLE hFile, PLARGE_INTEGER lpFileSize); 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | 18 | #endif -------------------------------------------------------------------------------- /src/Common/fsutil/fsutil.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_Common_fsutil_fsutil_h_ 2 | #define _CS_Common_fsutil_fsutil_h_ 3 | 4 | #include "../Tcdefs.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | BOOL ResolveSymbolicLink (const wchar_t *symLinkName, PWSTR targetName); 11 | int FileSystemAppearsEmpty (const char *devicePath); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | 18 | #endif -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CipherShed # 2 | Cross-platform on-the-fly encryption software. 3 | 4 | For more information, please see our website at [https://ciphershed.org](https://ciphershed.org). 5 | 6 | Technical information, including how to contribute and how to build, is available on our [wiki](https://wiki.ciphershed.org). 7 | 8 | Please use [our issue tracker](https://issues.ciphershed.org/projects/ciphershed) for bug reports. 9 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/EnableWindow.cpp: -------------------------------------------------------------------------------- 1 | #include "EnableWindow.h" 2 | 3 | BOOL EnableWindow(HWND hWnd, BOOL bEnable) 4 | { 5 | BOOL res=false; 6 | if (hWnd) 7 | { 8 | fauxEnablableWidget* few=(fauxEnablableWidget*)hWnd; 9 | if (few->enabled) 10 | { 11 | res=true; 12 | } 13 | else 14 | { 15 | res=false; 16 | } 17 | few->enabled=bEnable; 18 | } 19 | return res; 20 | } -------------------------------------------------------------------------------- /src/Common/util/unicode/strcmpw.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_Common_util_unicode_strcmpw_h_ 2 | #define CS_Common_util_unicode_strcmpw_h_ 3 | 4 | #ifndef CS_UNITTESTING 5 | #include 6 | #else 7 | #include "../../../unit-tests/faux/windows/WCHAR.h" 8 | #endif 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | int strcmpw(WCHAR* a, WCHAR* b); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | 20 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/DISK_GEOMETRY.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_disk_geometry_h_ 2 | #define _faux_windows_disk_geometry_h_ 3 | 4 | #include "MEDIA_TYPE.h" 5 | 6 | typedef struct _DISK_GEOMETRY { 7 | LARGE_INTEGER Cylinders; 8 | MEDIA_TYPE MediaType; 9 | DWORD TracksPerCylinder; 10 | DWORD SectorsPerTrack; 11 | DWORD BytesPerSector; 12 | } DISK_GEOMETRY, *PDISK_GEOMETRY; 13 | 14 | #endif -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "var/opt/microsoft-visual-c-152c"] 2 | path = var/opt/microsoft-visual-c-152c 3 | url = https://intranet.pdinc.us/git/microsoft-visual-c-152c 4 | [submodule "var/opt/cpptest-code"] 5 | path = var/opt/cpptest-code 6 | url = https://github.com/pdinc-oss/cpptest.git 7 | [submodule "var/opt/gcovr"] 8 | path = var/opt/gcovr 9 | url = https://github.com/pdinc-oss/gcovr.git 10 | branch = ciphershed-patch 11 | -------------------------------------------------------------------------------- /etc/debian/control: -------------------------------------------------------------------------------- 1 | Source: ciphershed 2 | Maintainer: ChangeMe 3 | Section: misc 4 | Priority: optional 5 | Standards-Version: 3.9.2 6 | Build-depends: build-essential, nasm, libfuse-dev, libwxgtk2.8-dev, pkgconf 7 | # fixme: build-essential too broad 8 | 9 | Package: ciphershed 10 | #Architecture: amd64 11 | Architecture: i386 amd64 12 | Depends: ${shlibs:Depends} 13 | Description: On-the-fly disk encryption 14 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/ShowWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_ShowWindow_h_ 2 | #define _CS_unittesting_faux_windows_ShowWindow_h_ 3 | 4 | #include "BOOL.h" 5 | #include "HWND.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | BOOL ShowWindow(HWND hWnd, int nCmdShow); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | #define SW_SHOWNORMAL 1 18 | 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /src/Core/Unix/System.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Platform_Unix_System 10 | #define TC_HEADER_Platform_Unix_System 11 | 12 | #endif // TC_HEADER_Platform_Unix_System 13 | -------------------------------------------------------------------------------- /src/Platform/Unix/System.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Platform_Unix_System 10 | #define TC_HEADER_Platform_Unix_System 11 | 12 | #endif // TC_HEADER_Platform_Unix_System 13 | -------------------------------------------------------------------------------- /src/Core/Unix/Linux/System.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Platform_Linux_System 10 | #define TC_HEADER_Platform_Linux_System 11 | 12 | #endif // TC_HEADER_Platform_Linux_System 13 | -------------------------------------------------------------------------------- /src/Core/Unix/MacOSX/System.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Platform_MacOSX_System 10 | #define TC_HEADER_Platform_MacOSX_System 11 | 12 | #endif // TC_HEADER_Platform_MacOSX_System 13 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/FormatMessage.c: -------------------------------------------------------------------------------- 1 | #include "FormatMessage.h" 2 | 3 | 4 | DWORD FormatMessageA(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPSTR lpBuffer, DWORD nSize, va_list *Arguments) 5 | { 6 | return 0; 7 | } 8 | 9 | DWORD FormatMessageW(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, va_list *Arguments) 10 | { 11 | return 0; 12 | } 13 | 14 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/GetFileTime.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_GetFileTime_h_ 2 | #define _faux_windows_GetFileTime_h_ 3 | 4 | #include "BOOL.h" 5 | #include "HANDLE.h" 6 | #include "FILETIME.h" 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | BOOL GetFileTime(HANDLE hFile, LPFILETIME lpCreationTime, LPFILETIME lpLastAccessTime, LPFILETIME lpLastWriteTime ); 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | 18 | #endif -------------------------------------------------------------------------------- /src/Core/Unix/FreeBSD/System.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Platform_FreeBSD_System 10 | #define TC_HEADER_Platform_FreeBSD_System 11 | 12 | #endif // TC_HEADER_Platform_FreeBSD_System 13 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/BOOL.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_bool_h_ 2 | #define _faux_windows_bool_h_ 3 | 4 | #include "FAR.h" 5 | #include "NEAR.h" 6 | 7 | typedef int BOOL; 8 | 9 | #ifndef FALSE 10 | #define FALSE 0 11 | #endif 12 | 13 | #ifndef TRUE 14 | #define TRUE 1 15 | #endif 16 | 17 | typedef BOOL near *PBOOL; 18 | typedef BOOL far *LPBOOL; 19 | 20 | 21 | #endif -------------------------------------------------------------------------------- /src/Core/Unix/Solaris/System.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008-2009 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Platform_Solaris_System 10 | #define TC_HEADER_Platform_Solaris_System 11 | 12 | #endif // TC_HEADER_Platform_Solaris_System 13 | -------------------------------------------------------------------------------- /src/include/rcversion.h: -------------------------------------------------------------------------------- 1 | #ifndef _cs_include_rcversion_h_ 2 | #define _cs_include_rcversion_h_ 3 | 4 | #include "version.h" 5 | #define _RC_INC_FILEVERSION_VALUE _CS_VERSION_1Market,_CS_VERSION_2Major,_CS_VERSION_3Minor,_CS_VERSION_4Build 6 | #define _RC_INC_PRODUCTVERSION_VALUE _RC_INC_FILEVERSION_VALUE 7 | #define _RC_INC_FILEVERSION_VALUE_STR _CS_VERSION_DOTTED_4STR 8 | #define _RC_INC_PRODUCTVERSION_VALUE_STR _RC_INC_FILEVERSION_VALUE_STR 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/EnableWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_EnableWindow_h_ 2 | #define _faux_windows_EnableWindow_h_ 3 | 4 | #include "HWND.h" 5 | #include "BOOL.h" 6 | 7 | typedef struct fauxEnablableWidget 8 | { 9 | BOOL enabled; 10 | } fauxEnablableWidget; 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | BOOL EnableWindow(HWND hWnd, BOOL bEnable); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/HCURSOR.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_unittesting_faux_windows_hcursor_h_ 2 | #define CS_unittesting_faux_windows_hcursor_h_ 3 | 4 | #include "HICON.h" 5 | #include "DECLARE_HANDLE.h" 6 | 7 | #ifndef _MAC 8 | typedef int HFILE; 9 | typedef HICON HCURSOR; /* HICONs & HCURSORs are polymorphic */ 10 | #else 11 | typedef short HFILE; 12 | DECLARE_HANDLE(HCURSOR); /* HICONs & HCURSORs are not polymorphic */ 13 | #endif 14 | 15 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/SECURITY_ATTRIBUTES.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_SECURITY_ATTRIBUTES_h_ 2 | #define _faux_windows_SECURITY_ATTRIBUTES_h_ 3 | 4 | #include "DWORD.h" 5 | #include "BOOL.h" 6 | #include "VOID.h" 7 | 8 | typedef struct _SECURITY_ATTRIBUTES { 9 | DWORD nLength; 10 | LPVOID lpSecurityDescriptor; 11 | BOOL bInheritHandle; 12 | } SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES; 13 | 14 | 15 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/IsWellKnownSid.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_IsWellKnownSid_h_ 2 | #define _CS_unittesting_faux_windows_IsWellKnownSid_h_ 3 | 4 | #include "BOOL.h" 5 | #include "PSID.h" 6 | #include "WELL_KNOWN_SID_TYPE.h" 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | BOOL IsWellKnownSid (PSID pSid, WELL_KNOWN_SID_TYPE WellKnownSidType); 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/NIF.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_unittests_faux_windows_nif_h_ 2 | #define CS_unittests_faux_windows_nif_h_ 3 | 4 | #define NIF_MESSAGE 0x00000001 5 | #define NIF_ICON 0x00000002 6 | #define NIF_TIP 0x00000004 7 | #define NIF_STATE 0x00000008 8 | #define NIF_INFO 0x00000010 9 | #define NIF_GUID 0x00000020 10 | #define NIF_REALTIME 0x00000040 11 | #define NIF_SHOWTIP 0x00000080 12 | 13 | 14 | #endif -------------------------------------------------------------------------------- /src/Crypto/Sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=Crypto 2 | TARGETTYPE=DRIVER_LIBRARY 3 | 4 | INCLUDES = .. 5 | 6 | NTTARGETFILES = \ 7 | "$(OBJ_PATH)\$(O)\Aes_$(TC_ARCH).obj" \ 8 | "$(OBJ_PATH)\$(O)\Aes_hw_cpu.obj" 9 | 10 | SOURCES = \ 11 | Aes_$(TC_ARCH).asm \ 12 | Aes_hw_cpu.asm \ 13 | Aeskey.c \ 14 | Aestab.c \ 15 | Blowfish.c \ 16 | Cast.c \ 17 | Des.c \ 18 | Rmd160.c \ 19 | Serpent.c \ 20 | Sha1.c \ 21 | Sha2.c \ 22 | Twofish.c \ 23 | Whirlpool.c 24 | -------------------------------------------------------------------------------- /src/Driver/Fuse/Driver.make: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | # 4 | # Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | # the file License.txt included in TrueCrypt binary and source code distribution 6 | # packages. 7 | # 8 | 9 | NAME := Driver 10 | 11 | OBJS := 12 | OBJS += FuseService.o 13 | 14 | CXXFLAGS += $(shell pkg-config fuse --cflags) 15 | 16 | include $(BUILD_INC)/Makefile.inc 17 | -------------------------------------------------------------------------------- /src/Common/strcpys.c: -------------------------------------------------------------------------------- 1 | #include "strcpys.h" 2 | 3 | #ifndef _MSC_VER 4 | 5 | int strcpy_s(char * s1, unsigned int s1max, const char * s2) 6 | { 7 | int res=0; 8 | if (!s1) return -1; 9 | if (!s1max) return -2; 10 | if (!s2) 11 | { 12 | s1[0]=0; 13 | return -2; 14 | } 15 | char* s1e=s1+s1max; 16 | while (s1max--) 17 | { 18 | 19 | if(!(*s1=*s2)) break; 20 | ++s1; 21 | ++s2; 22 | } 23 | if (!s1max) *s1e=0; 24 | return 0; 25 | } 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /src/Platform/System.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Platform_System 10 | #define TC_HEADER_Platform_System 11 | 12 | #ifdef TC_WINDOWS 13 | #include "Windows/System.h" 14 | #endif 15 | 16 | #endif // TC_HEADER_Platform_System 17 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/SetFilePointer.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_SetFilePointer_h_ 2 | #define _faux_windows_SetFilePointer_h_ 3 | 4 | #include "BOOL.h" 5 | #include "HANDLE.h" 6 | #include "DWORD.h" 7 | #include "LARGE_INTEGER.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | BOOL SetFilePointerEx(HANDLE hFile, LARGE_INTEGER liDistanceToMove, PLARGE_INTEGER lpNewFilePointer, DWORD dwMoveMethod); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/SetFileTime.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_SetFileTime_h_ 2 | #define _faux_windows_SetFileTime_h_ 3 | 4 | #include "BOOL.h" 5 | #include "HANDLE.h" 6 | #include "CONST.h" 7 | #include "FILETIME.h" 8 | 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | BOOL SetFileTime(HANDLE hFile, CONST FILETIME *lpCreationTime, CONST FILETIME *lpLastAccessTime, CONST FILETIME *lpLastWriteTime); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | 20 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/__nullterminated.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows___nullterminated_h_ 2 | #define _CS_unittesting_faux_windows___nullterminated_h_ 3 | 4 | #ifdef _MSC_VER 5 | // sal.h is included by MS c++ headers and others, like limits.h 6 | // if we do not use sal.h, then compiler things can go horribly wrong 7 | #include 8 | 9 | #else 10 | 11 | #ifndef __nullterminated 12 | #define __nullterminated 13 | #endif 14 | 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/Boot/Windows/IntFilter.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Boot_IntFilter 10 | #define TC_HEADER_Boot_IntFilter 11 | 12 | #include "Platform.h" 13 | 14 | bool InstallInterruptFilters (); 15 | 16 | #endif //TC_HEADER_Boot_IntFilter 17 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/NIIF.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_unittests_faux_windows_niif_h_ 2 | #define CS_unittests_faux_windows_niif_h_ 3 | 4 | #define NIIF_NONE 0x00000000 5 | #define NIIF_INFO 0x00000001 6 | #define NIIF_WARNING 0x00000002 7 | #define NIIF_ERROR 0x00000003 8 | #define NIIF_USER 0x00000004 9 | #define NIIF_ICON_MASK 0x0000000F 10 | #define NIIF_NOSOUND 0x00000010 11 | #define NIIF_LARGE_ICON 0x00000020 12 | #define NIIF_RESPECT_QUIET_TIME 0x00000080 13 | 14 | #endif -------------------------------------------------------------------------------- /src/Common/types/password.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_Common_types_password_h_ 2 | #define _CS_Common_types_password_h_ 3 | 4 | #include "../constants.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | typedef struct 11 | { 12 | // Modifying this structure can introduce incompatibility with previous versions 13 | unsigned __int32 Length; 14 | unsigned char Text[MAX_PASSWORD + 1]; 15 | char Pad[3]; // keep 64-bit alignment 16 | } Password; 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /src/Driver/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Driver.rc 4 | // 5 | 6 | // Next default values for new objects 7 | // 8 | #ifdef APSTUDIO_INVOKED 9 | #ifndef APSTUDIO_READONLY_SYMBOLS 10 | #define _APS_NO_MFC 1 11 | #define _APS_NEXT_RESOURCE_VALUE 101 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /src/CipherShed.vsmdi: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/LONG.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_long_h_ 2 | #define _faux_windows_long_h_ 3 | 4 | #ifndef _MSC_VER 5 | //#include 6 | //#include 7 | 8 | #define __int64 long long int 9 | 10 | #endif 11 | 12 | typedef long LONG; 13 | typedef __int64 LONGLONG; 14 | typedef unsigned __int64 ULONGLONG; 15 | 16 | #define MAXLONGLONG (0x7fffffffffffffff) 17 | 18 | typedef unsigned long ULONG; 19 | typedef ULONG *PULONG; 20 | 21 | 22 | 23 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/ShellNotifyIcon.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_unittests_faux_windows_shellnotifyicon_h_ 2 | #define CS_unittests_faux_windows_shellnotifyicon_h_ 3 | 4 | #include "BOOL.h" 5 | #include "DWORD.h" 6 | #include "NOTIFYICON.h" 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | BOOL Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA lpData); 13 | BOOL Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW lpData); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | 20 | #endif -------------------------------------------------------------------------------- /src/Setup/ComSetup.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2007 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | BOOL RegisterComServers (char *modulePath); 14 | BOOL UnregisterComServers (char *modulePath); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/MessageBox.c: -------------------------------------------------------------------------------- 1 | #include "MessageBox.h" 2 | #include "NULL.h" 3 | 4 | int MessageBoxA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType) 5 | { 6 | fauxMessageBox* fmb=(fauxMessageBox*)hWnd; 7 | if (hWnd==NULL) return 0; 8 | 9 | return fmb->retval; 10 | } 11 | int MessageBoxW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType) 12 | { 13 | fauxMessageBox* fmb=(fauxMessageBox*)hWnd; 14 | if (hWnd==NULL) return 0; 15 | 16 | return fmb->retval; 17 | } 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/Driver/Sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=truecrypt 2 | TARGETTYPE=DRIVER 3 | 4 | USER_C_FLAGS=$(USER_C_FLAGS) -D_UNICODE 5 | LINKER_FLAGS=$(LINKER_FLAGS) -map 6 | 7 | INCLUDES = ../Common;../Crypto 8 | 9 | SOURCES = \ 10 | DriveFilter.c \ 11 | DumpFilter.c \ 12 | EncryptedIoQueue.c \ 13 | Ntdriver.c \ 14 | Ntvol.c \ 15 | VolumeFilter.c \ 16 | Driver.rc 17 | 18 | TARGETLIBS = \ 19 | $(SDK_LIB_PATH)/uuid.lib \ 20 | ../Common/obj$(BUILD_ALT_DIR)/*/Common.lib \ 21 | ../Crypto/obj$(BUILD_ALT_DIR)/*/Crypto.lib 22 | -------------------------------------------------------------------------------- /src/Common/dialog/cursor.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_Common_dialog_cursor_h_ 2 | #define CS_Common_dialog_cursor_h_ 3 | 4 | #ifndef CS_UNITTESTING 5 | #include 6 | #else 7 | #include "../../unit-tests/faux/windows/HCURSOR.h" 8 | #endif 9 | 10 | #ifdef __cplusplus 11 | extern "C" 12 | { 13 | #endif 14 | 15 | extern HCURSOR hCursor; 16 | void WaitCursor ( void ); 17 | void NormalCursor ( void ); 18 | void ArrowWaitCursor ( void ); 19 | void HandCursor (); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | 26 | #endif -------------------------------------------------------------------------------- /src/Main/Main.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Main_Main 10 | #define TC_HEADER_Main_Main 11 | 12 | #include "System.h" 13 | #include "../Platform/Platform.h" 14 | #include "../Core/Core.h" 15 | #include "StringFormatter.h" 16 | 17 | #endif // TC_HEADER_Main_Main 18 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/LARGE_INTEGER.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_LARGE_INTEGER_h_ 2 | #define _faux_windows_LARGE_INTEGER_h_ 3 | 4 | #include "DWORD.h" 5 | #include "LONG.h" 6 | 7 | typedef union _LARGE_INTEGER { 8 | struct { 9 | DWORD LowPart; 10 | LONG HighPart; 11 | } DUMMYSTRUCTNAME; 12 | struct { 13 | DWORD LowPart; 14 | LONG HighPart; 15 | } u; 16 | LONGLONG QuadPart; 17 | } LARGE_INTEGER; 18 | 19 | typedef LARGE_INTEGER *PLARGE_INTEGER; 20 | 21 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/HANDLE.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_handle_h_ 2 | #define _faux_windows_handle_h_ 3 | 4 | #include "FAR.h" 5 | #include "NEAR.h" 6 | 7 | typedef void *HANDLE; 8 | #define INVALID_HANDLE_VALUE ((HANDLE)(LONG_PTR)-1) 9 | 10 | typedef HANDLE NEAR *SPHANDLE; 11 | typedef HANDLE FAR *LPHANDLE; 12 | typedef HANDLE HGLOBAL; 13 | typedef HANDLE HLOCAL; 14 | typedef HANDLE GLOBALHANDLE; 15 | typedef HANDLE LOCALHANDLE; 16 | 17 | 18 | #endif -------------------------------------------------------------------------------- /src/Boot/Windows/BootCrt.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | ; 4 | ; Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | ; the file License.txt included in TrueCrypt binary and source code distribution 6 | ; packages. 7 | ; 8 | 9 | .MODEL tiny, C 10 | .386 11 | 12 | INCLUDE BootDefs.i 13 | 14 | EXTERNDEF main:NEAR 15 | 16 | _TEXT SEGMENT 17 | ORG TC_COM_EXECUTABLE_OFFSET 18 | 19 | start: 20 | jmp main 21 | 22 | _TEXT ENDS 23 | END start 24 | -------------------------------------------------------------------------------- /src/Volume/VolumeSlot.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Volume_VolumeSlot 10 | #define TC_HEADER_Volume_VolumeSlot 11 | 12 | #include "../Platform/Platform.h" 13 | 14 | namespace CipherShed 15 | { 16 | typedef uint32 VolumeSlotNumber; 17 | } 18 | 19 | #endif // TC_HEADER_Volume_VolumeSlot 20 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/ARRAYSIZE.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_unittests_faux_windows_ARRAYSIZE_h_ 2 | #define CS_unittests_faux_windows_ARRAYSIZE_h_ 3 | 4 | extern "C++" // templates cannot be declared to have 'C' linkage 5 | template 6 | char (*RtlpNumberOf( UNALIGNED T (&)[N] ))[N]; 7 | 8 | #define RTL_NUMBER_OF_V2(A) (sizeof(*RtlpNumberOf(A))) 9 | 10 | #define RTL_NUMBER_OF_V1(A) (sizeof(A)/sizeof((A)[0])) 11 | 12 | 13 | #define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A) 14 | #define _ARRAYSIZE(A) RTL_NUMBER_OF_V1(A) 15 | 16 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/OpenProcessToken.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_OpenProcessToken_h_ 2 | #define _CS_unittesting_faux_windows_OpenProcessToken_h_ 3 | 4 | #include "BOOL.h" 5 | #include "HANDLE.h" 6 | #include "DWORD.h" 7 | #include "PHANDLE.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | BOOL OpenProcessToken (HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #define TOKEN_QUERY (0x0008) 20 | 21 | 22 | #endif -------------------------------------------------------------------------------- /src/Common/snprintf.h: -------------------------------------------------------------------------------- 1 | /** 2 | * (c) 2014 CipherShed. This is licensed under CipherShed license. 3 | * 4 | */ 5 | 6 | #ifndef _snprintf_h_ 7 | #define _snprintf_h_ 8 | 9 | #include 10 | 11 | #ifdef _MSC_VER 12 | /* 13 | * http://msdn.microsoft.com/en-us/library/ce3zzk1k.aspx or the solution 14 | * presented in http://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010 15 | */ 16 | 17 | #define snprintf sprintf_s 18 | 19 | #endif 20 | 21 | #define ARRAY_LENGTH(x) (sizeof(x) / sizeof(x[0])) 22 | 23 | 24 | #endif -------------------------------------------------------------------------------- /src/Crypto/Cast.h: -------------------------------------------------------------------------------- 1 | /* Deprecated/legacy */ 2 | 3 | 4 | #ifndef HEADER_CAST_H 5 | #define HEADER_CAST_H 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | typedef struct CAST_KEY_STRUCT 12 | { 13 | unsigned __int32 K[32]; 14 | } CAST_KEY; 15 | 16 | void Cast5Decrypt (const byte *inBlock, byte *outBlock, CAST_KEY *key); 17 | void Cast5Encrypt (const byte *inBlock, byte *outBlock, CAST_KEY *key); 18 | void Cast5SetKey (CAST_KEY *key, unsigned int keylength, const byte *userKey); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/CreateWindowEx.c: -------------------------------------------------------------------------------- 1 | #include "CreateWindowEx.h" 2 | 3 | HWND CreateWindowExA(DWORD dwExStyle, LPCSTR lpClassName, LPCSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam) 4 | { 5 | return 0; 6 | } 7 | 8 | HWND CreateWindowExW(DWORD dwExStyle, LPCWSTR lpClassName, LPCWSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam) 9 | { 10 | return 0; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/OutputDebugString.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_OutputDebugString_h_ 2 | #define _CS_unittesting_faux_windows_OutputDebugString_h_ 3 | 4 | #include "VOID.h" 5 | #include "LPCSTR.h" 6 | #include "LPCWSTR.h" 7 | 8 | VOID OutputDebugStringA(LPCSTR lpOutputString); 9 | 10 | VOID OutputDebugStringW(LPCWSTR lpOutputString); 11 | 12 | #ifdef UNICODE 13 | #define OutputDebugString OutputDebugStringW 14 | #else 15 | #define OutputDebugString OutputDebugStringA 16 | #endif // !UNICODE 17 | 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/GetProcAddress.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_unittesting_faux_windows_getprocaddress_h_ 2 | #define CS_unittesting_faux_windows_getprocaddress_h_ 3 | 4 | #include "NEAR.h" 5 | #include "FAR.h" 6 | #include "HINSTANCE.h" 7 | #include "LPCSTR.h" 8 | 9 | typedef int (FAR *FARPROC)(); 10 | typedef int (NEAR *NEARPROC)(); 11 | typedef int (*PROC)(); 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | FARPROC GetProcAddress (HMODULE hModule, LPCSTR lpProcName); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/Crypto/Serpent.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_Crypto_Serpent 2 | #define HEADER_Crypto_Serpent 3 | 4 | #include "../Common/Tcdefs.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" 8 | { 9 | #endif 10 | 11 | void serpent_set_key(const unsigned __int8 userKey[], int keylen, unsigned __int8 *ks); 12 | void serpent_encrypt(const unsigned __int8 *inBlock, unsigned __int8 *outBlock, unsigned __int8 *ks); 13 | void serpent_decrypt(const unsigned __int8 *inBlock, unsigned __int8 *outBlock, unsigned __int8 *ks); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #endif // HEADER_Crypto_Serpent 20 | -------------------------------------------------------------------------------- /src/Core/Core.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Core_Core 10 | #define TC_HEADER_Core_Core 11 | 12 | #include "CoreBase.h" 13 | 14 | #include 15 | 16 | namespace CipherShed 17 | { 18 | extern std::auto_ptr Core; 19 | extern std::auto_ptr CoreDirect; 20 | } 21 | 22 | #endif // TC_HEADER_Core_Core 23 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/DeviceIoControl.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_DeviceIoControl_h_ 2 | #define _faux_windows_DeviceIoControl_h_ 3 | 4 | #include "HANDLE.h" 5 | #include "DWORD.h" 6 | #include "VOID.h" 7 | #include "OVERLAPPED.h" 8 | #include "BOOL.h" 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | 15 | BOOL DeviceIoControl(HANDLE hDevice, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/ERROR.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_error_h_ 2 | #define _faux_windows_error_h_ 3 | 4 | //from WinError.h 5 | 6 | #define ERROR_SUCCESS 0L 7 | 8 | #define NO_ERROR 0L // dderror 9 | #define SEC_E_OK ((HRESULT)0x00000000L) 10 | 11 | #define ERROR_ACCESS_DENIED 5L 12 | #define ERROR_NOT_READY 21L 13 | #define ERROR_INSUFFICIENT_BUFFER 122L // dderror 14 | #define ERROR_INVALID_WINDOW_HANDLE 1400L 15 | 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/SID_AND_ATTRIBUTES.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_SID_AND_ATTRIBUTES_h_ 2 | #define _CS_unittesting_faux_windows_SID_AND_ATTRIBUTES_h_ 3 | 4 | //#ifdef MIDL_PASS 5 | //#include "PISID.h" 6 | //#else // MIDL_PASS 7 | #include "PSID.h" 8 | //#endif // MIDL_PASS 9 | 10 | #include "ULONG.h" 11 | 12 | typedef struct _SID_AND_ATTRIBUTES { 13 | //#ifdef MIDL_PASS 14 | // PISID Sid; 15 | //#else // MIDL_PASS 16 | PSID Sid; 17 | //#endif // MIDL_PASS 18 | ULONG Attributes; 19 | } SID_AND_ATTRIBUTES, * PSID_AND_ATTRIBUTES; 20 | 21 | 22 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/GetModuleHandle.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_unittesting_faux_windows_h_ 2 | #define CS_unittesting_faux_windows_h_ 3 | 4 | #include "HMODULE.h" 5 | #include "LPCSTR.h" 6 | #include "LPCWSTR.h" 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | HMODULE GetModuleHandleA(LPCSTR lpModuleName); 13 | HMODULE GetModuleHandleW(LPCWSTR lpModuleName); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #ifdef UNICODE 20 | #define GetModuleHandle GetModuleHandleW 21 | #else 22 | #define GetModuleHandle GetModuleHandleA 23 | #endif // !UNICODE 24 | 25 | 26 | #endif -------------------------------------------------------------------------------- /src/Crypto/Makefile.inc: -------------------------------------------------------------------------------- 1 | TC_ASFLAGS = -Xvc -Ox 2 | 3 | !if "$(TC_ARCH)" == "x86" 4 | TC_ASFLAGS = $(TC_ASFLAGS) -f win32 --prefix _ -D MS_STDCALL -D DLL_EXPORT 5 | !else 6 | TC_ASFLAGS = $(TC_ASFLAGS) -f win64 7 | !endif 8 | 9 | TC_ASM_ERR_LOG = ..\Driver\build_errors_asm.log 10 | 11 | "$(OBJ_PATH)\$(O)\Aes_$(TC_ARCH).obj": Aes_$(TC_ARCH).asm 12 | nasm.exe $(TC_ASFLAGS) -o "$@" -l "$(OBJ_PATH)\$(O)\Aes_$(TC_ARCH).lst" Aes_$(TC_ARCH).asm 2>$(TC_ASM_ERR_LOG) 13 | 14 | "$(OBJ_PATH)\$(O)\Aes_hw_cpu.obj": Aes_hw_cpu.asm 15 | nasm.exe $(TC_ASFLAGS) -o "$@" -l "$(OBJ_PATH)\$(O)\Aes_hw_cpu.lst" Aes_hw_cpu.asm 2>$(TC_ASM_ERR_LOG) 16 | -------------------------------------------------------------------------------- /src/Main/UserInterfaceType.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Main_UserInterfaceType 10 | #define TC_HEADER_Main_UserInterfaceType 11 | 12 | namespace CipherShed 13 | { 14 | struct UserInterfaceType 15 | { 16 | enum Enum 17 | { 18 | Unknown, 19 | Graphic, 20 | Text 21 | }; 22 | }; 23 | } 24 | 25 | #endif // TC_HEADER_Main_UserInterfaceType 26 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/LoadCursor.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_unittesting_faux_windows_loadcursor_h_ 2 | #define CS_unittesting_faux_windows_loadcursor_h_ 3 | 4 | #include "HCURSOR.h" 5 | #include "HINSTANCE.h" 6 | #include "LPCSTR.h" 7 | #include "LPCWSTR.h" 8 | 9 | HCURSOR 10 | LoadCursorA( 11 | HINSTANCE hInstance, 12 | LPCSTR lpCursorName); 13 | 14 | HCURSOR 15 | LoadCursorW( 16 | HINSTANCE hInstance, 17 | LPCWSTR lpCursorName); 18 | 19 | #ifdef UNICODE 20 | #define LoadCursor LoadCursorW 21 | #else 22 | #define LoadCursor LoadCursorA 23 | #endif // !UNICODE 24 | 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/Crypto/Blowfish.h: -------------------------------------------------------------------------------- 1 | /* Deprecated/legacy */ 2 | 3 | 4 | #ifndef TC_HEADER_Crypto_Blowfish 5 | #define TC_HEADER_Crypto_Blowfish 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | typedef struct BF_KEY_STRUCT 12 | { 13 | unsigned __int32 pbox[18]; 14 | unsigned __int32 pbox_dec[18]; 15 | unsigned __int32 sbox[4*256]; 16 | } BF_KEY; 17 | 18 | void BlowfishSetKey (BF_KEY *key, int keylength, unsigned char *key_string); 19 | void BlowfishEncryptLE (unsigned char *in, unsigned char *out, BF_KEY *ks, int encrypt); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | #endif // TC_HEADER_Crypto_Blowfish 26 | -------------------------------------------------------------------------------- /src/Common/fsutil/diskutil.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_Common_fsutil_diskutil_h_ 2 | #define _CS_Common_fsutil_diskutil_h_ 3 | 4 | #include "../Tcdefs.h" 5 | #include "../Dlgcode.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | BOOL GetDeviceInfo (const char *deviceName, DISK_PARTITION_INFO_STRUCT *info); 12 | BOOL GetDriveGeometry (const char *deviceName, PDISK_GEOMETRY diskGeometry); 13 | int GetDiskDeviceDriveLetter (PWSTR deviceName); 14 | BOOL IsDiskReadError (DWORD error); 15 | BOOL IsDiskWriteError (DWORD error); 16 | BOOL IsDiskError (DWORD error); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/QueryDosDevice.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_QueryDosDevice_h_ 2 | #define _CS_unittesting_faux_windows_QueryDosDevice_h_ 3 | 4 | #include "DWORD.h" 5 | #include "LPCSTR.h" 6 | #include "LPSTR.h" 7 | #include "LPCWSTR.h" 8 | #include "LPWSTR.h" 9 | 10 | DWORD QueryDosDeviceA(LPCSTR lpDeviceName, LPSTR lpTargetPath, DWORD ucchMax); 11 | 12 | DWORD QueryDosDeviceW(LPCWSTR lpDeviceName, LPWSTR lpTargetPath, DWORD ucchMax); 13 | 14 | #ifdef UNICODE 15 | #define QueryDosDevice QueryDosDeviceW 16 | #else 17 | #define QueryDosDevice QueryDosDeviceA 18 | #endif // !UNICODE 19 | 20 | 21 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/RegisterClassEx.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_RegisterClassEx_h_ 2 | #define _CS_unittesting_faux_windows_RegisterClassEx_h_ 3 | 4 | #include "CONST.h" 5 | #include "WNDCLASSEX.h" 6 | #include "ATOM.h" 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | ATOM RegisterClassExA(CONST WNDCLASSEXA *); 13 | 14 | ATOM RegisterClassExW(CONST WNDCLASSEXW *); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | 20 | #ifdef UNICODE 21 | #define RegisterClassEx RegisterClassExW 22 | #else 23 | #define RegisterClassEx RegisterClassExA 24 | #endif // !UNICODE 25 | 26 | 27 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/FILE.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_file_h_ 2 | #define _faux_windows_file_h_ 3 | 4 | #ifndef _FILE_DEFINED 5 | #ifdef _MSC_VER 6 | struct _iobuf { 7 | char *_ptr; 8 | int _cnt; 9 | char *_base; 10 | int _flag; 11 | int _file; 12 | int _charbuf; 13 | int _bufsiz; 14 | char *_tmpfname; 15 | }; 16 | typedef struct _iobuf FILE; 17 | #else 18 | #ifdef __CYGWIN__ 19 | #include 20 | typedef __FILE FILE; 21 | #else 22 | #include 23 | #endif 24 | #endif 25 | #define _FILE_DEFINED 26 | #endif 27 | 28 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/GetTokenInformation.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_GetTokenInformation_h_ 2 | #define _CS_unittesting_faux_windows_GetTokenInformation_h_ 3 | 4 | #include "BOOL.h" 5 | #include "HANDLE.h" 6 | #include "TOKEN_INFORMATION_CLASS.h" 7 | #include "LPVOID.h" 8 | #include "DWORD.h" 9 | #include "PDWORD.h" 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | BOOL GetTokenInformation (HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | #endif -------------------------------------------------------------------------------- /src/Platform/Unix/Time.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #include "../Time.h" 10 | #include 11 | #include 12 | 13 | namespace CipherShed 14 | { 15 | uint64 Time::GetCurrent () 16 | { 17 | struct timeval tv; 18 | gettimeofday (&tv, NULL); 19 | 20 | // Unix time => Windows file time 21 | return ((uint64) tv.tv_sec + 134774LL * 24 * 3600) * 1000LL * 1000 * 10; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/GetWindowText.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_GetWindowText_h_ 2 | #define _faux_windows_GetWindowText_h_ 3 | 4 | #include "GetWindowTextLength.h" 5 | #include "HWND.h" 6 | #include "CHAR.h" 7 | #include "WCHAR.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | #ifdef UNICODE 14 | #define GetWindowText GetWindowTextW 15 | #else 16 | #define GetWindowText GetWindowTextA 17 | #endif // !UNICODE 18 | 19 | int GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount); 20 | int GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | #endif -------------------------------------------------------------------------------- /src/Boot/Windows/BootMemory.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #include "Platform.h" 10 | #include "Bios.h" 11 | 12 | #pragma pack(1) 13 | 14 | struct BiosMemoryMapEntry 15 | { 16 | uint64 BaseAddress; 17 | uint64 Length; 18 | uint32 Type; 19 | }; 20 | 21 | #pragma pack() 22 | 23 | bool GetFirstBiosMemoryMapEntry (BiosMemoryMapEntry &entry); 24 | bool GetNextBiosMemoryMapEntry (BiosMemoryMapEntry &entry); 25 | -------------------------------------------------------------------------------- /src/Boot/Windows/BootStrings.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Boot_BootStrings 10 | #define TC_HEADER_Boot_BootStrings 11 | 12 | #define TC_BOOT_STR_ERROR "Error: " 13 | #define TC_BOOT_STR_NO_BOOT_PARTITION "No bootable partition found" 14 | #define TC_BOOT_STR_UPGRADE_BIOS "- Upgrade BIOS\r\n- Use a different motherboard model/brand\r\n" 15 | 16 | #endif // TC_HEADER_Boot_BootStrings 17 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/SetLayeredWindowAttributes.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_SetLayeredWindowAttributes_h_ 2 | #define _CS_unittesting_faux_windows_SetLayeredWindowAttributes_h_ 3 | 4 | #include "BOOL.h" 5 | #include "HWND.h" 6 | #include "COLORREF.h" 7 | #include "BYTE.h" 8 | #include "DWORD.h" 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | BOOL SetLayeredWindowAttributes(HWND hwnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | 20 | #define LWA_COLORKEY 0x00000001 21 | #define LWA_ALPHA 0x00000002 22 | 23 | 24 | 25 | #endif -------------------------------------------------------------------------------- /src/Common/util/unicode/strcmpw.c: -------------------------------------------------------------------------------- 1 | #include "strcmpw.h" 2 | 3 | #ifndef CS_UNITTESTING 4 | #else 5 | #include "../../../unit-tests/faux/windows/NULL.h" 6 | #endif 7 | 8 | 9 | int strcmpw(WCHAR* a, WCHAR* b) 10 | { 11 | if (a==b) 12 | { 13 | return 0; 14 | } 15 | if (a==NULL) 16 | { 17 | return -1; 18 | } 19 | if (b==NULL) 20 | { 21 | return 1; 22 | } 23 | while(1) 24 | { 25 | if (*a==*b) 26 | { 27 | if (*a==0) 28 | { 29 | return 0; 30 | } 31 | else 32 | { 33 | ++a; 34 | ++b; 35 | } 36 | } 37 | else if (*a>*b) 38 | { 39 | return 1; 40 | } 41 | else 42 | { 43 | return -1; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/MAKEINTRESOURCE.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_unittesting_faux_windows_MAKEINTRESOURCE_h_ 2 | #define CS_unittesting_faux_windows_MAKEINTRESOURCE_h_ 3 | 4 | #include "LONG.h" 5 | #include "LONG_PTR.h" 6 | #include "CHAR.h" 7 | #include "WCHAR.h" 8 | #include "WORD.h" 9 | 10 | #define IS_INTRESOURCE(_r) ((((ULONG_PTR)(_r)) >> 16) == 0) 11 | #define MAKEINTRESOURCEA(i) ((LPSTR)((ULONG_PTR)((WORD)(i)))) 12 | #define MAKEINTRESOURCEW(i) ((LPWSTR)((ULONG_PTR)((WORD)(i)))) 13 | #ifdef UNICODE 14 | #define MAKEINTRESOURCE MAKEINTRESOURCEW 15 | #else 16 | #define MAKEINTRESOURCE MAKEINTRESOURCEA 17 | #endif // !UNICODE 18 | 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /src/Crypto/Des.h: -------------------------------------------------------------------------------- 1 | /* Deprecated/legacy */ 2 | 3 | 4 | #ifndef HEADER_Crypto_DES 5 | #define HEADER_Crypto_DES 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | typedef struct TRIPLE_DES_KEY_STRUCT 12 | { 13 | unsigned __int32 k1[32]; 14 | unsigned __int32 k2[32]; 15 | unsigned __int32 k3[32]; 16 | unsigned __int32 k1d[32]; 17 | unsigned __int32 k2d[32]; 18 | unsigned __int32 k3d[32]; 19 | } TDES_KEY; 20 | 21 | void TripleDesEncrypt (byte *inBlock, byte *outBlock, TDES_KEY *key, int encrypt); 22 | void TripleDesSetKey (const byte *userKey, unsigned int length, TDES_KEY *ks); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif // HEADER_Crypto_DES 29 | -------------------------------------------------------------------------------- /src/Main/Forms/LegalNoticesDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Main_Forms_LegalNoticesDialog 10 | #define TC_HEADER_Main_Forms_LegalNoticesDialog 11 | 12 | #include "Forms.h" 13 | 14 | namespace CipherShed 15 | { 16 | class LegalNoticesDialog : public LegalNoticesDialogBase 17 | { 18 | public: 19 | LegalNoticesDialog (wxWindow* parent); 20 | }; 21 | } 22 | 23 | #endif // TC_HEADER_Main_Forms_LegalNoticesDialog 24 | -------------------------------------------------------------------------------- /doc/devdocs/notes.txt: -------------------------------------------------------------------------------- 1 | The (nt)driver decides a volume is a TC vol by identifying a signature with in the header. This signature is the TrueCrypt string, but the rebranding changed 2 | the constants, one or some of which created the string in the header. Now the code will have to look for CipherShed. To support legacy containers the code 3 | searches for CipherShed first, then TrueCrypt. 4 | 5 | Thanks to Kyle for taking the time to narrow it down to a flag being zero which led to the discovery of the 4 sections of code relying on the "disk label". 6 | 7 | The 4 areas are: 8 | WriteBootSectorUserConfig 9 | 10 | InstallBootLoader 11 | 12 | TC_IOCTL_OPEN_TEST 13 | 14 | TC_IOCTL_GET_SYSTEM_DRIVE_CONFIG 15 | -------------------------------------------------------------------------------- /src/Driver/VolumeFilter.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_DRIVER_VOLUME_FILTER 10 | #define TC_HEADER_DRIVER_VOLUME_FILTER 11 | 12 | #include "../Common/Tcdefs.h" 13 | 14 | extern uint32 HiddenSysLeakProtectionCount; 15 | 16 | NTSTATUS VolumeFilterAddDevice (PDRIVER_OBJECT driverObject, PDEVICE_OBJECT pdo); 17 | NTSTATUS VolumeFilterDispatchIrp (PDEVICE_OBJECT DeviceObject, PIRP Irp); 18 | 19 | #endif // TC_HEADER_DRIVER_VOLUME_FILTER 20 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/PARTITION_INFORMATION.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_partition_information_h_ 2 | #define _faux_windows_partition_information_h_ 3 | 4 | #include "DWORD.h" 5 | #include "LONG.h" 6 | #include "LARGE_INTEGER.h" 7 | #include "DWORD.h" 8 | #include "BYTE.h" 9 | #include "BOOLEAN.h" 10 | 11 | typedef struct _PARTITION_INFORMATION { 12 | LARGE_INTEGER StartingOffset; 13 | LARGE_INTEGER PartitionLength; 14 | DWORD HiddenSectors; 15 | DWORD PartitionNumber; 16 | BYTE PartitionType; 17 | BOOLEAN BootIndicator; 18 | BOOLEAN RecognizedPartition; 19 | BOOLEAN RewritePartition; 20 | } PARTITION_INFORMATION, *PPARTITION_INFORMATION; 21 | 22 | 23 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/UnregisterClass.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_UnregisterClass_h_ 2 | #define _CS_unittesting_faux_windows_UnregisterClass_h_ 3 | 4 | #include "BOOL.h" 5 | #include "LPCSTR.h" 6 | #include "HINSTANCE.h" 7 | #include "LPCWSTR.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | BOOL UnregisterClassA(LPCSTR lpClassName, HINSTANCE hInstance); 14 | 15 | BOOL UnregisterClassW(LPCWSTR lpClassName, HINSTANCE hInstance); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | #ifdef UNICODE 22 | #define UnregisterClass UnregisterClassW 23 | #else 24 | #define UnregisterClass UnregisterClassA 25 | #endif // !UNICODE 26 | 27 | 28 | #endif -------------------------------------------------------------------------------- /src/Main/Forms/AboutDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Main_Forms_AboutDialog 10 | #define TC_HEADER_Main_Forms_AboutDialog 11 | 12 | #include "Forms.h" 13 | 14 | namespace CipherShed 15 | { 16 | class AboutDialog : public AboutDialogBase 17 | { 18 | public: 19 | AboutDialog (wxWindow* parent); 20 | 21 | void OnWebsiteHyperlinkClick (wxHyperlinkEvent& event) { Gui->OpenHomepageLink (this, L"main"); } 22 | }; 23 | } 24 | 25 | #endif // TC_HEADER_Main_Forms_AboutDialog 26 | -------------------------------------------------------------------------------- /src/Volume/Version.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Volume_Version 10 | #define TC_HEADER_Volume_Version 11 | 12 | #include "../Platform/PlatformBase.h" 13 | using namespace std; 14 | #include "../Common/Tcdefs.h" 15 | 16 | namespace CipherShed 17 | { 18 | class Version 19 | { 20 | public: 21 | static const string String () { return VERSION_STRING; } 22 | static const uint16 Number () { return VERSION_NUM; } 23 | }; 24 | } 25 | 26 | #endif // TC_HEADER_Volume_Version 27 | -------------------------------------------------------------------------------- /src/Boot/Windows/Bios.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Boot_Bios 10 | #define TC_HEADER_Boot_Bios 11 | 12 | #include "Platform.h" 13 | 14 | #define TC_LB_SIZE_BIT_SHIFT_DIVISOR 9 15 | 16 | #define TC_FIRST_BIOS_DRIVE 0x80 17 | #define TC_LAST_BIOS_DRIVE 0x8f 18 | #define TC_INVALID_BIOS_DRIVE (TC_FIRST_BIOS_DRIVE - 1) 19 | 20 | enum 21 | { 22 | BiosResultSuccess = 0x00, 23 | BiosResultInvalidFunction = 0x01 24 | }; 25 | 26 | typedef byte BiosResult; 27 | 28 | #endif // TC_HEADER_Boot_Bios 29 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/RegOpenKeyEx.c: -------------------------------------------------------------------------------- 1 | #include "RegOpenKeyEx.h" 2 | 3 | LSTATUS RegOpenKeyExA(HKEY hKey, LPCSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult) 4 | { 5 | return 0; 6 | } 7 | 8 | LSTATUS RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult) 9 | { 10 | return 0; 11 | } 12 | 13 | LSTATUS RegQueryValueExA(HKEY hKey, LPCSTR lpValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData) 14 | { 15 | return 0; 16 | } 17 | 18 | LSTATUS RegQueryValueExW(HKEY hKey, LPCWSTR lpValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData) 19 | { 20 | return 0; 21 | } 22 | 23 | LSTATUS RegCloseKey(HKEY hKey) 24 | { 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /src/Platform/Functor.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Platform_Functor 10 | #define TC_HEADER_Platform_Functor 11 | 12 | #include "PlatformBase.h" 13 | using namespace std; 14 | 15 | namespace CipherShed 16 | { 17 | struct Functor 18 | { 19 | virtual ~Functor () { } 20 | virtual void operator() () = 0; 21 | }; 22 | 23 | struct GetStringFunctor 24 | { 25 | virtual ~GetStringFunctor () { } 26 | virtual void operator() (string &str) = 0; 27 | }; 28 | } 29 | 30 | #endif // TC_HEADER_Platform_Functor 31 | -------------------------------------------------------------------------------- /src/Core/Unix/MountedFilesystem.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Core_Unix_MountedFilesystem 10 | #define TC_HEADER_Core_Unix_MountedFilesystem 11 | 12 | #include "../../Platform/Platform.h" 13 | 14 | namespace CipherShed 15 | { 16 | struct MountedFilesystem 17 | { 18 | public: 19 | DevicePath Device; 20 | DirectoryPath MountPoint; 21 | string Type; 22 | }; 23 | 24 | typedef list < shared_ptr > MountedFilesystemList; 25 | } 26 | 27 | #endif // TC_HEADER_Core_Unix_MountedFilesystem 28 | -------------------------------------------------------------------------------- /src/Common/dialog/userperms.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_Common_dialog_userperms_h_ 2 | #define CS_Common_dialog_userperms_h_ 3 | 4 | #ifndef CS_UNITTESTING 5 | #include 6 | #else 7 | #include "../../unit-tests/faux/windows/BOOL.h" 8 | #endif 9 | 10 | #include "../Common.h" 11 | #include "../Dlgcode.h" 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | extern BOOL UacElevated; 18 | 19 | BOOL IsUacSupported(); 20 | BOOL IsOSAtLeast(OSVersionEnum reqMinOS); 21 | BOOL IsOSVersionAtLeast(OSVersionEnum reqMinOS, int reqMinServicePack); 22 | BOOL Is64BitOs(); 23 | BOOL IsServerOS(); 24 | BOOL IsAdmin (void); 25 | BOOL IsBuiltInAdmin (); 26 | 27 | void EnableElevatedCursorChange (HWND parent); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/Platform/Time.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Platform_Time 10 | #define TC_HEADER_Platform_Time 11 | 12 | #include "PlatformBase.h" 13 | using namespace std; 14 | 15 | namespace CipherShed 16 | { 17 | class Time 18 | { 19 | public: 20 | Time () { } 21 | virtual ~Time () { } 22 | 23 | static uint64 GetCurrent (); // Returns time in hundreds of nanoseconds since 1601/01/01 24 | 25 | private: 26 | Time (const Time &); 27 | Time &operator= (const Time &); 28 | }; 29 | } 30 | 31 | #endif // TC_HEADER_Platform_Time 32 | -------------------------------------------------------------------------------- /src/Platform/Unix/SystemLog.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #include 10 | #include "../SystemLog.h" 11 | 12 | namespace CipherShed 13 | { 14 | void SystemLog::WriteDebug (const string &debugMessage) 15 | { 16 | openlog ("ciphershed", LOG_PID, LOG_USER); 17 | syslog (LOG_DEBUG, "%s", debugMessage.c_str()); 18 | closelog(); 19 | } 20 | 21 | void SystemLog::WriteError (const string &errorMessage) 22 | { 23 | openlog ("ciphershed", LOG_PID, LOG_USER); 24 | syslog (LOG_ERR, "%s", errorMessage.c_str()); 25 | closelog(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/CreateFile.cpp: -------------------------------------------------------------------------------- 1 | #include "CreateFile.h" 2 | 3 | HANDLE CreateFile(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile) 4 | { 5 | return 0; 6 | } 7 | 8 | 9 | HANDLE CreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile) 10 | { 11 | return 0; 12 | } 13 | 14 | 15 | HANDLE CreateFileW(LPCWSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile) 16 | { 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/GetVersionEx.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_GetVersionEx_h_ 2 | #define _CS_unittesting_faux_windows_GetVersionEx_h_ 3 | 4 | #include "BOOL.h" 5 | #include "OSVERSIONINFO.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | BOOL GetVersionExA(LPOSVERSIONINFOA lpVersionInformation); 12 | 13 | BOOL GetVersionExW(LPOSVERSIONINFOW lpVersionInformation); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #ifdef UNICODE 20 | #define GetVersionEx GetVersionExW 21 | #else 22 | #define GetVersionEx GetVersionExA 23 | #endif // !UNICODE 24 | 25 | #define VER_NT_WORKSTATION 0x0000001 26 | #define VER_NT_DOMAIN_CONTROLLER 0x0000002 27 | #define VER_NT_SERVER 0x0000003 28 | 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/Platform/User.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Platform_User 10 | #define TC_HEADER_Platform_User 11 | 12 | #include "PlatformBase.h" 13 | using namespace std; 14 | 15 | #ifdef TC_UNIX 16 | #include 17 | #include 18 | #endif 19 | 20 | namespace CipherShed 21 | { 22 | struct UserId 23 | { 24 | UserId () { } 25 | #if defined(TC_UNIX) || defined(CS_UNITTESTING) 26 | UserId (uid_t systemId) : SystemId (systemId) { } 27 | 28 | uid_t SystemId; 29 | #endif 30 | }; 31 | } 32 | 33 | #endif // TC_HEADER_Platform_User 34 | -------------------------------------------------------------------------------- /doc/trust/audits/l/n/lemcke,niklas/audit_2014-12-28: -------------------------------------------------------------------------------- 1 | Audit report from the 29th of december 2014, by Niklas Lemcke 2 | 3 | I reviewed all commits listed under 3.1.3. "Selected critical commits' log entries" of "doc/trust/audits/p/y/pyeron,jason/audit-report-2014-12-18-04af5c7cbff47b17bd4b0153330028adb28eae4c.pdf" (md5sum: c3cb20d4e659c9dfcabc8a09c8297a9c, sha256sum: 439df72855a1b7f2b10dd306781014a28129b9d75311d33502528880b28279fd) by Jason Pyeron, and can hereby confirm their correctness, as well as agree with the conclusion the audit makes. 4 | 5 | However, I have not yet individually reviewed every single commit that has been made to the CS repository, nor have I verified that Jason Pyeron's list of "commits with potential conflict of interest" is complete. This will happen prior to the first full release of CipherShed 0.7.3. 6 | -------------------------------------------------------------------------------- /src/Platform/SystemInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Platform_SystemInfo 10 | #define TC_HEADER_Platform_SystemInfo 11 | 12 | #include "PlatformBase.h" 13 | using namespace std; 14 | 15 | namespace CipherShed 16 | { 17 | class SystemInfo 18 | { 19 | public: 20 | static wstring GetPlatformName (); 21 | static vector GetVersion (); 22 | static bool IsVersionAtLeast (int versionNumber1, int versionNumber2, int versionNumber3 = 0); 23 | 24 | protected: 25 | SystemInfo (); 26 | }; 27 | } 28 | 29 | #endif // TC_HEADER_Platform_SystemInfo 30 | -------------------------------------------------------------------------------- /src/Platform/Platform.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Platform 10 | #define TC_HEADER_Platform 11 | 12 | #include "PlatformBase.h" 13 | using namespace std; 14 | #include "Buffer.h" 15 | #include "Exception.h" 16 | #include "Directory.h" 17 | #include "Event.h" 18 | #include "File.h" 19 | #include "FilesystemPath.h" 20 | #include "Finally.h" 21 | #include "ForEach.h" 22 | #include "Functor.h" 23 | #include "Memory.h" 24 | #include "Mutex.h" 25 | #include "SharedPtr.h" 26 | #include "SystemException.h" 27 | #include "Thread.h" 28 | 29 | #endif // TC_HEADER_Platform 30 | -------------------------------------------------------------------------------- /src/Boot/Windows/BootEncryptedIo.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Boot_BootEncryptionIo 10 | #define TC_HEADER_Boot_BootEncryptionIo 11 | 12 | #include "Platform.h" 13 | 14 | BiosResult ReadEncryptedSectors (uint16 destSegment, uint16 destOffset, byte drive, uint64 sector, uint16 sectorCount); 15 | BiosResult WriteEncryptedSectors (uint16 sourceSegment, uint16 sourceOffset, byte drive, uint64 sector, uint16 sectorCount); 16 | static bool ReadWritePartiallyCoversEncryptedArea (const uint64 §or, uint16 sectorCount); 17 | 18 | #endif // TC_HEADER_Boot_BootEncryptionIo 19 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/DefWindowProc.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_DefWindowProc_h_ 2 | #define _CS_unittesting_faux_windows_DefWindowProc_h_ 3 | 4 | #include "LRESULT.h" 5 | #include "HWND.h" 6 | #include "UINT.h" 7 | #include "WPARAM.h" 8 | #include "LPARAM.h" 9 | 10 | //see: https://www.winehq.org/pipermail/wine-patches/2006-October/031645.html 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | LRESULT DefWindowProcA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 17 | 18 | LRESULT DefWindowProcW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | 24 | #ifdef UNICODE 25 | #define DefWindowProc DefWindowProcW 26 | #else 27 | #define DefWindowProc DefWindowProcA 28 | #endif // !UNICODE 29 | 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/OVERLAPPED.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_OVERLAPPED_h_ 2 | #define _faux_windows_OVERLAPPED_h_ 3 | 4 | #include "LONG_PTR.h" 5 | #include "DWORD.h" 6 | #include "HANDLE.h" 7 | #include "VOID.h" 8 | 9 | typedef struct _OVERLAPPED { 10 | ULONG_PTR Internal; 11 | ULONG_PTR InternalHigh; 12 | union { 13 | struct { 14 | DWORD Offset; 15 | DWORD OffsetHigh; 16 | } DUMMYSTRUCTNAME; 17 | PVOID Pointer; 18 | } DUMMYUNIONNAME; 19 | 20 | HANDLE hEvent; 21 | } OVERLAPPED, *LPOVERLAPPED; 22 | 23 | typedef struct _OVERLAPPED_ENTRY { 24 | ULONG_PTR lpCompletionKey; 25 | LPOVERLAPPED lpOverlapped; 26 | ULONG_PTR Internal; 27 | DWORD dwNumberOfBytesTransferred; 28 | } OVERLAPPED_ENTRY, *LPOVERLAPPED_ENTRY; 29 | 30 | #endif -------------------------------------------------------------------------------- /doc/devdocs/building-tests-nonVS.txt: -------------------------------------------------------------------------------- 1 | g++ unittesting.cpp \ 2 | -I . \ 3 | -I ../../var/opt/cpptest-code/cpptest/src/ \ 4 | ../../var/opt/cpptest-code/cpptest/src/source.cpp \ 5 | ../../var/opt/cpptest-code/cpptest/src/suite.cpp \ 6 | ../../var/opt/cpptest-code/cpptest/src/textoutput.cpp \ 7 | ../../var/opt/cpptest-code/cpptest/src/time.cpp \ 8 | ../../var/opt/cpptest-code/cpptest/src/utils.cpp \ 9 | ../../var/opt/cpptest-code/cpptest/src/collectoroutput.cpp \ 10 | ../../var/opt/cpptest-code/cpptest/src/compileroutput.cpp \ 11 | ../../var/opt/cpptest-code/cpptest/src/htmloutput.cpp \ 12 | ../../var/opt/cpptest-code/cpptest/src/missing.cpp \ 13 | -o unittesting 14 | 15 | ./unittesting 16 | -------------------------------------------------------------------------------- /src/Main/Forms/VolumePropertiesDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Main_Forms_VolumePropertiesDialog 10 | #define TC_HEADER_Main_Forms_VolumePropertiesDialog 11 | 12 | #include "Forms.h" 13 | #include "../Main.h" 14 | 15 | namespace CipherShed 16 | { 17 | class VolumePropertiesDialog : public VolumePropertiesDialogBase 18 | { 19 | public: 20 | VolumePropertiesDialog (wxWindow* parent, const VolumeInfo &volumeInfo); 21 | 22 | void AppendToList (const string &name, const wxString &value); 23 | }; 24 | } 25 | 26 | #endif // TC_HEADER_Main_Forms_VolumePropertiesDialog 27 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/GetWindowTextLength.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_GetWindowTextLength_h_ 2 | #define _faux_windows_GetWindowTextLength_h_ 3 | 4 | #include "HWND.h" 5 | #include "WCHAR.h" 6 | 7 | #define fauxWindowText_BUFFERSIZE 2048 8 | 9 | typedef struct fauxWindowText 10 | { 11 | int n; 12 | union 13 | { 14 | WCHAR w[fauxWindowText_BUFFERSIZE]; 15 | char a[fauxWindowText_BUFFERSIZE*2]; 16 | } buf; 17 | } fauxWindowText; 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | int GetWindowTextLengthA(HWND hWnd); 24 | int GetWindowTextLengthW(HWND hWnd); 25 | 26 | #ifdef UNICODE 27 | #define GetWindowTextLength GetWindowTextLengthW 28 | #else 29 | #define GetWindowTextLength GetWindowTextLengthA 30 | #endif // !UNICODE 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif -------------------------------------------------------------------------------- /src/Common/Dictionary.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2005-2009 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef DICTIONARY_H 10 | #define DICTIONARY_H 11 | 12 | #ifndef CS_UNITTESTING 13 | #include 14 | #endif 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | #define DATA_POOL_CAPACITY 1000000 21 | 22 | void AddDictionaryEntry (char *key, int intKey, void *value); 23 | void *GetDictionaryValue (const char *key); 24 | void *GetDictionaryValueByInt (int intKey); 25 | void *AddPoolData (void *data, size_t dataSize); 26 | void ClearDictionaryPool (); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/Main/SystemPrecompiled.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef CS_UNITTESTING 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #ifndef TC_NO_GUI 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #endif 26 | #endif 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | -------------------------------------------------------------------------------- /src/Core/FatFormatter.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008-2010 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Core_FatFormatter 10 | #define TC_HEADER_Core_FatFormatter 11 | 12 | #include "../Platform/Platform.h" 13 | 14 | namespace CipherShed 15 | { 16 | class FatFormatter 17 | { 18 | public: 19 | struct WriteSectorCallback 20 | { 21 | virtual ~WriteSectorCallback () { } 22 | virtual bool operator() (const BufferPtr §or) = 0; 23 | }; 24 | 25 | static void Format (WriteSectorCallback &writeSector, uint64 deviceSize, uint32 clusterSize, uint32 sectorSize); 26 | }; 27 | } 28 | 29 | #endif // TC_HEADER_Core_FatFormatter 30 | -------------------------------------------------------------------------------- /src/Crypto/Rmd160.h: -------------------------------------------------------------------------------- 1 | #ifndef TC_HEADER_Crypto_Ripemd160 2 | #define TC_HEADER_Crypto_Ripemd160 3 | 4 | #include "../Common/Tcdefs.h" 5 | 6 | #if defined(__cplusplus) 7 | extern "C" 8 | { 9 | #endif 10 | 11 | #define RIPEMD160_BLOCK_LENGTH 64 12 | 13 | typedef struct RMD160Context 14 | { 15 | unsigned __int32 state[5]; 16 | #ifndef TC_WINDOWS_BOOT 17 | uint64 count; 18 | #else 19 | uint16 count; 20 | #endif 21 | unsigned char buffer[RIPEMD160_BLOCK_LENGTH]; 22 | } RMD160_CTX; 23 | 24 | void RMD160Init (RMD160_CTX *ctx); 25 | void RMD160Transform (unsigned __int32 *state, const unsigned __int32 *data); 26 | void RMD160Update (RMD160_CTX *ctx, const unsigned char *input, unsigned __int32 len); 27 | void RMD160Final (unsigned char *digest, RMD160_CTX *ctx); 28 | 29 | #if defined(__cplusplus) 30 | } 31 | #endif 32 | 33 | #endif // TC_HEADER_Crypto_Ripemd160 34 | -------------------------------------------------------------------------------- /src/Core/Core.make: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | # 4 | # Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | # the file License.txt included in TrueCrypt binary and source code distribution 6 | # packages. 7 | # 8 | 9 | OBJS := 10 | OBJS += CoreBase.o 11 | OBJS += CoreException.o 12 | OBJS += FatFormatter.o 13 | OBJS += HostDevice.o 14 | OBJS += MountOptions.o 15 | OBJS += RandomNumberGenerator.o 16 | OBJS += VolumeCreator.o 17 | OBJS += Unix/CoreService.o 18 | OBJS += Unix/CoreServiceRequest.o 19 | OBJS += Unix/CoreServiceResponse.o 20 | OBJS += Unix/CoreUnix.o 21 | OBJS += Unix/$(PLATFORM)/Core$(PLATFORM).o 22 | OBJS += Unix/$(PLATFORM)/Core$(PLATFORM).o 23 | ifeq "$(PLATFORM)" "MacOSX" 24 | OBJS += Unix/FreeBSD/CoreFreeBSD.o 25 | endif 26 | 27 | include $(BUILD_INC)/Makefile.inc 28 | -------------------------------------------------------------------------------- /src/Common/volume/volutil.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_Common_volume_volutil_h_ 2 | #define _CS_Common_volume_volutil_h_ 3 | 4 | #include "../Tcdefs.h" 5 | 6 | #ifdef CS_UNITTESTING 7 | #include "../../unit-tests/faux/windows/BOOL.h" 8 | #include "../../unit-tests/faux/windows/LPWSTR.h" 9 | #endif 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | void CreateFullVolumePath (char *lpszDiskFile, const char *lpszFileName, BOOL * bDevice); 16 | BOOL IsVolumeDeviceHosted (const char *lpszDiskFile); 17 | BOOL IsMountedVolume (const char *volname); 18 | int GetMountedVolumeDriveNo (char *volname); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #include 23 | std::string VolumeGuidPathToDevicePath (std::string volumeGuidPath); 24 | std::string HarddiskVolumePathToPartitionPath (const std::string &harddiskVolumePath); 25 | #endif 26 | 27 | 28 | #endif -------------------------------------------------------------------------------- /src/Main/FatalErrorHandler.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008-2009 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Main_FatalErrorHandler 10 | #define TC_HEADER_Main_FatalErrorHandler 11 | 12 | #include "System.h" 13 | 14 | namespace CipherShed 15 | { 16 | class FatalErrorHandler 17 | { 18 | public: 19 | static void Deregister(); 20 | static uint32 GetAppChecksum (); 21 | static wstring GetCallStack (int depth); 22 | static void Register(); 23 | 24 | protected: 25 | static void OnSignal (int signal); 26 | static void OnTerminate (); 27 | 28 | private: 29 | FatalErrorHandler (); 30 | }; 31 | } 32 | 33 | #endif // TC_HEADER_Main_FatalErrorHandler 34 | -------------------------------------------------------------------------------- /src/Platform/Directory.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008-2009 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Platform_Directory 10 | #define TC_HEADER_Platform_Directory 11 | 12 | #include "PlatformBase.h" 13 | using namespace std; 14 | #include "FilesystemPath.h" 15 | 16 | namespace CipherShed 17 | { 18 | class Directory 19 | { 20 | public: 21 | static void Create (const DirectoryPath &path); 22 | static DirectoryPath AppendSeparator (const DirectoryPath &path); 23 | static FilePathList GetFilePaths (const DirectoryPath &path = L".", bool regularFilesOnly = true); 24 | 25 | private: 26 | Directory (); 27 | }; 28 | } 29 | 30 | #endif // TC_HEADER_Platform_Directory 31 | -------------------------------------------------------------------------------- /src/Setup/Dir.h: -------------------------------------------------------------------------------- 1 | /* 2 | Legal Notice: Some portions of the source code contained in this file were 3 | derived from the source code of Encryption for the Masses 2.02a, which is 4 | Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License 5 | Agreement for Encryption for the Masses'. Modifications and additions to 6 | the original source code (contained in this file) and all other portions 7 | of this file are Copyright (c) 2003-2008 TrueCrypt Developers Association 8 | and are governed by the TrueCrypt License 3.0 the full text of which is 9 | contained in the file License.txt included in TrueCrypt binary and source 10 | code distribution packages. */ 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | int mkfulldir ( char *path , BOOL bCheckonly ); 17 | int mkfulldir_internal ( char *path ); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /src/Crypto/Aes_hw_cpu.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Crypto_Aes_Hw_Cpu 10 | #define TC_HEADER_Crypto_Aes_Hw_Cpu 11 | 12 | #include "../Common/Tcdefs.h" 13 | 14 | #if defined(__cplusplus) 15 | extern "C" 16 | { 17 | #endif 18 | 19 | byte is_aes_hw_cpu_supported (); 20 | void aes_hw_cpu_enable_sse (); 21 | void aes_hw_cpu_decrypt (const byte *ks, byte *data); 22 | void aes_hw_cpu_decrypt_32_blocks (const byte *ks, byte *data); 23 | void aes_hw_cpu_encrypt (const byte *ks, byte *data); 24 | void aes_hw_cpu_encrypt_32_blocks (const byte *ks, byte *data); 25 | 26 | #if defined(__cplusplus) 27 | } 28 | #endif 29 | 30 | #endif // TC_HEADER_Crypto_Aes_Hw_Cpu 31 | -------------------------------------------------------------------------------- /src/Main/Forms/LegalNoticesDialog.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #include "../System.h" 10 | #include "LegalNoticesDialog.h" 11 | #include "../GraphicUserInterface.h" 12 | #include "../Resources.h" 13 | 14 | namespace CipherShed 15 | { 16 | LegalNoticesDialog::LegalNoticesDialog (wxWindow* parent) : LegalNoticesDialogBase (parent) 17 | { 18 | LegalNoticesTextCtrl->SetMinSize (wxSize ( 19 | Gui->GetCharWidth (LegalNoticesTextCtrl) * 88, 20 | Gui->GetCharHeight (LegalNoticesTextCtrl) * 28)); 21 | 22 | Layout(); 23 | Fit(); 24 | Center(); 25 | 26 | LegalNoticesTextCtrl->ChangeValue (StringConverter::ToWide (Resources::GetLegalNotices())); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Platform/Stream.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Platform_Stream 10 | #define TC_HEADER_Platform_Stream 11 | 12 | #include "PlatformBase.h" 13 | using namespace std; 14 | #include "Buffer.h" 15 | 16 | namespace CipherShed 17 | { 18 | class Stream 19 | { 20 | public: 21 | virtual ~Stream () { } 22 | virtual uint64 Read (const BufferPtr &buffer) = 0; 23 | virtual void ReadCompleteBuffer (const BufferPtr &buffer) = 0; 24 | virtual void Write (const ConstBufferPtr &data) = 0; 25 | 26 | protected: 27 | Stream () { }; 28 | 29 | private: 30 | Stream (const Stream &); 31 | Stream &operator= (const Stream &); 32 | }; 33 | } 34 | 35 | #endif // TC_HEADER_Platform_Stream 36 | -------------------------------------------------------------------------------- /src/Main/Forms/SelectDirectoryWizardPage.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #include "../System.h" 10 | #include "../GraphicUserInterface.h" 11 | #include "SelectDirectoryWizardPage.h" 12 | 13 | namespace CipherShed 14 | { 15 | bool SelectDirectoryWizardPage::IsValid () 16 | { 17 | if (!DirectoryTextCtrl->IsEmpty()) 18 | { 19 | return FilesystemPath ((wstring)(DirectoryTextCtrl->GetValue())).IsDirectory(); 20 | } 21 | 22 | return false; 23 | } 24 | 25 | void SelectDirectoryWizardPage::OnBrowseButtonClick (wxCommandEvent& event) 26 | { 27 | DirectoryPath dir = Gui->SelectDirectory (this); 28 | 29 | if (!dir.IsEmpty()) 30 | DirectoryTextCtrl->SetValue (wstring (dir)); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Platform/Unix/Poller.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Platform_Unix_Poller 10 | #define TC_HEADER_Platform_Unix_Poller 11 | 12 | #include "../PlatformBase.h" 13 | using namespace std; 14 | 15 | namespace CipherShed 16 | { 17 | class Poller 18 | { 19 | public: 20 | Poller (int fileDescriptor1, int fileDescriptor2 = -1, int fileDescriptor3 = -1, int fileDescriptor4 = -1); 21 | virtual ~Poller () { } 22 | 23 | list WaitForData (int timeOut = -1) const; 24 | 25 | protected: 26 | vector FileDescriptors; 27 | 28 | private: 29 | Poller (const Poller &); 30 | Poller &operator= (const Poller &); 31 | }; 32 | } 33 | 34 | #endif // TC_HEADER_Platform_Unix_Poller 35 | -------------------------------------------------------------------------------- /src/Platform/TextReader.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #include "TextReader.h" 10 | 11 | namespace CipherShed 12 | { 13 | TextReader::TextReader (const FilePath &path) 14 | { 15 | InputFile.reset (new File); 16 | InputFile->Open (path); 17 | InputStream = shared_ptr (new FileStream (InputFile)); 18 | } 19 | 20 | bool TextReader::ReadLine (string &outputString) 21 | { 22 | outputString.erase(); 23 | 24 | char c; 25 | while (InputStream->Read (BufferPtr ((byte *) &c, sizeof (c))) == sizeof (c)) 26 | { 27 | if (c == '\r') 28 | continue; 29 | 30 | if (c == '\n') 31 | return true; 32 | 33 | outputString += c; 34 | } 35 | return !outputString.empty(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/FPO_DATA.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_FPO_DATA_h_ 2 | #define _faux_windows_FPO_DATA_h_ 3 | 4 | #include "DWORD.h" 5 | #include "WORD.h" 6 | 7 | typedef struct _FPO_DATA { 8 | DWORD ulOffStart; // offset 1st byte of function code 9 | DWORD cbProcSize; // # bytes in function 10 | DWORD cdwLocals; // # bytes in locals/4 11 | WORD cdwParams; // # bytes in params/4 12 | WORD cbProlog : 8; // # bytes in prolog 13 | WORD cbRegs : 3; // # regs saved 14 | WORD fHasSEH : 1; // TRUE if SEH in func 15 | WORD fUseBP : 1; // TRUE if EBP has been allocated 16 | WORD reserved : 1; // reserved for future use 17 | WORD cbFrame : 2; // frame type 18 | } FPO_DATA, *PFPO_DATA; 19 | #define SIZEOF_RFPO_DATA 16 20 | 21 | #endif -------------------------------------------------------------------------------- /src/Core/CoreException.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #include "CoreException.h" 10 | #include "../Platform/SerializerFactory.h" 11 | using namespace std; 12 | 13 | namespace CipherShed 14 | { 15 | void ElevationFailed::Deserialize (shared_ptr stream) 16 | { 17 | ExecutedProcessFailed::Deserialize (stream); 18 | } 19 | 20 | void ElevationFailed::Serialize (shared_ptr stream) const 21 | { 22 | ExecutedProcessFailed::Serialize (stream); 23 | } 24 | 25 | #define TC_EXCEPTION(TYPE) TC_SERIALIZER_FACTORY_ADD(TYPE) 26 | #undef TC_EXCEPTION_NODECL 27 | #define TC_EXCEPTION_NODECL(TYPE) TC_SERIALIZER_FACTORY_ADD(TYPE) 28 | 29 | TC_SERIALIZER_FACTORY_ADD_EXCEPTION_SET (CoreException); 30 | } 31 | -------------------------------------------------------------------------------- /src/Mount/Mount.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | true 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Format/Format.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | true 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Mount/MainCom.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2007-2010 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_MAIN_COM 10 | #define TC_HEADER_MAIN_COM 11 | 12 | #include 13 | 14 | #ifdef __cplusplus 15 | 16 | #include "MainCom_h.h" 17 | ICipherShedMainCom *GetElevatedInstance (HWND parent); 18 | 19 | extern "C" { 20 | #endif 21 | 22 | BOOL ComServerMain (); 23 | void UacAnalyzeKernelMiniDump (HWND hwndDlg); 24 | int UacBackupVolumeHeader (HWND hwndDlg, BOOL bRequireConfirmation, char *lpszVolume); 25 | int UacRestoreVolumeHeader (HWND hwndDlg, char *lpszVolume); 26 | int UacChangePwd (char *lpszVolume, Password *oldPassword, Password *newPassword, int pkcs5, HWND hwndDlg); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif // TC_HEADER_MAIN_COM 33 | -------------------------------------------------------------------------------- /src/Driver/DumpFilter.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_DRIVER_DUMP_FILTER 10 | #define TC_HEADER_DRIVER_DUMP_FILTER 11 | 12 | #include "../Common/Tcdefs.h" 13 | #ifndef CS_UNITTESTING 14 | #include 15 | #endif 16 | 17 | NTSTATUS DumpFilterEntry (PFILTER_EXTENSION filterExtension, PFILTER_INITIALIZATION_DATA filterInitData); 18 | static NTSTATUS DumpFilterStart (PFILTER_EXTENSION filterExtension); 19 | static NTSTATUS DumpFilterWrite (PFILTER_EXTENSION filterExtension, PLARGE_INTEGER diskWriteOffset, PMDL writeMdl); 20 | static NTSTATUS DumpFilterFinish (PFILTER_EXTENSION filterExtension); 21 | static NTSTATUS DumpFilterUnload (PFILTER_EXTENSION filterExtension); 22 | 23 | #endif // TC_HEADER_DRIVER_DUMP_FILTER 24 | -------------------------------------------------------------------------------- /src/Main/Resources.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Main_Resources 10 | #define TC_HEADER_Main_Resources 11 | 12 | #include "System.h" 13 | #include "../Platform/Platform.h" 14 | 15 | namespace CipherShed 16 | { 17 | class Resources 18 | { 19 | public: 20 | static string GetLanguageXml (); 21 | static string GetLegalNotices (); 22 | #ifndef TC_NO_GUI 23 | static wxBitmap GetDriveIconBitmap (); 24 | static wxBitmap GetDriveIconMaskBitmap (); 25 | static wxBitmap GetLogoBitmap (); 26 | static wxBitmap GetTextualLogoBitmap (); 27 | static wxIcon GetCipherShedIcon (); 28 | static wxBitmap GetVolumeCreationWizardBitmap (int height = -1); 29 | #endif 30 | }; 31 | } 32 | 33 | #endif // TC_HEADER_Main_Resources 34 | -------------------------------------------------------------------------------- /src/Setup/Setup.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | true 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/lang.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_unittests_faux_windows_lang_h_ 2 | #define CS_unittests_faux_windows_lang_h_ 3 | 4 | #define MAKELANGID(p, s) ((((WORD )(s)) << 10) | (WORD )(p)) 5 | #define PRIMARYLANGID(lgid) ((WORD )(lgid) & 0x3ff) 6 | #define SUBLANGID(lgid) ((WORD )(lgid) >> 10) 7 | 8 | #define LANG_NEUTRAL 0x00 9 | #define LANG_INVARIANT 0x7f 10 | 11 | #define SUBLANG_NEUTRAL 0x00 // language neutral 12 | #define SUBLANG_DEFAULT 0x01 // user default 13 | #define SUBLANG_SYS_DEFAULT 0x02 // system default 14 | #define SUBLANG_CUSTOM_DEFAULT 0x03 // default custom language/locale 15 | #define SUBLANG_CUSTOM_UNSPECIFIED 0x04 // custom language/locale 16 | #define SUBLANG_UI_CUSTOM_DEFAULT 0x05 // Default custom MUI language/locale 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/Platform/Unix/Pipe.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Platform_Unix_Pipe 10 | #define TC_HEADER_Platform_Unix_Pipe 11 | 12 | #include "../PlatformBase.h" 13 | using namespace std; 14 | 15 | namespace CipherShed 16 | { 17 | class Pipe 18 | { 19 | public: 20 | Pipe (); 21 | virtual ~Pipe (); 22 | 23 | void Close (); 24 | int GetReadFD (); 25 | int GetWriteFD (); 26 | int PeekReadFD () const { return ReadFileDescriptor; } 27 | int PeekWriteFD () const { return WriteFileDescriptor; } 28 | 29 | protected: 30 | int ReadFileDescriptor; 31 | int WriteFileDescriptor; 32 | 33 | private: 34 | Pipe (const Pipe &); 35 | Pipe &operator= (const Pipe &); 36 | }; 37 | } 38 | 39 | #endif // TC_HEADER_Platform_Unix_Pipe 40 | -------------------------------------------------------------------------------- /src/Common/util/csstringutil.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_Common_util_csstringutil_h_ 2 | #define _CS_Common_util_csstringutil_h_ 3 | 4 | #include "../Tcdefs.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | void UpperCaseCopy (char *lpszDest, const char *lpszSource); 11 | void ToUNICODE (char *lpszText); 12 | void LowerCaseCopy (char *lpszDest, const char *lpszSource); 13 | void LeftPadString (char *szTmp, int len, int targetLen, char filler); 14 | void ToSBCS (LPWSTR lpszText); 15 | 16 | #ifdef __cplusplus 17 | } 18 | 19 | 20 | #include 21 | 22 | std::string WideToSingleString (const std::wstring &wideString); 23 | std::wstring SingleStringToWide (const std::string &singleString); 24 | std::wstring Utf8StringToWide (const std::string &utf8String); 25 | std::string WideToUtf8String (const std::wstring &wideString); 26 | std::string ToUpperCase (const std::string &str); 27 | std::string StringToUpperCase (const std::string &str); 28 | 29 | #endif 30 | 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/Platform/TextReader.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Platform_TextReader 10 | #define TC_HEADER_Platform_TextReader 11 | 12 | #include "PlatformBase.h" 13 | using namespace std; 14 | #include "FileStream.h" 15 | #include "FilesystemPath.h" 16 | #include "SharedPtr.h" 17 | #include "Stream.h" 18 | 19 | namespace CipherShed 20 | { 21 | class TextReader 22 | { 23 | public: 24 | TextReader (const FilePath &path); 25 | TextReader (shared_ptr stream) : InputStream (stream) { } 26 | virtual ~TextReader () { } 27 | 28 | virtual bool ReadLine (string &outputString); 29 | 30 | protected: 31 | shared_ptr InputFile; 32 | shared_ptr InputStream; 33 | }; 34 | } 35 | 36 | #endif // TC_HEADER_Platform_TextReader 37 | -------------------------------------------------------------------------------- /src/Common/Xml.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2005-2010 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | char *XmlNextNode (char *xmlNode); 14 | char *XmlFindElement (char *xmlNode, char *nodeName); 15 | char *XmlGetAttributeText (char *xmlNode, char *xmlAttrName, char *xmlAttrValue, int xmlAttrValueSize); 16 | char *XmlGetNodeText (char *xmlNode, char *xmlText, int xmlTextSize); 17 | int XmlWriteHeader (FILE *file); 18 | int XmlWriteHeaderW (FILE *file); 19 | int XmlWriteFooter (FILE *file); 20 | int XmlWriteFooterW (FILE *file); 21 | char *XmlFindElementByAttributeValue (char *xml, char *nodeName, char *attrName, char *attrValue); 22 | char *XmlQuoteText (const char *textSrc, char *textDst, int textDstMaxSize); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/CreateFile.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_CreateFile_h_ 2 | #define _faux_windows_CreateFile_h_ 3 | 4 | #include "DWORD.h" 5 | #include "HANDLE.h" 6 | #include "CHAR.h" 7 | #include "WCHAR.h" 8 | #include "SECURITY_ATTRIBUTES.h" 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | HANDLE CreateFile(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile); 15 | 16 | HANDLE CreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile); 17 | 18 | HANDLE CreateFileW(LPCWSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | 24 | 25 | #endif -------------------------------------------------------------------------------- /src/Platform/Platform.make: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | # 4 | # Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | # the file License.txt included in TrueCrypt binary and source code distribution 6 | # packages. 7 | # 8 | 9 | OBJS := Buffer.o 10 | OBJS += Exception.o 11 | OBJS += Event.o 12 | OBJS += FileCommon.o 13 | OBJS += MemoryStream.o 14 | OBJS += Memory.o 15 | OBJS += PlatformTest.o 16 | OBJS += Serializable.o 17 | OBJS += Serializer.o 18 | OBJS += SerializerFactory.o 19 | OBJS += StringConverter.o 20 | OBJS += TextReader.o 21 | OBJS += Unix/Directory.o 22 | OBJS += Unix/File.o 23 | OBJS += Unix/FilesystemPath.o 24 | OBJS += Unix/Mutex.o 25 | OBJS += Unix/Pipe.o 26 | OBJS += Unix/Poller.o 27 | OBJS += Unix/Process.o 28 | OBJS += Unix/SyncEvent.o 29 | OBJS += Unix/SystemException.o 30 | OBJS += Unix/SystemInfo.o 31 | OBJS += Unix/SystemLog.o 32 | OBJS += Unix/Thread.o 33 | OBJS += Unix/Time.o 34 | 35 | include $(BUILD_INC)/Makefile.inc 36 | -------------------------------------------------------------------------------- /src/Common/Progress.h: -------------------------------------------------------------------------------- 1 | /* 2 | Legal Notice: Some portions of the source code contained in this file were 3 | derived from the source code of Encryption for the Masses 2.02a, which is 4 | Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License 5 | Agreement for Encryption for the Masses'. Modifications and additions to 6 | the original source code (contained in this file) and all other portions 7 | of this file are Copyright (c) 2003-2010 TrueCrypt Developers Association 8 | and are governed by the TrueCrypt License 3.0 the full text of which is 9 | contained in the file License.txt included in TrueCrypt binary and source 10 | code distribution packages. */ 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | void InitProgressBar (__int64 totalBytes, __int64 bytesDone, BOOL bReverse, BOOL bIOThroughput, BOOL bDisplayStatus, BOOL bShowPercent); 17 | BOOL UpdateProgressBar (__int64 byteOffset); 18 | BOOL UpdateProgressBarProc (__int64 byteOffset); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | -------------------------------------------------------------------------------- /src/Common/Language.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef CS_UNITTESTING 10 | #include 11 | #endif 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | #define UNKNOWN_STRING_ID L"[?]" 18 | 19 | extern BOOL LocalizationActive; 20 | extern int LocalizationSerialNo; 21 | extern wchar_t UnknownString[1024]; 22 | 23 | typedef struct 24 | { 25 | wchar_t *FaceName; 26 | int Size; 27 | } Font; 28 | 29 | BOOL CALLBACK LanguageDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); 30 | wchar_t *GetString (const char *stringId); 31 | Font *GetFont (char *fontType); 32 | BOOL LoadLanguageFile (); 33 | char *GetPreferredLangId (); 34 | void SetPreferredLangId (char *langId); 35 | char *GetActiveLangPackVersion (); 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/CHAR.h: -------------------------------------------------------------------------------- 1 | #ifndef _faux_windows_char_h_ 2 | #define _faux_windows_char_h_ 3 | 4 | #include "CONST.h" 5 | 6 | #include "__nullterminated.h" 7 | 8 | #ifndef __nullnullterminated 9 | #define __nullnullterminated 10 | #endif 11 | 12 | #ifndef __possibly_notnullterminated 13 | #define __possibly_notnullterminated 14 | #endif 15 | 16 | typedef char CHAR; 17 | 18 | typedef CHAR *PCHAR, *LPCH, *PCH; 19 | typedef CONST CHAR *LPCCH, *PCCH; 20 | 21 | typedef __nullterminated CHAR *NPSTR, *LPSTR, *PSTR; 22 | typedef __nullterminated PSTR *PZPSTR; 23 | typedef __nullterminated CONST PSTR *PCZPSTR; 24 | typedef __nullterminated CONST CHAR *LPCSTR, *PCSTR; 25 | typedef __nullterminated PCSTR *PZPCSTR; 26 | 27 | typedef __nullnullterminated CHAR *PZZSTR; 28 | typedef __nullnullterminated CONST CHAR *PCZZSTR; 29 | 30 | typedef __possibly_notnullterminated CHAR *PNZCH; 31 | typedef __possibly_notnullterminated CONST CHAR *PCNZCH; 32 | 33 | typedef unsigned char UCHAR; 34 | typedef UCHAR *PUCHAR; 35 | 36 | 37 | #endif -------------------------------------------------------------------------------- /src/Core/HostDevice.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Core_HostDevice 10 | #define TC_HEADER_Core_HostDevice 11 | 12 | #include "../Platform/Platform.h" 13 | #include "../Platform/Serializable.h" 14 | 15 | namespace CipherShed 16 | { 17 | struct HostDevice; 18 | typedef list < shared_ptr > HostDeviceList; 19 | 20 | struct HostDevice : public Serializable 21 | { 22 | HostDevice () 23 | : Removable (false), 24 | Size (0) 25 | { 26 | } 27 | 28 | virtual ~HostDevice () 29 | { 30 | } 31 | 32 | TC_SERIALIZABLE (HostDevice); 33 | 34 | DirectoryPath MountPoint; 35 | wstring Name; 36 | DevicePath Path; 37 | bool Removable; 38 | uint64 Size; 39 | uint32 SystemNumber; 40 | 41 | HostDeviceList Partitions; 42 | }; 43 | } 44 | 45 | #endif // TC_HEADER_Core_HostDevice 46 | -------------------------------------------------------------------------------- /src/Main/Forms/BenchmarkDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Main_Forms_BenchmarkDialog 10 | #define TC_HEADER_Main_Forms_BenchmarkDialog 11 | 12 | #include "Forms.h" 13 | #include "../Main.h" 14 | 15 | namespace CipherShed 16 | { 17 | class BenchmarkDialog : public BenchmarkDialogBase 18 | { 19 | public: 20 | BenchmarkDialog (wxWindow *parent); 21 | 22 | protected: 23 | enum 24 | { 25 | ColumnAlgorithm = 0, 26 | ColumnEncryption, 27 | ColumnDecryption, 28 | ColumnMean 29 | }; 30 | 31 | struct BenchmarkResult 32 | { 33 | wstring AlgorithmName; 34 | uint64 EncryptionSpeed; 35 | uint64 DecryptionSpeed; 36 | uint64 MeanSpeed; 37 | }; 38 | 39 | void OnBenchmarkButtonClick (wxCommandEvent& event); 40 | }; 41 | } 42 | 43 | #endif // TC_HEADER_Main_Forms_BenchmarkDialog 44 | -------------------------------------------------------------------------------- /src/Main/Forms/KeyfilesDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Main_Forms_KeyfilesDialog 10 | #define TC_HEADER_Main_Forms_KeyfilesDialog 11 | 12 | #include "Forms.h" 13 | #include "../Main.h" 14 | #include "KeyfilesPanel.h" 15 | 16 | namespace CipherShed 17 | { 18 | class KeyfilesDialog : public KeyfilesDialogBase 19 | { 20 | public: 21 | KeyfilesDialog (wxWindow* parent, shared_ptr keyfiles); 22 | shared_ptr GetKeyfiles () const { return mKeyfilesPanel->GetKeyfiles(); } 23 | 24 | protected: 25 | void OnCreateKeyfileButttonClick (wxCommandEvent& event); 26 | void OnKeyfilesHyperlinkClick (wxHyperlinkEvent& event); 27 | 28 | shared_ptr Keyfiles; 29 | KeyfilesPanel *mKeyfilesPanel; 30 | }; 31 | } 32 | 33 | #endif // TC_HEADER_Main_Forms_KeyfilesDialog 34 | -------------------------------------------------------------------------------- /src/Platform/PlatformTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Platform_PlatformTest 10 | #define TC_HEADER_Platform_PlatformTest 11 | 12 | #include "PlatformBase.h" 13 | using namespace std; 14 | #include "Thread.h" 15 | 16 | namespace CipherShed 17 | { 18 | class PlatformTest 19 | { 20 | public: 21 | static bool TestAll (); 22 | 23 | protected: 24 | class RttiTestBase 25 | { 26 | public: 27 | virtual ~RttiTestBase () { }; 28 | }; 29 | 30 | class RttiTest : public RttiTestBase { 31 | public: 32 | virtual ~RttiTest () { }; 33 | }; 34 | 35 | PlatformTest (); 36 | static void SerializerTest (); 37 | static void ThreadTest (); 38 | static TC_THREAD_PROC ThreadTestProc (void *param); 39 | 40 | static bool TestFlag; 41 | }; 42 | } 43 | 44 | #endif // TC_HEADER_Platform_PlatformTest 45 | -------------------------------------------------------------------------------- /src/Volume/VolumeException.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #include "VolumeException.h" 10 | #include "../Platform/SerializerFactory.h" 11 | using namespace std; 12 | 13 | namespace CipherShed 14 | { 15 | // Do not inline the constructors to ensure this module is not optimized away 16 | VolumeException::VolumeException () 17 | { 18 | } 19 | 20 | VolumeException::VolumeException (const string &message) : Exception (message) 21 | { 22 | } 23 | 24 | VolumeException::VolumeException (const string &message, const wstring &subject) : Exception (message, subject) 25 | { 26 | } 27 | 28 | #define TC_EXCEPTION(TYPE) TC_SERIALIZER_FACTORY_ADD(TYPE) 29 | #undef TC_EXCEPTION_NODECL 30 | #define TC_EXCEPTION_NODECL(TYPE) TC_SERIALIZER_FACTORY_ADD(TYPE) 31 | 32 | TC_SERIALIZER_FACTORY_ADD_EXCEPTION_SET (VolumeException); 33 | } 34 | -------------------------------------------------------------------------------- /doc/devdocs/compile/linux-manjaro-xfce-0.8.11-x86_64.txt: -------------------------------------------------------------------------------- 1 | see: https://lists.ciphershed.org/pipermail/devs/2015-January/000996.html 2 | 3 | Installed from manjaro-xfce-0.8.11-x86_64.iso, update firewall to allow 22, install ssh, add it to systemd, apply requested updates, reboot. 4 | 5 | ssh in and run the following: 6 | 7 | sudo mhwd-kernel -i linux312 8 | sudo pacman -S git 9 | sudo pacman -S nasm 10 | sudo pacman -S wxgtk2.8 11 | git clone https://github.com/CipherShed/CipherShed 12 | cd CipherShed/src 13 | WX_CONFIG=/usr/bin/wx-config-2.8 make 14 | 15 | Then I ran ciphershed in the CipherShed/src/Main directory 16 | 17 | I was able to create a vol, mount it write to it, dismount it, re-mount it and open the file. 18 | 19 | pyeron@manjaro ~/CipherShed 20 | $ git log -n 1 21 | commit a7035118324bba9e9e5898a192ae92e96b0908d6 22 | Merge: 63c31f1 b956223 23 | Author: Jason Pyeron 24 | Date: Sat Jan 17 15:43:13 2015 -0500 25 | 26 | Merge commit 'b95622396eba354be58600cf817adbdacdeceaf1' into v0.7.3.0-dev from https://github.com/srguglielmo/CipherShed 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/Main/Forms/InfoWizardPage.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Main_Forms_InfoWizardPage 10 | #define TC_HEADER_Main_Forms_InfoWizardPage 11 | 12 | #include "Forms.h" 13 | 14 | namespace CipherShed 15 | { 16 | class InfoWizardPage : public InfoWizardPageBase 17 | { 18 | public: 19 | InfoWizardPage (wxPanel *parent, const wxString &actionButtonText = wxEmptyString, shared_ptr actionFunctor = shared_ptr ()); 20 | 21 | bool IsValid () { return true; } 22 | void SetMaxStaticTextWidth (int width); 23 | void SetPageText (const wxString &text) { InfoStaticText->SetLabel (text); } 24 | 25 | protected: 26 | virtual void OnActionButtonClick (wxCommandEvent& event) { (*ActionFunctor)(); } 27 | 28 | shared_ptr ActionFunctor; 29 | }; 30 | } 31 | 32 | #endif // TC_HEADER_Main_Forms_InfoWizardPage 33 | -------------------------------------------------------------------------------- /src/Main/LanguageStrings.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Main_LanguageStrings 10 | #define TC_HEADER_Main_LanguageStrings 11 | 12 | #include "System.h" 13 | #include "Main.h" 14 | 15 | namespace CipherShed 16 | { 17 | class LanguageStrings 18 | { 19 | public: 20 | LanguageStrings (); 21 | virtual ~LanguageStrings (); 22 | 23 | wxString operator[] (const string &key) const; 24 | 25 | bool Exists (const string &key) const { return Map.find (key) != Map.end(); } 26 | wstring Get (const string &key) const; 27 | void Init (); 28 | 29 | protected: 30 | map Map; 31 | 32 | private: 33 | LanguageStrings (const LanguageStrings &); 34 | LanguageStrings &operator= (const LanguageStrings &); 35 | }; 36 | 37 | extern LanguageStrings LangString; 38 | } 39 | 40 | #endif // TC_HEADER_Main_LanguageStrings 41 | -------------------------------------------------------------------------------- /src/Main/Forms/RandomPoolEnrichmentDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008-2009 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Main_Forms_RandomPoolEnrichmentDialog 10 | #define TC_HEADER_Main_Forms_RandomPoolEnrichmentDialog 11 | 12 | #include "Forms.h" 13 | #include "../Main.h" 14 | 15 | namespace CipherShed 16 | { 17 | class RandomPoolEnrichmentDialog : public RandomPoolEnrichmentDialogBase 18 | { 19 | public: 20 | RandomPoolEnrichmentDialog (wxWindow* parent); 21 | ~RandomPoolEnrichmentDialog (); 22 | 23 | protected: 24 | void OnHashSelected (wxCommandEvent& event); 25 | void OnMouseMotion (wxMouseEvent& event); 26 | void OnShowRandomPoolCheckBoxClicked (wxCommandEvent& event); 27 | void ShowBytes (wxStaticText *textCtrl, const ConstBufferPtr &buffer); 28 | 29 | HashList Hashes; 30 | }; 31 | } 32 | 33 | #endif // TC_HEADER_Main_Forms_RandomPoolEnrichmentDialog 34 | -------------------------------------------------------------------------------- /src/Main/Forms/InfoWizardPage.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #include "../System.h" 10 | #include "InfoWizardPage.h" 11 | 12 | namespace CipherShed 13 | { 14 | InfoWizardPage::InfoWizardPage (wxPanel *parent, const wxString &actionButtonText, shared_ptr actionFunctor) 15 | : InfoWizardPageBase (parent) 16 | { 17 | if (!actionButtonText.empty()) 18 | { 19 | wxButton *actionButton = new wxButton (this, wxID_ANY, actionButtonText); 20 | ActionFunctor = actionFunctor; 21 | actionButton->Connect (wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (InfoWizardPage::OnActionButtonClick), nullptr, this); 22 | 23 | InfoPageSizer->Add (actionButton, 0, wxALL, 5); 24 | } 25 | 26 | InfoStaticText->SetFocus(); 27 | } 28 | 29 | void InfoWizardPage::SetMaxStaticTextWidth (int width) 30 | { 31 | InfoStaticText->Wrap (width); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Volume/VolumePasswordCache.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Volume_VolumePasswordCache 10 | #define TC_HEADER_Volume_VolumePasswordCache 11 | 12 | #include "../Platform/Platform.h" 13 | #include "VolumePassword.h" 14 | 15 | namespace CipherShed 16 | { 17 | typedef list < shared_ptr < VolumePassword > > CachedPasswordList; 18 | 19 | class VolumePasswordCache 20 | { 21 | public: 22 | static CachedPasswordList GetPasswords (); 23 | static bool IsEmpty () { return CachedPasswords.empty(); } 24 | static void Store (const VolumePassword &newPassword); 25 | static void Clear () { CachedPasswords.clear(); } 26 | static const size_t Capacity = 4; 27 | 28 | protected: 29 | static CachedPasswordList CachedPasswords; 30 | 31 | private: 32 | VolumePasswordCache (); 33 | }; 34 | } 35 | 36 | #endif // TC_HEADER_Volume_VolumePasswordCache 37 | -------------------------------------------------------------------------------- /src/Common/Cache.h: -------------------------------------------------------------------------------- 1 | /* 2 | Legal Notice: Some portions of the source code contained in this file were 3 | derived from the source code of Encryption for the Masses 2.02a, which is 4 | Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License 5 | Agreement for Encryption for the Masses'. Modifications and additions to 6 | the original source code (contained in this file) and all other portions 7 | of this file are Copyright (c) 2003-2008 TrueCrypt Developers Association 8 | and are governed by the TrueCrypt License 3.0 the full text of which is 9 | contained in the file License.txt included in TrueCrypt binary and source 10 | code distribution packages. */ 11 | 12 | #include "Common.h" 13 | 14 | #ifndef CACHE_SIZE 15 | /* WARNING: Changing this value might not be safe (some items may be hard coded for 4)! Inspection necessary. */ 16 | #define CACHE_SIZE 4 17 | #endif 18 | 19 | extern int cacheEmpty; 20 | 21 | void AddPasswordToCache (Password *password); 22 | int ReadVolumeHeaderWCache (BOOL bBoot, BOOL bCache, char *header, Password *password, PCRYPTO_INFO *retInfo); 23 | void WipeCache (void); 24 | -------------------------------------------------------------------------------- /src/Platform/MemoryStream.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Platform_MemoryStream 10 | #define TC_HEADER_Platform_MemoryStream 11 | 12 | #include "PlatformBase.h" 13 | using namespace std; 14 | #include "Stream.h" 15 | 16 | namespace CipherShed 17 | { 18 | class MemoryStream : public Stream 19 | { 20 | public: 21 | MemoryStream () : ReadPosition (0) { } 22 | MemoryStream (const ConstBufferPtr &data); 23 | virtual ~MemoryStream () { } 24 | 25 | operator ConstBufferPtr () const { return ConstBufferPtr (&Data[0], Data.size()); } 26 | 27 | virtual uint64 Read (const BufferPtr &buffer); 28 | virtual void ReadCompleteBuffer (const BufferPtr &buffer); 29 | virtual void Write (const ConstBufferPtr &data); 30 | 31 | protected: 32 | vector Data; 33 | size_t ReadPosition; 34 | }; 35 | } 36 | 37 | #endif // TC_HEADER_Platform_MemoryStream 38 | -------------------------------------------------------------------------------- /src/Platform/SyncEvent.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Platform_SyncEvent 10 | #define TC_HEADER_Platform_SyncEvent 11 | 12 | #ifdef TC_WINDOWS 13 | # include "System.h" 14 | #else 15 | # include 16 | #endif 17 | #include "PlatformBase.h" 18 | using namespace std; 19 | #include "Mutex.h" 20 | 21 | namespace CipherShed 22 | { 23 | class SyncEvent 24 | { 25 | public: 26 | SyncEvent (); 27 | ~SyncEvent (); 28 | 29 | void Signal (); 30 | void Wait (); 31 | 32 | protected: 33 | bool Initialized; 34 | #ifdef TC_WINDOWS 35 | HANDLE SystemSyncEvent; 36 | #else 37 | volatile bool Signaled; 38 | pthread_cond_t SystemSyncEvent; 39 | Mutex EventMutex; 40 | #endif 41 | 42 | private: 43 | SyncEvent (const SyncEvent &); 44 | SyncEvent &operator= (const SyncEvent &); 45 | }; 46 | } 47 | 48 | #endif // TC_HEADER_Platform_SyncEvent 49 | -------------------------------------------------------------------------------- /src/Main/Forms/KeyfileGeneratorDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Main_Forms_KeyfileGeneratorDialog 10 | #define TC_HEADER_Main_Forms_KeyfileGeneratorDialog 11 | 12 | #include "Forms.h" 13 | #include "../Main.h" 14 | 15 | namespace CipherShed 16 | { 17 | class KeyfileGeneratorDialog : public KeyfileGeneratorDialogBase 18 | { 19 | public: 20 | KeyfileGeneratorDialog (wxWindow* parent); 21 | ~KeyfileGeneratorDialog (); 22 | 23 | protected: 24 | void OnGenerateButtonClick (wxCommandEvent& event); 25 | void OnHashSelected (wxCommandEvent& event); 26 | void OnMouseMotion (wxMouseEvent& event); 27 | void OnShowRandomPoolCheckBoxClicked (wxCommandEvent& event); 28 | void ShowBytes (wxStaticText *textCtrl, const ConstBufferPtr &buffer, bool appendDots = true); 29 | 30 | HashList Hashes; 31 | }; 32 | } 33 | 34 | #endif // TC_HEADER_Main_Forms_KeyfileGeneratorDialog 35 | -------------------------------------------------------------------------------- /src/Build/Resources/MacOSX/Info.plist.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleInfoDictionaryVersion 6 | 6.0 7 | 8 | CFBundleIdentifier 9 | org.CipherShedProject.CipherShed 10 | 11 | CFBundleDevelopmentRegion 12 | English 13 | 14 | CFBundleExecutable 15 | CipherShed 16 | 17 | CFBundleIconFile 18 | CipherShed.icns 19 | 20 | CFBundleName 21 | CipherShed 22 | 23 | CFBundlePackageType 24 | APPL 25 | 26 | CFBundleSignature 27 | TRUE 28 | 29 | CFBundleVersion 30 | 0 31 | 32 | CFBundleShortVersionString 33 | _VERSION_ 34 | 35 | CFBundleLongVersionString 36 | CipherShed _VERSION_ 37 | 38 | LSRequiresCarbon 39 | 40 | 41 | CSResourcesFileMapped 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/Platform/Unix/Process.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Platform_Unix_Process 10 | #define TC_HEADER_Platform_Unix_Process 11 | 12 | #include "../PlatformBase.h" 13 | using namespace std; 14 | #include "../Buffer.h" 15 | #include "../Functor.h" 16 | 17 | namespace CipherShed 18 | { 19 | struct ProcessExecFunctor 20 | { 21 | virtual ~ProcessExecFunctor () { } 22 | virtual void operator() (int argc, char *argv[]) = 0; 23 | }; 24 | 25 | class Process 26 | { 27 | public: 28 | Process (); 29 | virtual ~Process (); 30 | 31 | static string Execute (const string &processName, const list &arguments, int timeOut = -1, ProcessExecFunctor *execFunctor = nullptr, const Buffer *inputData = nullptr); 32 | 33 | protected: 34 | 35 | private: 36 | Process (const Process &); 37 | Process &operator= (const Process &); 38 | }; 39 | } 40 | 41 | #endif // TC_HEADER_Platform_Unix_Process 42 | -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/TOKEN_INFORMATION_CLASS.h: -------------------------------------------------------------------------------- 1 | #ifndef _CS_unittesting_faux_windows_TOKEN_INFORMATION_CLASS_h_ 2 | #define _CS_unittesting_faux_windows_TOKEN_INFORMATION_CLASS_h_ 3 | 4 | 5 | typedef enum _TOKEN_INFORMATION_CLASS { 6 | TokenUser = 1, 7 | TokenGroups, 8 | TokenPrivileges, 9 | TokenOwner, 10 | TokenPrimaryGroup, 11 | TokenDefaultDacl, 12 | TokenSource, 13 | TokenType, 14 | TokenImpersonationLevel, 15 | TokenStatistics, 16 | TokenRestrictedSids, 17 | TokenSessionId, 18 | TokenGroupsAndPrivileges, 19 | TokenSessionReference, 20 | TokenSandBoxInert, 21 | TokenAuditPolicy, 22 | TokenOrigin, 23 | TokenElevationType, 24 | TokenLinkedToken, 25 | TokenElevation, 26 | TokenHasRestrictions, 27 | TokenAccessInformation, 28 | TokenVirtualizationAllowed, 29 | TokenVirtualizationEnabled, 30 | TokenIntegrityLevel, 31 | TokenUIAccess, 32 | TokenMandatoryPolicy, 33 | TokenLogonSid, 34 | MaxTokenInfoClass // MaxTokenInfoClass should always be the last enum 35 | } TOKEN_INFORMATION_CLASS, *PTOKEN_INFORMATION_CLASS; 36 | 37 | #endif -------------------------------------------------------------------------------- /src/unit-tests/faux/windows/IDC_x.h: -------------------------------------------------------------------------------- 1 | #ifndef CS_unittesting_faux_windows_IDC_x_h_ 2 | #define CS_unittesting_faux_windows_IDC_x_h_ 3 | 4 | #include "MAKEINTRESOURCE.h" 5 | 6 | #define IDC_ARROW MAKEINTRESOURCE(32512) 7 | #define IDC_IBEAM MAKEINTRESOURCE(32513) 8 | #define IDC_WAIT MAKEINTRESOURCE(32514) 9 | #define IDC_CROSS MAKEINTRESOURCE(32515) 10 | #define IDC_UPARROW MAKEINTRESOURCE(32516) 11 | #define IDC_SIZE MAKEINTRESOURCE(32640) /* OBSOLETE: use IDC_SIZEALL */ 12 | #define IDC_ICON MAKEINTRESOURCE(32641) /* OBSOLETE: use IDC_ARROW */ 13 | #define IDC_SIZENWSE MAKEINTRESOURCE(32642) 14 | #define IDC_SIZENESW MAKEINTRESOURCE(32643) 15 | #define IDC_SIZEWE MAKEINTRESOURCE(32644) 16 | #define IDC_SIZENS MAKEINTRESOURCE(32645) 17 | #define IDC_SIZEALL MAKEINTRESOURCE(32646) 18 | #define IDC_NO MAKEINTRESOURCE(32648) /*not in win3.1 */ 19 | #define IDC_HAND MAKEINTRESOURCE(32649) 20 | #define IDC_APPSTARTING MAKEINTRESOURCE(32650) /*not in win3.1 */ 21 | #define IDC_HELP MAKEINTRESOURCE(32651) 22 | 23 | #endif -------------------------------------------------------------------------------- /src/Volume/Crc32.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Encryption_Crc32 10 | #define TC_HEADER_Encryption_Crc32 11 | 12 | #include "../Platform/Platform.h" 13 | #include "../Common/Crc.h" 14 | 15 | namespace CipherShed 16 | { 17 | class Crc32 18 | { 19 | public: 20 | Crc32 () : CrcValue (0xffffFFFF) { }; 21 | virtual ~Crc32 () { }; 22 | 23 | uint32 Get () const { return CrcValue ^ 0xffffFFFF; } 24 | 25 | uint32 Process (byte data) 26 | { 27 | return CrcValue = crc_32_tab[(byte) (CrcValue ^ data)] ^ (CrcValue >> 8); 28 | } 29 | 30 | static uint32 ProcessBuffer (const ConstBufferPtr &buffer) 31 | { 32 | return ::GetCrc32 (const_cast (buffer.Get()), static_cast (buffer.Size())); 33 | } 34 | 35 | protected: 36 | uint32 CrcValue; 37 | 38 | private: 39 | Crc32 (const Crc32 &); 40 | Crc32 &operator= (const Crc32 &); 41 | }; 42 | } 43 | 44 | #endif // TC_HEADER_Encryption_Crc32 45 | -------------------------------------------------------------------------------- /src/Main/Forms/NewSecurityTokenKeyfileDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Main_Forms_NewSecurityTokenKeyfileDialog 10 | #define TC_HEADER_Main_Forms_NewSecurityTokenKeyfileDialog 11 | 12 | #include "Forms.h" 13 | #include "../../Common/SecurityToken.h" 14 | using namespace std; 15 | 16 | namespace CipherShed 17 | { 18 | class NewSecurityTokenKeyfileDialog : public NewSecurityTokenKeyfileDialogBase 19 | { 20 | public: 21 | NewSecurityTokenKeyfileDialog (wxWindow* parent, const wstring &keyfileName); 22 | 23 | wstring GetKeyfileName () const { return wstring (KeyfileNameTextCtrl->GetValue()); } 24 | CK_SLOT_ID GetSelectedSlotId () const { return reinterpret_cast (SecurityTokenChoice->GetClientData (SecurityTokenChoice->GetSelection())); } 25 | 26 | protected: 27 | void OnKeyfileNameChanged (wxCommandEvent& event); 28 | }; 29 | } 30 | 31 | #endif // TC_HEADER_Main_Forms_NewSecurityTokenKeyfileDialog 32 | -------------------------------------------------------------------------------- /src/Common/Tests.h: -------------------------------------------------------------------------------- 1 | /* 2 | Legal Notice: Some portions of the source code contained in this file were 3 | derived from the source code of Encryption for the Masses 2.02a, which is 4 | Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License 5 | Agreement for Encryption for the Masses'. Modifications and additions to 6 | the original source code (contained in this file) and all other portions 7 | of this file are Copyright (c) 2003-2008 TrueCrypt Developers Association 8 | and are governed by the TrueCrypt License 3.0 the full text of which is 9 | contained in the file License.txt included in TrueCrypt binary and source 10 | code distribution packages. */ 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | extern unsigned char ks_tmp[MAX_EXPANDED_KEY]; 17 | 18 | void CipherInit2(int cipher, void* key, void* ks, int key_len); 19 | BOOL test_hmac_sha512 (void); 20 | BOOL test_hmac_sha1 (void); 21 | BOOL test_hmac_ripemd160 (void); 22 | BOOL test_hmac_whirlpool (void); 23 | BOOL test_pkcs5 (void); 24 | BOOL TestSectorBufEncryption (); 25 | BOOL TestLegacySectorBufEncryption (); 26 | BOOL AutoTestAlgorithms (void); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | -------------------------------------------------------------------------------- /src/Main/Forms/DeviceSelectionDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Main_Forms_DeviceSelectionDialog 10 | #define TC_HEADER_Main_Forms_DeviceSelectionDialog 11 | 12 | #include "Forms.h" 13 | #include "../Main.h" 14 | 15 | namespace CipherShed 16 | { 17 | class DeviceSelectionDialog : public DeviceSelectionDialogBase 18 | { 19 | public: 20 | DeviceSelectionDialog (wxWindow* parent); 21 | 22 | HostDeviceList DeviceList; 23 | HostDevice SelectedDevice; 24 | 25 | protected: 26 | enum 27 | { 28 | ColumnDevice = 0, 29 | #ifdef TC_WINDOWS 30 | ColumnDrive, 31 | #endif 32 | ColumnSize, 33 | #ifdef TC_WINDOWS 34 | ColumnName 35 | #else 36 | ColumnMountPoint 37 | #endif 38 | }; 39 | 40 | void OnListItemActivated (wxListEvent& event); 41 | void OnListItemDeselected (wxListEvent& event); 42 | void OnListItemSelected (wxListEvent& event); 43 | }; 44 | } 45 | 46 | #endif // TC_HEADER_Main_Forms_DeviceSelectionDialog 47 | -------------------------------------------------------------------------------- /src/Common/Combo.h: -------------------------------------------------------------------------------- 1 | /* 2 | Legal Notice: Some portions of the source code contained in this file were 3 | derived from the source code of Encryption for the Masses 2.02a, which is 4 | Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License 5 | Agreement for Encryption for the Masses'. Modifications and additions to 6 | the original source code (contained in this file) and all other portions 7 | of this file are Copyright (c) 2003-2008 TrueCrypt Developers Association 8 | and are governed by the TrueCrypt License 3.0 the full text of which is 9 | contained in the file License.txt included in TrueCrypt binary and source 10 | code distribution packages. */ 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | void AddComboItem (HWND hComboBox, char *lpszFileName, BOOL saveHistory); 17 | LPARAM MoveEditToCombo (HWND hComboBox, BOOL saveHistory); 18 | int GetOrderComboIdx ( HWND hComboBox , int *nIdxList , int nElems ); 19 | LPARAM UpdateComboOrder ( HWND hComboBox ); 20 | void LoadCombo ( HWND hComboBox ); 21 | void DumpCombo ( HWND hComboBox , int bClear ); 22 | void ClearCombo (HWND hComboBox); 23 | int IsComboEmpty (HWND hComboBox); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | -------------------------------------------------------------------------------- /src/Setup/SelfExtract.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008-2009 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #include "Setup.h" 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | typedef struct 16 | { 17 | // WARNING: file name is NOT null-terminated (use fileNameLength). 18 | unsigned char *fileName; 19 | int fileNameLength; 20 | uint32 crc; 21 | __int32 fileLength; 22 | unsigned char *fileContent; 23 | } DECOMPRESSED_FILE; 24 | 25 | extern DECOMPRESSED_FILE Decompressed_Files [NBR_COMPRESSED_FILES]; 26 | 27 | void SelfExtractStartupInit (void); 28 | BOOL SelfExtractInMemory (char *path); 29 | void __cdecl ExtractAllFilesThread (void *hwndDlg); 30 | BOOL MakeSelfExtractingPackage (HWND hwndDlg, char *szDestDir, BOOL queit); 31 | BOOL VerifyPackageIntegrity (void); 32 | BOOL IsSelfExtractingPackage (void); 33 | static void DeobfuscateMagEndMarker (void); 34 | 35 | extern char DestExtractPath [TC_MAX_PATH]; 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | -------------------------------------------------------------------------------- /src/Boot/Windows/BootMain.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Boot_BootMain 10 | #define TC_HEADER_Boot_BootMain 11 | 12 | #include "../../Common/Tcdefs.h" 13 | #include "Platform.h" 14 | 15 | static byte AskPassword (Password &password); 16 | static int AskSelection (const char *options[], size_t optionCount); 17 | static bool AskYesNo (const char *message); 18 | static byte BootEncryptedDrive (); 19 | static void BootMenu (); 20 | static void ExecuteBootSector (byte drive, byte *sectorBuffer); 21 | static void InitScreen (); 22 | static bool IsMenuKey (byte scanCode); 23 | static bool MountVolume (byte drive, byte &exitKey); 24 | static bool OpenVolume (byte drive, Password &password, CRYPTO_INFO **cryptoInfo, uint32 *headerSaltCrc32 = nullptr, bool skipNormal = false, bool skipHidden = false); 25 | static void PrintMainMenu (); 26 | static void RepairMenu (); 27 | 28 | #define TC_MENU_KEY_REPAIR TC_BIOS_KEY_F8 29 | 30 | #endif // TC_HEADER_Boot_BootMain 31 | -------------------------------------------------------------------------------- /src/Common/Inflate.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define WSIZE 0x8000 // Window size 5 | #define ZCONST const 6 | #define OF(p) p 7 | 8 | typedef unsigned long ulg; 9 | typedef unsigned char uch; 10 | typedef unsigned short ush; 11 | typedef void zvoid; 12 | 13 | struct huft 14 | { 15 | uch b, e; 16 | union 17 | { 18 | ush n; 19 | struct huft *t; 20 | }v; 21 | }; 22 | 23 | typedef struct huft huft; 24 | 25 | typedef struct 26 | { 27 | uch *inptr, *outbufptr; 28 | int incnt; 29 | int outCounter; 30 | 31 | struct huft *fixed_tl; 32 | struct huft *fixed_td; 33 | int fixed_bl, fixed_bd; 34 | 35 | unsigned bk, wp; 36 | ulg bb; 37 | } G_struct; 38 | 39 | #define __GPRO void 40 | #define __GPRO__ 41 | #define __G 42 | #define __G__ 43 | #define __GDEF 44 | 45 | 46 | #define FLUSH(cnt) { memcpy (G.outbufptr, redirSlide, cnt); G.outbufptr += cnt; G.outCounter += cnt; } 47 | #define NEXTBYTE (((G.incnt--) >= 0) ? (*G.inptr++) : EOF) 48 | 49 | 50 | int huft_free(struct huft *t); 51 | int huft_build(__GDEF ZCONST unsigned *b, unsigned n, unsigned s, ZCONST ush *d, ZCONST ush *e, struct huft **t, int *m); 52 | 53 | int DecompressDeflatedData (char *out, char *in, int inLength); 54 | -------------------------------------------------------------------------------- /src/Setup/Wizard.h: -------------------------------------------------------------------------------- 1 | /* 2 | Legal Notice: Some portions of the source code contained in this file were 3 | derived from the source code of Encryption for the Masses 2.02a, which is 4 | Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License 5 | Agreement for Encryption for the Masses'. Modifications and additions to 6 | the original source code (contained in this file) and all other portions 7 | of this file are Copyright (c) 2003-2008 TrueCrypt Developers Association 8 | and are governed by the TrueCrypt License 3.0 the full text of which is 9 | contained in the file License.txt included in TrueCrypt binary and source 10 | code distribution packages. */ 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | void InitProgressBar (void); 17 | BOOL UpdateProgressBarProc (int nPercent); 18 | void RefreshUIGFX (void); 19 | void localcleanupwiz (void); 20 | 21 | BOOL CALLBACK PageDialogProc ( HWND hwndDlg , UINT uMsg , WPARAM wParam , LPARAM lParam ); 22 | BOOL CALLBACK MainDialogProc ( HWND hwndDlg , UINT uMsg , WPARAM wParam , LPARAM lParam ); 23 | 24 | extern BOOL bPromptTutorial; 25 | extern BOOL bPromptReleaseNotes; 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | -------------------------------------------------------------------------------- /src/Common/Wipe.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008-2009 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Common_Wipe 10 | #define TC_HEADER_Common_Wipe 11 | 12 | #include "Tcdefs.h" 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | typedef enum 19 | { 20 | /* WARNING: As these values are written to config files, if they or their meanings 21 | are changed, incompatiblity with other versions may arise (upgrade, downgrade, etc.). 22 | When adding a new constant, verify that the value is unique within this block. */ 23 | TC_WIPE_NONE = 0, 24 | TC_WIPE_1_RAND = 100, 25 | TC_WIPE_3_DOD_5220 = 300, 26 | TC_WIPE_7_DOD_5220 = 700, 27 | TC_WIPE_35_GUTMANN = 3500 28 | 29 | } WipeAlgorithmId; 30 | 31 | #define TC_WIPE_RAND_CHAR_COUNT 3 32 | 33 | int GetWipePassCount (WipeAlgorithmId algorithm); 34 | BOOL WipeBuffer (WipeAlgorithmId algorithm, byte randChars[TC_WIPE_RAND_CHAR_COUNT], int pass, byte *buffer, size_t size); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif // TC_HEADER_Common_Wipe 41 | -------------------------------------------------------------------------------- /bin/unittest-coverage-parse.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | my $pathprefix="src/unit-tests"; 4 | 5 | my %data; 6 | 7 | my $state=0; 8 | my $curfile=''; 9 | while (<>) 10 | { 11 | if (m/^File '(.*)'/) 12 | { 13 | my $path=$1; 14 | $state=1; 15 | if ($path =~ m|^/|) 16 | { 17 | #abs file, must be a lib include 18 | } 19 | else 20 | { 21 | 22 | # fix the paths to project based... 23 | $path =~ s|^../../|| or $path =~ s|^../|src/| or $path =~ s|^|src/unit-tests/|; 24 | 25 | $path =~ m|^(?:.*/)?([^/]+)$|; 26 | my $file=$1; 27 | 28 | if ($path=~m|^src/| and not $path=~m|^src/unit-tests/|) 29 | { 30 | $state=2; 31 | $curfile=$file; 32 | $data{$curfile}{'paths'}{$path}=$path; 33 | } 34 | } 35 | } 36 | elsif ($state==2 and m/Lines executed:([0-9]+\.[0-9]+)% of (-?[0-9]+)/) 37 | { 38 | my $pct=$1; 39 | my $linecount=$2; 40 | 41 | $state=3; 42 | my $lines=int($pct * $linecount / 100 + 0.5); 43 | 44 | $data{$curfile}{'linecount'}=$linecount; 45 | $data{$curfile}{'lines'}=$lines; 46 | } 47 | } 48 | 49 | for my $key (sort keys %data) 50 | { 51 | print "$key: $data{$key}{'lines'} of $data{$key}{'linecount'}\n"; 52 | } 53 | 54 | -------------------------------------------------------------------------------- /src/Platform/Event.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #include "Event.h" 10 | 11 | namespace CipherShed 12 | { 13 | void Event::Connect (const EventConnectorBase &connector) 14 | { 15 | ScopeLock lock (HandlersMutex); 16 | ConnectedHandlers.push_back (shared_ptr (connector.CloneNew())); 17 | } 18 | 19 | void Event::Disconnect (void *handler) 20 | { 21 | ScopeLock lock (HandlersMutex); 22 | 23 | EventHandlerList newConnectedHandlers; 24 | foreach (shared_ptr h, ConnectedHandlers) 25 | { 26 | if (h->GetHandler() != handler) 27 | newConnectedHandlers.push_back (h); 28 | } 29 | 30 | ConnectedHandlers = newConnectedHandlers; 31 | } 32 | 33 | void Event::Raise () 34 | { 35 | EventArgs args; 36 | Raise (args); 37 | } 38 | 39 | void Event::Raise (EventArgs &args) 40 | { 41 | ScopeLock lock (HandlersMutex); 42 | foreach_ref (EventConnectorBase &handler, ConnectedHandlers) 43 | { 44 | handler (args); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Format/FormatCom.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2007-2008 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_FORMAT_COM 10 | #define TC_HEADER_FORMAT_COM 11 | 12 | #include 13 | 14 | #ifdef __cplusplus 15 | 16 | #include "FormatCom_h.h" 17 | ICipherShedFormatCom *GetElevatedInstance (HWND parent); 18 | 19 | extern "C" { 20 | #endif 21 | 22 | BOOL ComServerFormat (); 23 | int UacFormatNtfs (HWND hWnd, int driveNo, int clusterSize); 24 | int UacAnalyzeHiddenVolumeHost (HWND hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *realClusterSize, __int64 *nbrFreeClusters); 25 | int UacFormatVolume (char *cvolumePath , BOOL bDevice , unsigned __int64 size , unsigned __int64 hiddenVolHostSize , Password *password , int cipher , int pkcs5 , BOOL quickFormat, BOOL sparseFileSwitch, int fileSystem , int clusterSize, HWND hwndDlg , BOOL hiddenVol , int *realClusterSize); 26 | BOOL UacUpdateProgressBar (__int64 nSecNo, BOOL *bVolTransformThreadCancel); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif // TC_HEADER_FORMAT_COM 33 | -------------------------------------------------------------------------------- /src/Core/Unix/MacOSX/CoreMacOSX.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2008-2009 TrueCrypt Developers Association. All rights reserved. 3 | 4 | Governed by the TrueCrypt License 3.0 the full text of which is contained in 5 | the file License.txt included in TrueCrypt binary and source code distribution 6 | packages. 7 | */ 8 | 9 | #ifndef TC_HEADER_Core_CoreMacOSX 10 | #define TC_HEADER_Core_CoreMacOSX 11 | 12 | #include "System.h" 13 | #include "../FreeBSD/CoreFreeBSD.h" 14 | 15 | namespace CipherShed 16 | { 17 | class CoreMacOSX : public CoreFreeBSD 18 | { 19 | public: 20 | CoreMacOSX (); 21 | virtual ~CoreMacOSX (); 22 | 23 | virtual void CheckFilesystem (shared_ptr mountedVolume, bool repair = false) const; 24 | virtual shared_ptr DismountVolume (shared_ptr mountedVolume, bool ignoreOpenFiles = false, bool syncVolumeInfo = false); 25 | virtual string GetDefaultMountPointPrefix () const { return "/Volumes/ciphershed"; } 26 | 27 | protected: 28 | virtual void MountAuxVolumeImage (const DirectoryPath &auxMountPoint, const MountOptions &options) const; 29 | 30 | private: 31 | CoreMacOSX (const CoreMacOSX &); 32 | CoreMacOSX &operator= (const CoreMacOSX &); 33 | }; 34 | } 35 | 36 | #endif // TC_HEADER_Core_CoreMacOSX 37 | --------------------------------------------------------------------------------