VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2014-12-20 15:04:07 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2014-12-20 15:31:24 +0100
commit4b9f8b232b956149850fc1c8b47f826a09044efa (patch)
treec083d57ad145d28cfb58b98fedfce2ab68e82eed /src/Common
parent02cbecff6450f37498c558c1352550d647bffdfa (diff)
downloadVeraCrypt-4b9f8b232b956149850fc1c8b47f826a09044efa.tar.gz
VeraCrypt-4b9f8b232b956149850fc1c8b47f826a09044efa.zip
Reduce time for reporting wrong password by removing support for legacy hidden format because it was never functional and it was superseded by current hidden format.
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/Common.h1
-rw-r--r--src/Common/Dlgcode.c12
-rw-r--r--src/Common/Password.c8
3 files changed, 1 insertions, 20 deletions
diff --git a/src/Common/Common.h b/src/Common/Common.h
index d4375b5d..3e68f402 100644
--- a/src/Common/Common.h
+++ b/src/Common/Common.h
@@ -43,7 +43,6 @@ enum
{
TC_VOLUME_TYPE_NORMAL = 0,
TC_VOLUME_TYPE_HIDDEN,
- TC_VOLUME_TYPE_HIDDEN_LEGACY,
TC_VOLUME_TYPE_COUNT
};
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index 0105de4f..9020b402 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -9024,18 +9024,6 @@ int OpenVolume (OpenVolumeContext *context, const char *volumePath, Password *pa
headerOffset.QuadPart = useBackupHeader ? context->HostSize - TC_VOLUME_HEADER_SIZE : TC_HIDDEN_VOLUME_HEADER_OFFSET;
break;
- case TC_VOLUME_TYPE_HIDDEN_LEGACY:
- if (useBackupHeader)
- {
- status = ERR_PASSWORD_WRONG;
- goto error;
- }
-
- if (context->IsDevice && deviceGeometry.BytesPerSector != TC_SECTOR_SIZE_LEGACY)
- continue;
-
- headerOffset.QuadPart = context->HostSize - TC_HIDDEN_VOLUME_HEADER_OFFSET_LEGACY;
- break;
}
if (!SetFilePointerEx ((HANDLE) context->HostFileHandle, headerOffset, NULL, FILE_BEGIN))
diff --git a/src/Common/Password.c b/src/Common/Password.c
index 921ce02e..e5e9f9d8 100644
--- a/src/Common/Password.c
+++ b/src/Common/Password.c
@@ -258,12 +258,6 @@ int ChangePwd (const char *lpszVolume, Password *oldPassword, int old_pkcs5, Pas
headerOffset.QuadPart = TC_HIDDEN_VOLUME_HEADER_OFFSET;
break;
- case TC_VOLUME_TYPE_HIDDEN_LEGACY:
- if (bDevice && driveInfo.BytesPerSector != TC_SECTOR_SIZE_LEGACY)
- continue;
-
- headerOffset.QuadPart = hostSize - TC_HIDDEN_VOLUME_HEADER_OFFSET_LEGACY;
- break;
}
if (!SetFilePointerEx ((HANDLE) dev, headerOffset, NULL, FILE_BEGIN))
@@ -356,7 +350,7 @@ int ChangePwd (const char *lpszVolume, Password *oldPassword, int old_pkcs5, Pas
cryptoInfo->master_keydata,
&ci,
cryptoInfo->VolumeSize.Value,
- (volumeType == TC_VOLUME_TYPE_HIDDEN || volumeType == TC_VOLUME_TYPE_HIDDEN_LEGACY) ? cryptoInfo->hiddenVolumeSize : 0,
+ (volumeType == TC_VOLUME_TYPE_HIDDEN) ? cryptoInfo->hiddenVolumeSize : 0,
cryptoInfo->EncryptedAreaStart.Value,
cryptoInfo->EncryptedAreaLength.Value,
cryptoInfo->RequiredProgramVersion,