Skip to content

Commit

Permalink
TrueCrypt Source Version 3.0a
Browse files Browse the repository at this point in the history
  • Loading branch information
Truecrypt Foundation authored and FreeApophis committed May 29, 2014
1 parent 8327977 commit 1cb8f73
Show file tree
Hide file tree
Showing 83 changed files with 7,763 additions and 4,060 deletions.
4 changes: 0 additions & 4 deletions Clean.bat
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ cd ..\mount
del *.aps *.tmp
rd /s /q release debug

cd ..\service
del *.aps *.tmp
rd /s /q release debug

cd ..\setup
del *.aps *.tmp
rd /s /q release debug
Expand Down
30 changes: 21 additions & 9 deletions Common/APIDRVR.H
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* The source code contained in this file has been derived from the source code
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and
additions to that source code contained in this file are Copyright (c) 2004
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified
TrueCrypt Foundation and Copyright (c) 2004 TrueCrypt Team. Unmodified
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation
release. Please see the file license.txt for full license details. */

Expand Down Expand Up @@ -62,12 +62,11 @@ etc... */
#define ALLOW_FAST_SHUTDOWN 466984 /* Fast shutdown under win98 (only Win9x) */
#define CACHE_STATUS 466988 /* Get password cache status */
#define VOLUME_PROPERTIES 466992 /* Get mounted volume properties */

#define UNMOUNT_PENDING 475112 /* Flush the device with this api
before sending UNMOUNT */
#define RESOLVE_SYMLINK 466996 /* Resolve symbolic link to target */
#define UNMOUNT_ALL 475112 /* Unmount all volumes */

#define TC_FIRST_PRIVATE MOUNT /* First private control code */
#define TC_LAST_PRIVATE UNMOUNT_PENDING /* Last private control code */
#define TC_LAST_PRIVATE UNMOUNT_ALL /* Last private control code */

/* Start of driver interface structures, the size of these structures may
change between versions; so make sure you first send DRIVER_VERSION to
Expand All @@ -80,40 +79,53 @@ typedef struct
{
int nReturnCode; /* Return code back from driver */
short wszVolume[TC_MAX_PATH]; /* Volume to be mounted */
char szPassword[MAX_PASSWORD + 1]; /* User password or SHA1 hash */
char szPassword[MAX_PASSWORD + 1]; /* User password */
int nPasswordLen; /* User password length */
BOOL bCache; /* Cache passwords in driver */
int nDosDriveNo; /* Drive number to mount */
BOOL bMountReadOnly; /* Mount volume in read-only mode */
BOOL bMountRemovable; /* Mount volume as removable media */
BOOL bExclusiveAccess; /* Open host file/device in exclusive access mode */
BOOL bMountManager; /* Announce volume to mount manager */
long time; /* Time when this volume was mounted */
} MOUNT_STRUCT;

typedef struct
{
int nReturnCode; /* Return code back from driver */
int nDosDriveNo; /* Drive letter to unmount */
BOOL ignoreOpenFiles;
int nReturnCode; /* Return code back from driver */
} UNMOUNT_STRUCT;

typedef struct
{
unsigned long ulMountedDrives; /* Bitfield of all mounted drive letters */
short wszVolume[26][64]; /* Volume names of mounted volumes */
unsigned __int64 diskLength[26];
int cipher[26];
int ea[26];
BOOL hiddenVol[26];
} MOUNT_LIST_STRUCT;

typedef struct
{
int driveNo;
short wszVolume[64];
unsigned __int64 diskLength;
int cipher;
int ea;
int pkcs5;
int pkcs5Iterations;
BOOL hiddenVolume;
unsigned __int64 volumeCreationTime;
unsigned __int64 headerCreationTime;
//int readOnly;
} VOLUME_PROPERTIES_STRUCT;

typedef struct
{
WCHAR symLinkName[TC_MAX_PATH];
WCHAR targetName[TC_MAX_PATH];
} RESOLVE_SYMLINK_STRUCT;

typedef struct
{
short wszFileName[TC_MAX_PATH]; /* Volume to be "open tested" */
Expand Down
8 changes: 4 additions & 4 deletions Common/CACHE.C
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* The source code contained in this file has been derived from the source code
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and
additions to that source code contained in this file are Copyright (c) 2004
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified
TrueCrypt Foundation and Copyright (c) 2004 TrueCrypt Team. Unmodified
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation
release. Please see the file license.txt for full license details. */

Expand All @@ -27,7 +27,7 @@ int nPasswordIdx = 0;
int cacheEmpty = 1;

int
VolumeReadHeaderCache (BOOL bCache, char *dev, char *lpszPassword, int nPasswordLen,
VolumeReadHeaderCache (BOOL bCache, char *header, char *headerHiddenVol, char *lpszPassword, int nPasswordLen,
PCRYPTO_INFO * retInfo)
{
int nReturnCode = ERR_PASSWORD_WRONG;
Expand All @@ -36,7 +36,7 @@ VolumeReadHeaderCache (BOOL bCache, char *dev, char *lpszPassword, int nPassword
/* Attempt to recognize volume using mount password */
if (nPasswordLen > 0)
{
nReturnCode = VolumeReadHeader (dev, lpszPassword, retInfo);
nReturnCode = VolumeReadHeader (header, headerHiddenVol, lpszPassword, retInfo);

/* Save mount passwords back into cache if asked to do so */
if (bCache == TRUE && nReturnCode == 0)
Expand Down Expand Up @@ -73,7 +73,7 @@ VolumeReadHeaderCache (BOOL bCache, char *dev, char *lpszPassword, int nPassword
{
if (nDriverPasswordLen[i] > 0)
{
nReturnCode = VolumeReadHeader (dev, szDriverPassword[i], retInfo);
nReturnCode = VolumeReadHeader (header, headerHiddenVol, szDriverPassword[i], retInfo);

if (nReturnCode != ERR_PASSWORD_WRONG)
break;
Expand Down
4 changes: 2 additions & 2 deletions Common/CACHE.H
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* The source code contained in this file has been derived from the source code
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and
additions to that source code contained in this file are Copyright (c) 2004
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified
TrueCrypt Foundation and Copyright (c) 2004 TrueCrypt Team. Unmodified
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation
release. Please see the file license.txt for full license details. */

Expand All @@ -12,5 +12,5 @@ extern int cacheEmpty;

/* Everything below this line is automatically updated by the -mkproto-tool- */

int VolumeReadHeaderCache (BOOL bCache, char *dev, char *lpszPassword, int nPasswordLen, PCRYPTO_INFO * retInfo);
int VolumeReadHeaderCache (BOOL bCache, char *header, char *headerHiddenVol, char *lpszPassword, int nPasswordLen, PCRYPTO_INFO * retInfo);
void WipeCache (void);
6 changes: 3 additions & 3 deletions Common/CMDLINE.C
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* The source code contained in this file has been derived from the source code
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and
additions to that source code contained in this file are Copyright (c) 2004
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified
TrueCrypt Foundation and Copyright (c) 2004 TrueCrypt Team. Unmodified
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation
release. Please see the file license.txt for full license details. */

Expand Down Expand Up @@ -40,10 +40,10 @@ CommandHelpDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)

*tmp = 0;

strcpy (tmp, "Command line options:\n\n");
for (i = 0; i < as->arg_cnt; i ++)
{
sprintf(tmp2, "%s %s\n", as->args[i].long_name,
as->args[i].short_name);
sprintf(tmp2, "%s\t%s\n", as->args[i].short_name, as->args[i].long_name);
strcat(tmp,tmp2);
}

Expand Down
2 changes: 1 addition & 1 deletion Common/CMDLINE.H
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* The source code contained in this file has been derived from the source code
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and
additions to that source code contained in this file are Copyright (c) 2004
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified
TrueCrypt Foundation and Copyright (c) 2004 TrueCrypt Team. Unmodified
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation
release. Please see the file license.txt for full license details. */

Expand Down
2 changes: 1 addition & 1 deletion Common/COMBO.C
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* The source code contained in this file has been derived from the source code
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and
additions to that source code contained in this file are Copyright (c) 2004
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified
TrueCrypt Foundation and Copyright (c) 2004 TrueCrypt Team. Unmodified
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation
release. Please see the file license.txt for full license details. */

Expand Down
2 changes: 1 addition & 1 deletion Common/COMBO.H
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* The source code contained in this file has been derived from the source code
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and
additions to that source code contained in this file are Copyright (c) 2004
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified
TrueCrypt Foundation and Copyright (c) 2004 TrueCrypt Team. Unmodified
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation
release. Please see the file license.txt for full license details. */

Expand Down
4 changes: 2 additions & 2 deletions Common/CRC.C
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* The source code contained in this file has been derived from the source code
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and
additions to that source code contained in this file are Copyright (c) 2004
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified
TrueCrypt Foundation and Copyright (c) 2004 TrueCrypt Team. Unmodified
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation
release. Please see the file license.txt for full license details. */

Expand Down Expand Up @@ -65,7 +65,7 @@ unsigned long crc32long (unsigned long *data)
CRC = (CRC >> 8) ^ crc_32_tab[ (CRC ^ *d++) & 0xFF ];
CRC = (CRC >> 8) ^ crc_32_tab[ (CRC ^ *d++) & 0xFF ];
CRC = (CRC >> 8) ^ crc_32_tab[ (CRC ^ *d++) & 0xFF ];
return (CRC >> 8) ^ crc_32_tab[ (CRC ^ *d++) & 0xFF ] ^ 0xffffffff;
return (CRC >> 8) ^ crc_32_tab[ (CRC ^ *d) & 0xFF ] ^ 0xffffffff;
}

int crc32_selftest (void)
Expand Down
2 changes: 1 addition & 1 deletion Common/CRC.H
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* The source code contained in this file has been derived from the source code
of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and
additions to that source code contained in this file are Copyright (c) 2004
TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified
TrueCrypt Foundation and Copyright (c) 2004 TrueCrypt Team. Unmodified
parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation
release. Please see the file license.txt for full license details. */

Expand Down
Loading

0 comments on commit 1cb8f73

Please sign in to comment.