VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Setup/SelfExtract.c
blob: 55f14114a6f7c9c4dc2f9d3678e1a42d1fc2f079 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
/*
 Copyright (c) 2008-2009 TrueCrypt Developers Association. All rights reserved.

 Governed by the TrueCrypt License 3.0 the full text of which is contained in
 the file License.txt included in TrueCrypt binary and source code distribution
 packages.
*/

#include "Tcdefs.h"

#include "Inflate.h"
#include "SelfExtract.h"
#include "Wizard.h"
#include "Setup.h"
#include "Crc.h"
#include "Endian.h"
#include "Dlgcode.h"
#include "Dir.h"
#include "Language.h"
#include "Resource.h"
#include <Strsafe.h>

#define OutputPackageFile "VeraCrypt Setup " VERSION_STRING ".exe"

#define MAG_START_MARKER	"TCINSTRT"
#define MAG_END_MARKER_OBFUSCATED	"T/C/I/N/S/C/R/C"
#define PIPE_BUFFER_LEN	(4 * BYTES_PER_KB)

unsigned char MagEndMarker [sizeof (MAG_END_MARKER_OBFUSCATED)];
char DestExtractPath [TC_MAX_PATH];
DECOMPRESSED_FILE	Decompressed_Files [NBR_COMPRESSED_FILES];

volatile char *PipeWriteBuf = NULL;
volatile HANDLE hChildStdinWrite = INVALID_HANDLE_VALUE;
unsigned char *DecompressedData = NULL;



void SelfExtractStartupInit (void)
{
	DeobfuscateMagEndMarker ();
}


// The end marker must be included in the self-extracting exe only once, not twice (used e.g. 
// by IsSelfExtractingPackage()) and that's why MAG_END_MARKER_OBFUSCATED is obfuscated and  
// needs to be deobfuscated using this function at startup.
static void DeobfuscateMagEndMarker (void)
{
	int i;

	for (i = 0; i < sizeof (MAG_END_MARKER_OBFUSCATED); i += 2)
		MagEndMarker [i/2] = MAG_END_MARKER_OBFUSCATED [i];

	MagEndMarker [i/2] = 0;
}


static void PkgError (char *msg)
{
	MessageBox (NULL, msg, "VeraCrypt", MB_ICONERROR | MB_SETFOREGROUND | MB_TOPMOST);
}


static void PkgWarning (char *msg)
{
	MessageBox (NULL, msg, "VeraCrypt", MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST);
}


static void PkgInfo (char *msg)
{
	MessageBox (NULL, msg, "VeraCrypt", MB_ICONINFORMATION | MB_SETFOREGROUND | MB_TOPMOST);
}


// Returns 0 if decompression fails or, if successful, returns the size of the decompressed data
static int DecompressBuffer (char *out, char *in, int len)
{
	return (DecompressDeflatedData (out, in, len));		// Inflate
}


static void __cdecl PipeWriteThread (void *len) 
{
	int sendBufSize = PIPE_BUFFER_LEN, bytesSent = 0;
	int bytesToSend = *((int *) len), bytesSentTotal = 0;

	if (PipeWriteBuf == NULL || (HANDLE) hChildStdinWrite == INVALID_HANDLE_VALUE)
	{
		PkgError ("Failed sending data to the STDIN pipe"); 
		return;
	}

	while (bytesToSend > 0) 
	{ 
		if (bytesToSend < PIPE_BUFFER_LEN)
			sendBufSize = bytesToSend;

		if (!WriteFile ((HANDLE) hChildStdinWrite, (char *) PipeWriteBuf + bytesSentTotal, sendBufSize, &bytesSent, NULL) 
			|| bytesSent == 0
			|| bytesSent != sendBufSize) 
		{
			PkgError ("Failed sending data to the STDIN pipe"); 
			return;
		}

		bytesToSend -= bytesSent;
		bytesSentTotal += bytesSent;
	}

	// Closing the pipe causes the child process to stop reading from it

	if (!CloseHandle (hChildStdinWrite))
	{
		PkgError ("Cannot close pipe"); 
		return;
	}
}


// Returns 0 if compression fails or, if successful, the size of the compressed data 
static int CompressBuffer (char *out, char *in, int len)
{
	SECURITY_ATTRIBUTES securityAttrib; 
	DWORD bytesReceived = 0;
	HANDLE hChildStdoutWrite = INVALID_HANDLE_VALUE;
	HANDLE hChildStdoutRead = INVALID_HANDLE_VALUE;
	HANDLE hChildStdinRead = INVALID_HANDLE_VALUE;
	STARTUPINFO startupInfo;
	PROCESS_INFORMATION procInfo; 
	char pipeBuffer [PIPE_BUFFER_LEN]; 
	int res_len = 0;
	BOOL bGzipHeaderRead = FALSE;

	ZeroMemory (&startupInfo, sizeof (startupInfo));
	ZeroMemory (&procInfo, sizeof (procInfo));

	// Pipe handle inheritance
	securityAttrib.bInheritHandle = TRUE; 
	securityAttrib.nLength = sizeof (securityAttrib); 
	securityAttrib.lpSecurityDescriptor = NULL; 

	if (!CreatePipe (&hChildStdoutRead, &hChildStdoutWrite, &securityAttrib, 0))
	{
		PkgError ("Cannot create STDOUT pipe."); 
		return 0;
	}
	SetHandleInformation (hChildStdoutRead, HANDLE_FLAG_INHERIT, 0);

	if (!CreatePipe (&hChildStdinRead, &((HANDLE) hChildStdinWrite), &securityAttrib, 0))
	{
		PkgError ("Cannot create STDIN pipe.");
		CloseHandle(hChildStdoutWrite);
		CloseHandle(hChildStdoutRead);
		return 0;
	}
	SetHandleInformation (hChildStdinWrite, HANDLE_FLAG_INHERIT, 0);

	// Create a child process that will compress the data

	startupInfo.wShowWindow = SW_HIDE;
	startupInfo.hStdInput = hChildStdinRead;
	startupInfo.hStdOutput = hChildStdoutWrite;
	startupInfo.cb = sizeof (startupInfo); 
	startupInfo.hStdError = hChildStdoutWrite;
	startupInfo.dwFlags |= STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;

	if (!CreateProcess (NULL, "gzip --best", NULL, NULL, TRUE, 0, NULL, NULL, &startupInfo, &procInfo))
	{
		PkgError ("Error: Cannot run gzip.\n\nBefore you can create a self-extracting VeraCrypt package, you need to have the open-source 'gzip' compression tool placed in any directory in the search path for executable files (for example, in 'C:\\Windows\\').\n\nNote: gzip can be freely downloaded e.g. from www.gzip.org");
		CloseHandle(hChildStdoutWrite);
		CloseHandle(hChildStdoutRead);
		CloseHandle(hChildStdinRead);
		CloseHandle(hChildStdinWrite);
		return 0;
	}

	CloseHandle (procInfo.hProcess);
	CloseHandle (procInfo.hThread);

	// Start sending the uncompressed data to the pipe (STDIN)
	PipeWriteBuf = in;
	_beginthread (PipeWriteThread, PIPE_BUFFER_LEN * 2, (void *) &len);

	if (!CloseHandle (hChildStdoutWrite))
	{
		PkgError ("Cannot close STDOUT write"); 
		CloseHandle(hChildStdoutRead);
		CloseHandle(hChildStdinRead);
		return 0;
	}

	bGzipHeaderRead = FALSE;

	// Read the compressed data from the pipe (sent by the child process to STDOUT)
	while (TRUE) 
	{ 
		if (!ReadFile (hChildStdoutRead, pipeBuffer, bGzipHeaderRead ? PIPE_BUFFER_LEN : 10, &bytesReceived, NULL)) 
			break; 

		if (bGzipHeaderRead)
		{
			memcpy (out + res_len, pipeBuffer, bytesReceived);
			res_len += bytesReceived;
		}
		else
			bGzipHeaderRead = TRUE;	// Skip the 10-byte gzip header
	} 

	CloseHandle(hChildStdoutRead);
	CloseHandle(hChildStdinRead);
	return res_len - 8;	// A gzip stream ends with a CRC-32 hash and a 32-bit size (those 8 bytes need to be chopped off)
}


// Clears all bytes that change when an exe file is digitally signed, except the data that are appended. 
// If those bytes weren't cleared, CRC-32 checks would fail after signing.
static void WipeSignatureAreas (char *buffer)
{
	// Clear bytes 0x130-0x1ff
	memset (buffer + 0x130, 0, 0x200 - 0x130);
}


BOOL MakeSelfExtractingPackage (HWND hwndDlg, char *szDestDir)
{
	int i, x;
	unsigned char inputFile [TC_MAX_PATH];
	unsigned char outputFile [TC_MAX_PATH];
	unsigned char szTmpFilePath [TC_MAX_PATH];
	unsigned char szTmp32bit [4] = {0};
	unsigned char *szTmp32bitPtr = szTmp32bit;
	unsigned char *buffer = NULL, *compressedBuffer = NULL;
	unsigned char *bufIndex = NULL;
	char tmpStr [2048];
	int bufLen = 0, compressedDataLen = 0, uncompressedDataLen = 0;

	x = strlen (szDestDir);
	if (x < 2)
		goto err;

	if (szDestDir[x - 1] != '\\')
		StringCbCatA (szDestDir, MAX_PATH, "\\");

	GetModuleFileName (NULL, inputFile, sizeof (inputFile));

	StringCbCopyA (outputFile, sizeof(outputFile), szDestDir);
	StringCbCatA (outputFile, sizeof(outputFile), OutputPackageFile);

	// Clone 'VeraCrypt Setup.exe' to create the base of the new self-extracting archive

	if (!TCCopyFile (inputFile, outputFile))
	{
		handleWin32Error (hwndDlg);
		PkgError ("Cannot copy 'VeraCrypt Setup.exe' to the package");
		goto err;
	}

	// Determine the buffer size needed for all the files and meta data and check if all required files exist

	bufLen = 0;

	for (i = 0; i < sizeof (szCompressedFiles) / sizeof (szCompressedFiles[0]); i++)
	{
		StringCbPrintfA (szTmpFilePath, sizeof(szTmpFilePath), "%s%s", szDestDir, szCompressedFiles[i]);

		if (!FileExists (szTmpFilePath))
		{
			char tmpstr [1000];

			StringCbPrintfA (tmpstr, sizeof(tmpstr), "File not found:\n\n'%s'", szTmpFilePath);
			remove (outputFile);
			PkgError (tmpstr);
			goto err;
		}

		bufLen += (int) GetFileSize64 (szTmpFilePath);

		bufLen += 2;					// 16-bit filename length
		bufLen += strlen(szCompressedFiles[i]);	// Filename
		bufLen += 4;					// CRC-32
		bufLen += 4;					// 32-bit file length
	}

	buffer = malloc (bufLen + 524288);	// + 512K reserve 
	if (buffer == NULL)
	{
		PkgError ("Cannot allocate memory for uncompressed data");
		remove (outputFile);
		goto err;
	}


	// Write the start marker
	if (!SaveBufferToFile (MAG_START_MARKER, outputFile, strlen (MAG_START_MARKER), TRUE))
	{
		PkgError ("Cannot write the start marker");
		remove (outputFile);
		goto err;
	}


	bufIndex = buffer;

	// Copy all required files and their meta data to the buffer
	for (i = 0; i < sizeof (szCompressedFiles) / sizeof (szCompressedFiles[0]); i++)
	{
		DWORD tmpFileSize;
		unsigned char *tmpBuffer;

		StringCbPrintfA (szTmpFilePath, sizeof(szTmpFilePath), "%s%s", szDestDir, szCompressedFiles[i]);

		tmpBuffer = LoadFile (szTmpFilePath, &tmpFileSize);

		if (tmpBuffer == NULL)
		{
			char tmpstr [1000];

			free (tmpBuffer);
			StringCbPrintfA (tmpstr, sizeof(tmpstr), "Cannot load file \n'%s'", szTmpFilePath);
			remove (outputFile);
			PkgError (tmpstr);
			goto err;
		}

		// Copy the filename length to the main buffer
		mputWord (bufIndex, (WORD) strlen(szCompressedFiles[i]));

		// Copy the filename to the main buffer
		memcpy (bufIndex, szCompressedFiles[i], strlen(szCompressedFiles[i]));
		bufIndex += strlen(szCompressedFiles[i]);

		// Compute CRC-32 hash of the uncompressed file and copy it to the main buffer
		mputLong (bufIndex, GetCrc32 (tmpBuffer, tmpFileSize));

		// Copy the file length to the main buffer
		mputLong (bufIndex, (unsigned __int32) tmpFileSize);

		// Copy the file contents to the main buffer
		memcpy (bufIndex, tmpBuffer, tmpFileSize);
		bufIndex += tmpFileSize;

		free (tmpBuffer);
	}

	// Calculate the total size of the uncompressed data
	uncompressedDataLen = (int) (bufIndex - buffer);

	// Write total size of the uncompressed data
	szTmp32bitPtr = szTmp32bit;
	mputLong (szTmp32bitPtr, (unsigned __int32) uncompressedDataLen);
	if (!SaveBufferToFile (szTmp32bit, outputFile, sizeof (szTmp32bit), TRUE))
	{
		remove (outputFile);
		PkgError ("Cannot write the total size of the uncompressed data");
		goto err;
	}

	// Compress all the files and meta data in the buffer to create a solid archive

	compressedBuffer = malloc (uncompressedDataLen + 524288);	// + 512K reserve
	if (compressedBuffer == NULL)
	{
		remove (outputFile);
		PkgError ("Cannot allocate memory for compressed data");
		goto err;
	}

	compressedDataLen = CompressBuffer (compressedBuffer, buffer, uncompressedDataLen);
	if (compressedDataLen <= 0)
	{
		remove (outputFile);
		PkgError ("Failed to compress the data");
		goto err;
	}

	free (buffer);
	buffer = NULL;

	// Write the total size of the compressed data
	szTmp32bitPtr = szTmp32bit;
	mputLong (szTmp32bitPtr, (unsigned __int32) compressedDataLen);
	if (!SaveBufferToFile (szTmp32bit, outputFile, sizeof (szTmp32bit), TRUE))
	{
		remove (outputFile);
		PkgError ("Cannot write the total size of the compressed data");
		goto err;
	}

	// Write the compressed data
	if (!SaveBufferToFile (compressedBuffer, outputFile, compressedDataLen, TRUE))
	{
		remove (outputFile);
		PkgError ("Cannot write compressed data to the package");
		goto err;
	}

	// Write the end marker
	if (!SaveBufferToFile (MagEndMarker, outputFile, strlen (MagEndMarker), TRUE))
	{
		remove (outputFile);
		PkgError ("Cannot write the end marker");
		goto err;
	}

	free (compressedBuffer);
	compressedBuffer = NULL;

	// Compute and write CRC-32 hash of the entire package
	{
		DWORD tmpFileSize;
		char *tmpBuffer;

		tmpBuffer = LoadFile (outputFile, &tmpFileSize);

		if (tmpBuffer == NULL)
		{
			handleWin32Error (hwndDlg);
			remove (outputFile);
			PkgError ("Cannot load the package to compute CRC");
			goto err;
		}

		// Zero all bytes that change when the exe is digitally signed (except appended blocks).
		WipeSignatureAreas (tmpBuffer);

		szTmp32bitPtr = szTmp32bit;
		mputLong (szTmp32bitPtr, GetCrc32 (tmpBuffer, tmpFileSize));
		free (tmpBuffer);

		if (!SaveBufferToFile (szTmp32bit, outputFile, sizeof (szTmp32bit), TRUE))
		{
			remove (outputFile);
			PkgError ("Cannot write the total size of the compressed data");
			goto err;
		}
	}

	StringCbPrintfA (tmpStr, sizeof(tmpStr), "Self-extracting package successfully created (%s)", outputFile);
	PkgInfo (tmpStr);
	return TRUE;

err:
	if (buffer)
		free (buffer);
	if (compressedBuffer)
		free (compressedBuffer);

	return FALSE;
}


// Verifies the CRC-32 of the whole self-extracting package (except the digital signature areas, if present)
BOOL VerifyPackageIntegrity (void)
{
	int fileDataEndPos = 0;
	int fileDataStartPos = 0;
	unsigned __int32 crc = 0;
	unsigned char *tmpBuffer;
	int tmpFileSize;
	char path [TC_MAX_PATH];

	GetModuleFileName (NULL, path, sizeof (path));

	fileDataEndPos = (int) FindStringInFile (path, MagEndMarker, strlen (MagEndMarker));
	if (fileDataEndPos < 0)
	{
		Error ("DIST_PACKAGE_CORRUPTED");
		return FALSE;
	}
	fileDataEndPos--;

	fileDataStartPos = (int) FindStringInFile (path, MAG_START_MARKER, strlen (MAG_START_MARKER));
	if (fileDataStartPos < 0)
	{
		Error ("DIST_PACKAGE_CORRUPTED");
		return FALSE;
	}
	fileDataStartPos += strlen (MAG_START_MARKER);


	if (!LoadInt32 (path, &crc, fileDataEndPos + strlen (MagEndMarker) + 1))
	{
		Error ("CANT_VERIFY_PACKAGE_INTEGRITY");
		return FALSE;
	}

	// Compute the CRC-32 hash of the whole file (except the digital signature area, if present)
	tmpBuffer = LoadFile (path, &tmpFileSize);

	if (tmpBuffer == NULL)
	{
		Error ("CANT_VERIFY_PACKAGE_INTEGRITY");
		return FALSE;
	}

	// Zero all bytes that change when an exe is digitally signed (except appended blocks).
	WipeSignatureAreas (tmpBuffer);

	if (crc != GetCrc32 (tmpBuffer, fileDataEndPos + 1 + strlen (MagEndMarker)))
	{
		free (tmpBuffer);
		Error ("DIST_PACKAGE_CORRUPTED");
		return FALSE;
	}

	free (tmpBuffer);

	return TRUE;
}


// Determines whether we are a self-extracting package
BOOL IsSelfExtractingPackage (void)
{
	char path [TC_MAX_PATH];

	GetModuleFileName (NULL, path, sizeof (path));

	return (FindStringInFile (path, MagEndMarker, strlen (MagEndMarker)) != -1);
}


static void FreeAllFileBuffers (void)
{
	int fileNo;

	if (DecompressedData != NULL)
	{
		free (DecompressedData);
		DecompressedData = NULL;
	}

	for (fileNo = 0; fileNo < NBR_COMPRESSED_FILES; fileNo++)
	{
		Decompressed_Files[fileNo].fileName = NULL;
		Decompressed_Files[fileNo].fileContent = NULL;
		Decompressed_Files[fileNo].fileNameLength = 0;
		Decompressed_Files[fileNo].fileLength = 0;
		Decompressed_Files[fileNo].crc = 0;
	}
}


// Assumes that VerifyPackageIntegrity() has been used. Returns TRUE, if successful (otherwise FALSE).
// Creates a table of pointers to buffers containing the following objects for each file:
// filename size, filename (not null-terminated!), file size, file CRC-32, uncompressed file contents.
// For details, see the definition of the DECOMPRESSED_FILE structure.
BOOL SelfExtractInMemory (char *path)
{
	int filePos = 0, fileNo = 0;
	int fileDataEndPos = 0;
	int fileDataStartPos = 0;
	int uncompressedLen = 0;
	int compressedLen = 0;
	unsigned char *compressedData = NULL;
	unsigned char *bufPos = NULL, *bufEndPos = NULL;

	FreeAllFileBuffers();

	fileDataEndPos = (int) FindStringInFile (path, MagEndMarker, strlen (MagEndMarker));
	if (fileDataEndPos < 0)
	{
		Error ("CANNOT_READ_FROM_PACKAGE");
		return FALSE;
	}

	fileDataEndPos--;

	fileDataStartPos = (int) FindStringInFile (path, MAG_START_MARKER, strlen (MAG_START_MARKER));
	if (fileDataStartPos < 0)
	{
		Error ("CANNOT_READ_FROM_PACKAGE");
		return FALSE;
	}

	fileDataStartPos += strlen (MAG_START_MARKER);

	filePos = fileDataStartPos;

	// Read the stored total size of the uncompressed data
	if (!LoadInt32 (path, &uncompressedLen, filePos))
	{
		Error ("CANNOT_READ_FROM_PACKAGE");
		return FALSE;
	}

	filePos += 4;

	// Read the stored total size of the compressed data
	if (!LoadInt32 (path, &compressedLen, filePos))
	{
		Error ("CANNOT_READ_FROM_PACKAGE");
		return FALSE;
	}

	filePos += 4;

	if (compressedLen != fileDataEndPos - fileDataStartPos - 8 + 1)
	{
		Error ("DIST_PACKAGE_CORRUPTED");
	}

	DecompressedData = malloc (uncompressedLen + 524288);	// + 512K reserve 
	if (DecompressedData == NULL)
	{
		Error ("ERR_MEM_ALLOC");
		return FALSE;
	}

	bufPos = DecompressedData;
	bufEndPos = bufPos + uncompressedLen - 1;

	compressedData = LoadFileBlock (path, filePos, compressedLen);

	if (compressedData == NULL)
	{
		free (DecompressedData);
		DecompressedData = NULL;

		Error ("CANNOT_READ_FROM_PACKAGE");
		return FALSE;
	}

	// Decompress the data
	if (DecompressBuffer (DecompressedData, compressedData, compressedLen) != uncompressedLen)
	{
		Error ("DIST_PACKAGE_CORRUPTED");
		goto sem_end;
	}

	while (bufPos <= bufEndPos && fileNo < NBR_COMPRESSED_FILES)
	{
		// Filename length
		Decompressed_Files[fileNo].fileNameLength = mgetWord (bufPos);

		// Filename
		Decompressed_Files[fileNo].fileName = bufPos;
		bufPos += Decompressed_Files[fileNo].fileNameLength;

		// CRC-32 of the file
		Decompressed_Files[fileNo].crc = mgetLong (bufPos);

		// File length
		Decompressed_Files[fileNo].fileLength = mgetLong (bufPos);

		// File content
		Decompressed_Files[fileNo].fileContent = bufPos;
		bufPos += Decompressed_Files[fileNo].fileLength;

		// Verify CRC-32 of the file (to verify that it didn't get corrupted while creating the solid archive).
		if (Decompressed_Files[fileNo].crc 
			!= GetCrc32 (Decompressed_Files[fileNo].fileContent, Decompressed_Files[fileNo].fileLength))
		{
			Error ("DIST_PACKAGE_CORRUPTED");
			goto sem_end;
		}

		fileNo++;
	}

	if (fileNo < NBR_COMPRESSED_FILES)
	{
		Error ("DIST_PACKAGE_CORRUPTED");
		goto sem_end;
	}

	free (compressedData);
	return TRUE;

sem_end:
	FreeAllFileBuffers();
	free (compressedData);
	return FALSE;
}


void __cdecl ExtractAllFilesThread (void *hwndDlg)
{
	int fileNo;
	BOOL bSuccess = FALSE;
	char packageFile [TC_MAX_PATH];

	InvalidateRect (GetDlgItem (GetParent (hwndDlg), IDD_INSTL_DLG), NULL, TRUE);

	ClearLogWindow (hwndDlg);

	GetModuleFileName (NULL, packageFile, sizeof (packageFile));

	if (!(bSuccess = SelfExtractInMemory (packageFile)))
		goto eaf_end;

	if (mkfulldir (DestExtractPath, TRUE) != 0)
	{
		if (mkfulldir (DestExtractPath, FALSE) != 0)
		{
			wchar_t szTmp[TC_MAX_PATH];

			handleWin32Error (hwndDlg);
			StringCbPrintfW (szTmp, sizeof(szTmp), GetString ("CANT_CREATE_FOLDER"), DestExtractPath);
			MessageBoxW (hwndDlg, szTmp, lpszTitle, MB_ICONHAND);
			bSuccess = FALSE;
			goto eaf_end;
		}
	}

	for (fileNo = 0; fileNo < NBR_COMPRESSED_FILES; fileNo++)
	{
		char fileName [TC_MAX_PATH] = {0};
		char filePath [TC_MAX_PATH] = {0};

		// Filename
		StringCbCopyNA (fileName, sizeof(fileName), Decompressed_Files[fileNo].fileName, Decompressed_Files[fileNo].fileNameLength);
		StringCbCopyA (filePath, sizeof(filePath), DestExtractPath);
		StringCbCatA (filePath, sizeof(filePath), fileName);

		StatusMessageParam (hwndDlg, "EXTRACTING_VERB", filePath);

		// Write the file
		if (!SaveBufferToFile (
			Decompressed_Files[fileNo].fileContent,
			filePath,
			Decompressed_Files[fileNo].fileLength,
			FALSE))
		{
			wchar_t szTmp[512];

			StringCbPrintfW (szTmp, sizeof (szTmp), GetString ("CANNOT_WRITE_FILE_X"), filePath);
			MessageBoxW (hwndDlg, szTmp, lpszTitle, MB_ICONERROR | MB_SETFOREGROUND | MB_TOPMOST);
			bSuccess = FALSE;
			goto eaf_end;
		}
		UpdateProgressBarProc ((int) (100 * ((float) fileNo / NBR_COMPRESSED_FILES)));
	}

eaf_end:
	FreeAllFileBuffers();

	if (bSuccess)
		PostMessage (MainDlg, TC_APPMSG_EXTRACTION_SUCCESS, 0, 0);
	else
		PostMessage (MainDlg, TC_APPMSG_EXTRACTION_FAILURE, 0, 0);
}
EX_RIGHT
- CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,6,9,192,12
- RTEXT "Done",IDT_DONE,5,27,22,8
- RTEXT "Status",IDT_STATUS,73,27,33,8
- RTEXT "Left",IDT_LEFT,172,27,35,8
- LTEXT "",IDC_BOX_HELP,1,100,266,90
- GROUPBOX "",IDC_STATIC,0,3,268,41
- GROUPBOX "Options",IDT_FORMAT_OPTIONS,0,50,268,29
+ COMBOBOX IDC_WIPE_MODE,96,13,125,90,CBS_DROPDOWNLIST | WS_TABSTOP
+ PUSHBUTTON "&Pause",IDC_PAUSE,204,40,63,14
+ LTEXT "More information",IDC_MORE_INFO_SYS_ENCRYPTION,1,176,266,10,SS_NOTIFY
+ LTEXT "",IDC_BYTESWRITTEN,29,58,39,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE
+ RTEXT "",IDC_WRITESPEED,110,58,56,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE
+ RTEXT "",IDC_TIMEREMAIN,212,58,54,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE
+ RTEXT "Wipe mode:",IDT_WIPE_MODE,6,15,85,8,0,WS_EX_RIGHT
+ CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,6,41,192,12
+ RTEXT "Done",IDT_DONE,5,59,22,8
+ RTEXT "Status",IDT_STATUS,73,59,33,8
+ RTEXT "Left",IDT_LEFT,172,59,35,8
+ LTEXT "",IDC_BOX_HELP,1,77,266,95
+ GROUPBOX "Options",IDT_FORMAT_OPTIONS,0,3,267,29
+ GROUPBOX "",IDC_STATIC,0,32,267,41
END
IDD_SYSENC_KEYS_GEN_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
CONTROL "Display generated keys (their portions)",IDC_DISPLAY_KEYS,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,51,110,216,10
CONTROL "",IDC_HEADER_KEY,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,100,87,163,8,WS_EX_TRANSPARENT
LTEXT "",IDC_DISK_KEY,100,95,163,8,0,WS_EX_TRANSPARENT
@@ -379,43 +362,27 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "",IDT_SYSENC_DRIVE_ANALYSIS_INFO,0,10,267,109
CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,0,135,267,12
LTEXT "Progress:",IDT_PROGRESS,2,124,172,8
END
IDD_SYSENC_TYPE_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- LTEXT "", IDC_BOX_HELP, 5, 20, 250, 16
- LTEXT "", IDT_SYSENC_INFO_2, 5, 50, 250, 60
- PUSHBUTTON "Advanced features", IDC_ADVANCE_INTRO, 190, 160, 68, 14
- CONTROL "", IDC_INFORMATION_TIP, "Static", SS_ICON | SS_NOTIFY, 262,163,10,5
-END
-
-IDD_ADVANCE_MBR DIALOGEX 102, -10, 245, 233
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Advanced Options"
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- CONTROL " Normal",IDC_SYSENC_NORMAL,"Button", BS_AUTOCHECKBOX, 10,40,200,10
- CONTROL " Hi&dden",IDC_SYSENC_HIDDEN,"Button", BS_AUTOCHECKBOX, 10,99,200,10
- LTEXT "Select this option if you merely want to encrypt the system partition or the entire system drive.",-1,26,57,200,30
- LTEXT "If you select this option, you will create a hidden operating system whose existence should be impossible to prove (provided that certain guidelines are followed). Thus, you will not have to decrypt or reveal the password to the hidden operating system.",-1,26,116,200,50
- LTEXT "For a detailed explanation, please click the Help button. ",-1,26,180,200,10
- LTEXT "IMPORTANT: Only advanced users should make modifications on this page.", -1, 10, 12, 217, 19,
-
- GROUPBOX "", -1, 6, 30, 232, 178
- DEFPUSHBUTTON "OK", IDOK, 129, 213, 50, 14
- PUSHBUTTON "Cancel", IDCANCEL, 180, 213, 50, 14
- PUSHBUTTON "&Help",IDHELP,15,213,50,14
+ CONTROL "Normal",IDC_SYSENC_NORMAL,"Button",BS_AUTORADIOBUTTON,0,7,269,10
+ CONTROL "Hi&dden",IDC_SYSENC_HIDDEN,"Button",BS_AUTORADIOBUTTON,0,64,269,10
+ LTEXT "More information",IDC_HIDDEN_SYSENC_INFO_LINK,16,173,253,10,SS_NOTIFY
+ LTEXT "",IDC_BOX_HELP_SYSENC_NORMAL,16,20,253,41
+ LTEXT "",IDC_BOX_HELP,16,78,253,90
END
+
IDD_SYSENC_HIDDEN_OS_REQ_CHECK_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "More information",IDC_HIDDEN_SYSENC_INFO_LINK,0,172,273,10,SS_NOTIFY
LTEXT "",IDC_BOX_HELP,0,2,273,166
END
IDD_DEVICE_WIPE_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
@@ -479,44 +446,20 @@ STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
EDITTEXT IDC_PIM,74,0,42,14,ES_RIGHT | ES_PASSWORD | ES_AUTOHSCROLL | ES_NUMBER
LTEXT "",IDC_BOX_HELP,0,32,273,142
RTEXT "Volume PIM:",IDT_PIM,1,3,69,8
LTEXT "(Empty or 0 for default iterations)",IDC_PIM_HELP,120,3,153,8
LTEXT "Information on PIM",IDC_LINK_PIM_INFO,0,179,273,8,SS_NOTIFY
CONTROL "Display PIM",IDC_SHOW_PIM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,74,17,196,10
END
-IDD_ADVANCE DIALOGEX 75, -62, 245, 362
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Advanced Algorithm Options"
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- DEFPUSHBUTTON "OK", IDOK, 129, 345, 50, 14
- PUSHBUTTON "Cancel", IDCANCEL, 180, 345, 50, 14
- COMBOBOX IDC_COMBO_BOX_HASH_ALGO, 21, 47, 137, 130, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- LTEXT "", IDC_SHA512_HELP, 21, 65, 205, 40
- COMBOBOX IDC_COMBO_BOX, 21, 113, 137, 126, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- LTEXT "", IDC_BOX_HELP, 21, 131, 205, 40
- PUSHBUTTON "&Verify", IDC_CIPHER_TEST, 40, 181, 59, 14
- PUSHBUTTON "&Benchmark", IDC_BENCHMARK, 140, 181, 59, 14, BS_PUSHBUTTON | WS_TABSTOP | WS_VISIBLE
- GROUPBOX "Encryption Algorithm", IDT_ENCRYPTION_ALGO, 14, 100, 217, 60
- GROUPBOX "Hash Algorithm", IDT_HASH_ALGO, 14, 35, 217, 60
- GROUPBOX "Test Algorithms", IDT_TEST_ALGO, 14, 168, 217, 35
- GROUPBOX "PIM", -1, 14, 206, 217, 59
- CONTROL "Modify P&IM", IDC_PIM_ENABLE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 19, 217, 97, 10
- LTEXT "", IDT_PIM_INFO, 21, 231, 203, 25
- GROUPBOX "Wipe Mode", IDT_WIPE_MODE, 14, 270, 217, 71
- COMBOBOX IDC_WIPE_MODE, 21, 284, 127, 90, CBS_DROPDOWNLIST | WS_TABSTOP
- LTEXT "", IDT_WIPE_INFO, 21, 303, 200, 32
- LTEXT "", IDT_IMPORTANT_NOTE, 18, 10, 217, 19
-END
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
@@ -673,36 +616,20 @@ BEGIN
END
IDD_INPLACE_ENCRYPTION_PAGE_DLG, DIALOG
BEGIN
RIGHTMARGIN, 267
BOTTOMMARGIN, 187
HORZGUIDE, 80
HORZGUIDE, 96
END
- IDD_ADVANCE, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 238
- TOPMARGIN, 7
- BOTTOMMARGIN, 242
- END
-
- IDD_ADVANCE_MBR, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 238
- TOPMARGIN, 7
- BOTTOMMARGIN, 242
- END
-
IDD_SYSENC_KEYS_GEN_PAGE_DLG, DIALOG
BEGIN
RIGHTMARGIN, 267
BOTTOMMARGIN, 174
HORZGUIDE, 80
HORZGUIDE, 96
END
IDD_UNIVERSAL_DUAL_CHOICE_PAGE_DLG, DIALOG
BEGIN
@@ -807,10 +734,11 @@ END
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#include "..\\common\\common.rc"
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
+
diff --git a/src/Format/Resource.h b/src/Format/Resource.h
index d031a7dd..c37a6f4a 100644
--- a/src/Format/Resource.h
+++ b/src/Format/Resource.h
@@ -111,20 +111,21 @@
#define IDC_MORE_INFO 1072
#define IDC_MORE_INFO_ON_SYS_ENCRYPTION 1073
#define IDT_COLLECTING_RANDOM_DATA_NOTE 1074
#define IDC_MORE_INFO_ON_CONTAINERS 1075
#define IDC_SINGLE_BOOT 1076
#define IDC_MULTI_BOOT 1077
#define IDT_MULTI_BOOT 1078
#define IDT_SINGLE_BOOT 1079
#define IDC_SYS_POOL_CONTENTS 1080
#define IDT_PARTIAL_POOL_CONTENTS 1081
+#define IDC_DOWNLOAD_CD_BURN_SOFTWARE 1082
#define IDT_RESCUE_DISK_BURN_INFO 1083
#define IDT_WIPE_MODE_INFO 1084
#define IDC_WIPE_MODE 1085
#define IDC_SELECT 1086
#define IDT_SYSENC_KEYS_GEN_INFO 1087
#define IDC_DISPLAY_KEYS 1088
#define IDC_PAUSE 1089
#define IDT_WIPE_MODE 1090
#define IDC_MORE_INFO_SYS_ENCRYPTION 1091
#define IDC_BOX_HELP_NORMAL_VOL 1092
@@ -138,44 +139,20 @@
#define IDT_PASS 1100
#define IDC_DEVICE_TRANSFORM_MODE_FORMAT 1101
#define IDC_DEVICE_TRANSFORM_MODE_INPLACE 1102
#define IDC_DRIVE_LETTER_LIST 1103
#define IDT_DRIVE_LETTER 1104
#define IDC_LINK_PIM_INFO 1105
#define IDC_SHOW_PIM 1106
#define IDC_TB 1107
#define IDC_SKIP_RESCUE_VERIFICATION 1108
#define SPARSE_FILE 1109
-#define IDC_ADVANCE_INTRO 1110
-#define IDD_ADVANCE 1111
-#define IDC_ADVANCE 1112
-#define PASSWORD_METER 1113
-#define IDC_REMEMBER_PASSWORD 1114
-#define IDC_STORE_RESCUE_DISK 1115
-#define IDC_BACKUP_DATA 1116
-#define IDT_REMEMBER_PASSWORD 1117
-#define IDT_STORE_RESCUE_DISK 1118
-#define IDT_BACKUP_DATA 1119
-#define IDC_CHECKLIST_A 1120
-#define IDC_CHECKLIST_B 1121
-#define IDC_CHECKLIST_C 1122
-#define IDD_ADVANCE_MBR 1123
-#define IDC_INFORMATION_TIP 1124
-#define IDC_SHA512_HELP 1125
-#define IDT_PASSWORD_STRENGTH 1126
-#define IDT_RESCUE_DISK_INFO_2 1127
-#define IDT_SYSENC_INFO_2 1128
-#define IDT_IMPORTANT_NOTE 1129
-#define IDT_PIM_INFO 1130
-#define IDT_WIPE_INFO 1131
-#define IDT_TEST_ALGO 1132
-#define IDC_CHECKBOX_PRETEST 1133
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 134
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1110
#define _APS_NEXT_SYMED_VALUE 101
diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c
index db0a8209..efd95caf 100644
--- a/src/Format/Tcformat.c
+++ b/src/Format/Tcformat.c
@@ -6,32 +6,27 @@
Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux
and which is governed by the 'License Agreement for Encryption for the Masses'
Modifications and additions to the original source code (contained in this file)
and all other portions of this file are Copyright (c) 2013-2017 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages. */
#include "Tcdefs.h"
-#include <iostream>
-#include <fstream>
-#include <set>
-#include <iterator>
#include <stdlib.h>
#include <limits.h>
#include <time.h>
#include <errno.h>
#include <io.h>
#include <sys/stat.h>
#include <shlobj.h>
-#include <commctrl.h>
#include "Crypto.h"
#include "cpu.h"
#include "Apidrvr.h"
#include "Dlgcode.h"
#include "Language.h"
#include "Combo.h"
#include "Registry.h"
#include "Boot/Windows/BootDefs.h"
#include "Common/Common.h"
@@ -126,29 +121,20 @@ enum sys_encryption_cmd_line_switches
{
SYSENC_COMMAND_NONE = 0,
SYSENC_COMMAND_RESUME,
SYSENC_COMMAND_STARTUP_SEQ_RESUME,
SYSENC_COMMAND_ENCRYPT,
SYSENC_COMMAND_DECRYPT,
SYSENC_COMMAND_CREATE_HIDDEN_OS,
SYSENC_COMMAND_CREATE_HIDDEN_OS_ELEV
};
-enum password_status
-{
- very_weak = 0,
- weak,
- medium,
- strong,
- very_strong
-};
-
typedef struct
{
int NumberOfSysDrives; // Number of drives that contain an operating system. -1: unknown, 1: one, 2: two or more
int MultipleSystemsOnDrive; // Multiple systems are installed on the drive where the currently running system resides. -1: unknown, 0: no, 1: yes
int BootLoaderLocation; // Boot loader (boot manager) installed in: 1: MBR/1st cylinder, 0: partition/bootsector: -1: unknown
int BootLoaderBrand; // -1: unknown, 0: Microsoft Windows, 1: any non-Windows boot manager/loader
int SystemOnBootDrive; // If the currently running operating system is installed on the boot drive. -1: unknown, 0: no, 1: yes
} SYSENC_MULTIBOOT_CFG;
#define SYSENC_PAUSE_RETRY_INTERVAL 100
@@ -167,28 +153,21 @@ volatile int WizardMode = DEFAULT_VOL_CREATION_WIZARD_MODE; /* IMPORTANT: Never
volatile BOOL bHiddenOS = FALSE; /* If TRUE, we are performing or (or supposed to perform) actions relating to an operating system installed in a hidden volume (i.e., encrypting a decoy OS partition or creating the outer/hidden volume for the hidden OS). To determine or set the phase of the process, call ChangeHiddenOSCreationPhase() and DetermineHiddenOSCreationPhase()) */
BOOL bDirectSysEncMode = FALSE;
BOOL bDirectSysEncModeCommand = SYSENC_COMMAND_NONE;
BOOL DirectDeviceEncMode = FALSE;
BOOL DirectNonSysInplaceDecStartMode = FALSE;
BOOL DirectNonSysInplaceEncResumeMode = FALSE;
BOOL DirectNonSysInplaceDecResumeMode = FALSE;
BOOL DirectPromptNonSysInplaceEncResumeMode = FALSE;
BOOL DirectCreationMode = FALSE;
-int iIconX=0;
-int iIconY=0;
-HWND hDlgItemTooltip = NULL;
-HANDLE hIconTooltip = NULL;
-char tempPassword[MAX_PASSWORD + 1];
-int iPasswordStrength;
-
-volatile BOOL bInPlaceEncNonSys = TRUE; /* If TRUE, existing data on a non-system partition/volume are to be encrypted (or decrypted if bInPlaceDecNonSys is TRUE) in place (for system encryption, this flag is ignored) */
+volatile BOOL bInPlaceEncNonSys = FALSE; /* If TRUE, existing data on a non-system partition/volume are to be encrypted (or decrypted if bInPlaceDecNonSys is TRUE) in place (for system encryption, this flag is ignored) */
volatile BOOL bInPlaceDecNonSys = FALSE; /* If TRUE, existing data on a non-system partition/volume are to be decrypted in place (for system encryption, this flag is ignored) */
volatile BOOL bInPlaceEncNonSysResumed = FALSE; /* If TRUE, the wizard is supposed to resume (or has resumed) process of non-system in-place encryption/decryption. */
volatile BOOL bFirstNonSysInPlaceEncResumeDone = FALSE;
__int64 NonSysInplaceEncBytesDone = 0;
__int64 NonSysInplaceEncTotalSize = 0;
BOOL bDeviceTransformModeChoiceMade = FALSE; /* TRUE if the user has at least once manually selected the 'in-place' or 'format' option (on the 'device transform mode' page). */
int nNeedToStoreFilesOver4GB = 0; /* Whether the user wants to be able to store files larger than 4GB on the volume: -1 = Undecided or error, 0 = No, 1 = Yes */
int nVolumeEA = 1; /* Default encryption algorithm */
BOOL bSystemEncryptionInProgress = FALSE; /* TRUE when encrypting/decrypting the system partition/drive (FALSE when paused). */
BOOL bWholeSysDrive = FALSE; /* Whether to encrypt the entire system drive or just the system partition. */
@@ -250,21 +229,20 @@ BOOL bKeybLayoutAltKeyWarningShown = FALSE; /* TRUE if the user has been informe
#else
BOOL bWarnDeviceFormatAdvanced = FALSE;
#endif
BOOL bWarnOuterVolSuitableFileSys = TRUE;
Password volumePassword; /* User password */
Password outerVolumePassword; /* Outer volume user password */
char szVerify[MAX_PASSWORD + 1]; /* Tmp password buffer */
char szRawPassword[MAX_PASSWORD + 1]; /* Password before keyfile was applied to it */
-BOOL bNextButtonClicked = FALSE;
int volumePim = 0;
int outerVolumePim = 0;
BOOL bHistoryCmdLine = FALSE; /* History control is always disabled */
BOOL ComServerMode = FALSE;
Password CmdVolumePassword = {0}; /* Password passed from command line */
int CmdVolumeEA = 0;
@@ -316,25 +294,20 @@ volatile int clusterSize = 0;
SYSENC_MULTIBOOT_CFG SysEncMultiBootCfg;
wchar_t SysEncMultiBootCfgOutcome [4096] = {L'N',L'/',L'A',0};
volatile int NonSysInplaceEncStatus = NONSYS_INPLACE_ENC_STATUS_NONE;
LONGLONG nAvailableFreeSpace = -1;
BOOL bIsSparseFilesSupportedByHost = FALSE;
vector <HostDevice> DeferredNonSysInPlaceEncDevices;
-BOOL bChecklistA;
-BOOL bChecklistB;
-BOOL bChecklistC;
-BOOL bCheckboxPretest;
-
int iMaxPasswordLength = MAX_PASSWORD;
// specific definitions and implementation for support of resume operation
// in wait dialog mechanism
void CALLBACK ResumeInPlaceEncWaitThreadProc(void* pArg, HWND hwndDlg)
{
wchar_t szDevicePath[MAX_PATH] = {0};
RawDevicesDlgParam param;
param.devices = GetAvailableHostDevices (false, true, false);
@@ -1439,25 +1412,103 @@ void ComboSelChangeEA (HWND hwndDlg)
{
int nIndex = (int) SendMessage (GetDlgItem (hwndDlg, IDC_COMBO_BOX), CB_GETCURSEL, 0, 0);
if (nIndex == CB_ERR)
{
SetWindowText (GetDlgItem (hwndDlg, IDC_BOX_HELP), L"");
}
else
{
wchar_t name[100];
+ wchar_t auxLine[4096];
+ wchar_t hyperLink[256] = { 0 };
+ int cipherIDs[5];
+ int i, cnt = 0;
nIndex = (int) SendMessage (GetDlgItem (hwndDlg, IDC_COMBO_BOX), CB_GETITEMDATA, nIndex, 0);
EAGetName (name, ARRAYSIZE(name),nIndex, 0);
- SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("AES_HELP_NEW"));
+ if (wcscmp (name, L"AES") == 0)
+ {
+ StringCbPrintfW (hyperLink, sizeof(hyperLink) / 2, GetString ("MORE_INFO_ABOUT"), name);
+
+ SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("AES_HELP"));
+ }
+ else if (wcscmp (name, L"Serpent") == 0)
+ {
+ StringCbPrintfW (hyperLink, sizeof(hyperLink) / 2, GetString ("MORE_INFO_ABOUT"), name);
+
+ SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("SERPENT_HELP"));
+ }
+ else if (wcscmp (name, L"Twofish") == 0)
+ {
+ StringCbPrintfW (hyperLink, sizeof(hyperLink) / 2, GetString ("MORE_INFO_ABOUT"), name);
+
+ SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("TWOFISH_HELP"));
+ }
+ else if (wcscmp (name, L"Kuznyechik") == 0)
+ {
+ StringCbPrintfW (hyperLink, sizeof(hyperLink) / 2, GetString ("MORE_INFO_ABOUT"), name);
+
+ SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("KUZNYECHIK_HELP"));
+ }
+ else if (wcscmp (name, L"Camellia") == 0)
+ {
+ StringCbPrintfW (hyperLink, sizeof(hyperLink) / 2, GetString ("MORE_INFO_ABOUT"), name);
+
+ SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("CAMELLIA_HELP"));
+ }
+ else if (EAGetCipherCount (nIndex) > 1)
+ {
+ // Cascade
+ cipherIDs[cnt++] = i = EAGetLastCipher(nIndex);
+ while (i = EAGetPreviousCipher(nIndex, i))
+ {
+ cipherIDs[cnt] = i;
+ cnt++;
+ }
+
+ switch (cnt) // Number of ciphers in the cascade
+ {
+ case 2:
+ StringCbPrintfW (auxLine, sizeof(auxLine), GetString ("TWO_LAYER_CASCADE_HELP"),
+ CipherGetName (cipherIDs[1]),
+ CipherGetKeySize (cipherIDs[1])*8,
+ CipherGetName (cipherIDs[0]),
+ CipherGetKeySize (cipherIDs[0])*8);
+ break;
+
+ case 3:
+ StringCbPrintfW (auxLine, sizeof(auxLine), GetString ("THREE_LAYER_CASCADE_HELP"),
+ CipherGetName (cipherIDs[2]),
+ CipherGetKeySize (cipherIDs[2])*8,
+ CipherGetName (cipherIDs[1]),
+ CipherGetKeySize (cipherIDs[1])*8,
+ CipherGetName (cipherIDs[0]),
+ CipherGetKeySize (cipherIDs[0])*8);
+ break;
+ }
+
+ StringCbCopyW (hyperLink, sizeof(hyperLink), GetString ("IDC_LINK_MORE_INFO_ABOUT_CIPHER"));
+
+ SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), auxLine);
+ }
+ else
+ {
+ // No info available for this encryption algorithm
+ SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), L"");
+ }
+
+
+ // Update hyperlink
+ SetWindowTextW (GetDlgItem (hwndDlg, IDC_LINK_MORE_INFO_ABOUT_CIPHER), hyperLink);
+ AccommodateTextField (hwndDlg, IDC_LINK_MORE_INFO_ABOUT_CIPHER, FALSE, hUserUnderlineFont);
}
}
static void VerifySizeAndUpdate (HWND hwndDlg, BOOL bUpdate)
{
BOOL bEnable = TRUE;
wchar_t szTmp[50];
__int64 lTmp;
__int64 i;
static unsigned __int64 nLastVolumeSize = 0;
@@ -3718,94 +3769,45 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString ("NEXT"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_PREV), GetString ("PREV"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDCANCEL), GetString ("CANCEL"));
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), TRUE);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), FALSE);
UpdateWizardModeControls (hwndDlg, WizardMode);
break;
case SYSENC_TYPE_PAGE:
- {
bHiddenVolHost = bHiddenVol = bHiddenOS;
- wchar_t finalMsg[8024] = {0};
+ SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("SYSENC_TYPE_PAGE_TITLE"));
- try
- {
- StringCbPrintfW (finalMsg, sizeof(finalMsg),
- GetString ("SYSENC_TYPE_PAGE_TITLE"),
- GetSystemDriveLetter ());
- }
- catch (Exception &e)
- {
- e.Show (hwndDlg);
- EndMainDlg (MainDlg);
- return 0;
- }
+ SendMessage (GetDlgItem (hwndDlg, IDC_SYSENC_HIDDEN), WM_SETFONT, (WPARAM) hUserBoldFont, (LPARAM) TRUE);
+ SendMessage (GetDlgItem (hwndDlg, IDC_SYSENC_NORMAL), WM_SETFONT, (WPARAM) hUserBoldFont, (LPARAM) TRUE);
- SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), finalMsg);
+ DisableIfGpt(GetDlgItem(hwndDlg, IDC_SYSENC_HIDDEN));
- memset (finalMsg, 0, sizeof (finalMsg));
- try
- {
- StringCbPrintfW (finalMsg, sizeof(finalMsg),
- GetString ("SYSENC_INFO"),
- GetSystemDriveLetter ());
- }
- catch (Exception &e)
- {
- e.Show (hwndDlg);
- EndMainDlg (MainDlg);
- return 0;
- }
+ CheckButton (GetDlgItem (hwndDlg, bHiddenOS ? IDC_SYSENC_HIDDEN : IDC_SYSENC_NORMAL));
- SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), finalMsg);
- SetWindowTextW (GetDlgItem (hwndDlg, IDT_SYSENC_INFO_2), GetString ("SYSENC_INFO_2"));
-
- if (bSystemIsGPT)
- {
- ShowWindow (GetDlgItem(hwndDlg, IDC_ADVANCE_INTRO), SW_HIDE);
- ShowWindow (GetDlgItem(hwndDlg, IDC_INFORMATION_TIP), SW_HIDE);
- }
- else
- {
- EnableWindow (GetDlgItem(hwndDlg, IDC_ADVANCE_INTRO), TRUE);
- iIconX = GetSystemMetrics (SM_CXSMICON);
- iIconY = GetSystemMetrics (SM_CYSMICON);
+ SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("SYSENC_HIDDEN_TYPE_HELP"));
+ SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP_SYSENC_NORMAL), GetString ("SYSENC_NORMAL_TYPE_HELP"));
+
+ ToHyperlink (hwndDlg, IDC_HIDDEN_SYSENC_INFO_LINK);
- hIconTooltip = LoadImage (NULL, MAKEINTRESOURCE (104), IMAGE_ICON, iIconX, iIconY, LR_DEFAULTCOLOR);
- SendDlgItemMessage (hwndDlg, IDC_INFORMATION_TIP, STM_SETICON, (WPARAM) hIconTooltip, 0);
-
- hDlgItemTooltip = GetDlgItem (hwndDlg, IDC_INFORMATION_TIP);
- if (hDlgItemTooltip)
- {
- CreateToolTip (hwndDlg, hDlgItemTooltip, GetString ("ADV_FEATURES_INTRO_TOOLTIP"));
- }
- else
- {
- MessageBox (0, TEXT("Cannot find dialog item"), 0, 0);
- }
- }
-
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), TRUE);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), !bDirectSysEncMode);
SetWindowTextW (GetDlgItem (MainDlg, IDC_NEXT), GetString ("NEXT"));
SetWindowTextW (GetDlgItem (MainDlg, IDC_PREV), GetString ("PREV"));
SetWindowTextW (GetDlgItem (MainDlg, IDCANCEL), GetString ("CANCEL"));
-
- // Start loading the password dictonary into memory ("need" is just a random word for initializing the process)
- CheckWord("need");
break;
- }
+
case SYSENC_HIDDEN_OS_REQ_CHECK_PAGE:
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("SYSENC_HIDDEN_OS_REQ_CHECK_PAGE_TITLE"));
SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("SYSENC_HIDDEN_OS_REQ_CHECK_PAGE_HELP"));
SetWindowTextW (GetDlgItem (MainDlg, IDC_NEXT), GetString ("NEXT"));
SetWindowTextW (GetDlgItem (MainDlg, IDC_PREV), GetString ("PREV"));
SetWindowTextW (GetDlgItem (MainDlg, IDCANCEL), GetString ("CANCEL"));
EnableWindow (GetDlgItem (MainDlg, IDC_NEXT), TRUE);
EnableWindow (GetDlgItem (MainDlg, IDC_PREV), bDirectSysEncModeCommand != SYSENC_COMMAND_CREATE_HIDDEN_OS && bDirectSysEncModeCommand != SYSENC_COMMAND_CREATE_HIDDEN_OS_ELEV);
@@ -3826,20 +3828,21 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
DisableIfGpt(GetDlgItem(hwndDlg, IDC_WHOLE_SYS_DRIVE));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString ("NEXT"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_PREV), GetString ("PREV"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDCANCEL), GetString ("CANCEL"));
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), TRUE);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), TRUE);
break;
+
case SYSENC_PRE_DRIVE_ANALYSIS_PAGE:
Init2RadButtonPageYesNo (SysEncDetectHiddenSectors);
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("SYSENC_PRE_DRIVE_ANALYSIS_TITLE"));
SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("SYSENC_PRE_DRIVE_ANALYSIS_HELP"));
break;
case SYSENC_DRIVE_ANALYSIS_PAGE:
@@ -4353,147 +4356,105 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), !bInPlaceEncNonSys);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), TRUE);
}
break;
case PASSWORD_PAGE:
{
wchar_t str[1000];
- EnableWindow(GetDlgItem(hwndDlg, IDC_VERIFY), FALSE);
-
hPasswordInputField = GetDlgItem (hwndDlg, IDC_PASSWORD);
hVerifyPasswordInputField = GetDlgItem (hwndDlg, IDC_VERIFY);
ToNormalPwdField (hwndDlg, IDC_PASSWORD);
ToNormalPwdField (hwndDlg, IDC_VERIFY);
if (SysEncInEffect ())
{
ToBootPwdField (hwndDlg, IDC_PASSWORD);
ToBootPwdField (hwndDlg, IDC_VERIFY);
- StringCbPrintfW(OrigKeyboardLayout, sizeof(OrigKeyboardLayout), L"%08X", (DWORD)GetKeyboardLayout(NULL) & 0xFFFF);
+ StringCbPrintfW (OrigKeyboardLayout, sizeof(OrigKeyboardLayout), L"%08X", (DWORD) GetKeyboardLayout (NULL) & 0xFFFF);
- if ((DWORD)GetKeyboardLayout(NULL) != 0x00000409 && (DWORD)GetKeyboardLayout(NULL) != 0x04090409)
+ if ((DWORD) GetKeyboardLayout (NULL) != 0x00000409 && (DWORD) GetKeyboardLayout (NULL) != 0x04090409)
{
- DWORD keybLayout = (DWORD)LoadKeyboardLayout(L"00000409", KLF_ACTIVATE);
+ DWORD keybLayout = (DWORD) LoadKeyboardLayout (L"00000409", KLF_ACTIVATE);
if (keybLayout != 0x00000409 && keybLayout != 0x04090409)
{
- Error("CANT_CHANGE_KEYB_LAYOUT_FOR_SYS_ENCRYPTION", MainDlg);
- EndMainDlg(MainDlg);
+ Error ("CANT_CHANGE_KEYB_LAYOUT_FOR_SYS_ENCRYPTION", MainDlg);
+ EndMainDlg (MainDlg);
return 1;
}
bKeyboardLayoutChanged = TRUE;
}
+
if (SetTimer (MainDlg, TIMER_ID_KEYB_LAYOUT_GUARD, TIMER_INTERVAL_KEYB_LAYOUT_GUARD, NULL) == 0)
{
Error ("CANNOT_SET_TIMER", MainDlg);
EndMainDlg (MainDlg);
return 1;
}
-
- ShowWindow(GetDlgItem(hwndDlg, IDC_KEYFILES_ENABLE), SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_KEY_FILES), SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_PIM_ENABLE), SW_HIDE);
-
- ShowWindow(GetDlgItem(hwndDlg, IDC_ADVANCE), SW_SHOW);
- }
- else
- {
- SetCheckBox (hwndDlg, IDC_PIM_ENABLE, PimEnable);
-
- SetCheckBox (hwndDlg, IDC_KEYFILES_ENABLE, KeyFilesEnable && !SysEncInEffect());
- EnableWindow (GetDlgItem (hwndDlg, IDC_KEY_FILES), KeyFilesEnable && !SysEncInEffect());
- EnableWindow (GetDlgItem (hwndDlg, IDC_KEYFILES_ENABLE), !SysEncInEffect());
}
if (bHiddenVolHost)
{
StringCbCopyW (str, sizeof(str), GetString (bHiddenOS ? "PASSWORD_SYSENC_OUTERVOL_HELP" : "PASSWORD_HIDDENVOL_HOST_HELP"));
}
else if (bHiddenVol)
{
StringCbPrintfW (str, sizeof str, L"%s%s",
GetString (bHiddenOS ? "PASSWORD_HIDDEN_OS_HELP" : "PASSWORD_HIDDENVOL_HELP"),
GetString ("PASSWORD_HELP"));
}
else
{
- StringCbCopyW (str, sizeof(str), GetString ("PASSWORD_HELP_SYSENC"));
+ StringCbCopyW (str, sizeof(str), GetString ("PASSWORD_HELP"));
}
- SetPassword(hwndDlg, IDC_PASSWORD, szRawPassword);
- SetPassword(hwndDlg, IDC_VERIFY, szVerify);
+ SetPassword (hwndDlg, IDC_PASSWORD, szRawPassword);
+ SetPassword (hwndDlg, IDC_VERIFY, szVerify);
SetFocus (GetDlgItem (hwndDlg, IDC_PASSWORD));
+ SetCheckBox (hwndDlg, IDC_PIM_ENABLE, PimEnable);
+
+ SetCheckBox (hwndDlg, IDC_KEYFILES_ENABLE, KeyFilesEnable && !SysEncInEffect());
+ EnableWindow (GetDlgItem (hwndDlg, IDC_KEY_FILES), KeyFilesEnable && !SysEncInEffect());
+ EnableWindow (GetDlgItem (hwndDlg, IDC_KEYFILES_ENABLE), !SysEncInEffect());
+
SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), str);
if (CreatingHiddenSysVol())
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("PASSWORD_HIDDEN_OS_TITLE"));
else if (bHiddenVol)
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString (bHiddenVolHost ? "PASSWORD_HIDVOL_HOST_TITLE" : "PASSWORD_HIDVOL_TITLE"));
else if (WizardMode == WIZARD_MODE_SYS_DEVICE)
- SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("CHOOSE_PASSWORD_TITLE"));
+ SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("PASSWORD"));
else
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("PASSWORD_TITLE"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString ("NEXT"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_PREV), GetString ("PREV"));
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), TRUE);
VerifyPasswordAndUpdate (hwndDlg, GetDlgItem (GetParent (hwndDlg), IDC_NEXT),
GetDlgItem (hwndDlg, IDC_PASSWORD),
GetDlgItem (hwndDlg, IDC_VERIFY),
NULL,
NULL,
KeyFilesEnable && FirstKeyFile!=NULL && !SysEncInEffect());
volumePassword.Length = (unsigned __int32) strlen ((char *) volumePassword.Text);
-
- if(SysEncInEffect ())
- {
- /* Random pool parameter is here because random page is removed */
-
- mouseEntropyGathered = 0xFFFFFFFF;
- mouseEventsInitialCount = 0;
- bUseMask = FALSE;
-
- {
- HCRYPTPROV hRngProv;
- if (CryptAcquireContext (&hRngProv, NULL, MS_ENHANCED_PROV, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT))
- {
- if (CryptGenRandom (hRngProv, sizeof (maskRandPool), maskRandPool))
- bUseMask = TRUE;
- CryptReleaseContext (hRngProv, 0);
- }
- }
-
- SetTimer(GetParent(hwndDlg), TIMER_ID_RANDVIEW, TIMER_INTERVAL_RANDVIEW, NULL);
- hRandPoolSys = GetDlgItem(hwndDlg, IDC_SYS_POOL_CONTENTS);
- hEntropyBar = GetDlgItem(hwndDlg, IDC_ENTROPY_BAR);
- SendMessage(hEntropyBar, PBM_SETRANGE32, 0, maxEntropyLevel);
- SendMessage(hEntropyBar, PBM_SETSTEP, 1, 0);
- SendMessage(GetDlgItem(hwndDlg, IDC_SYS_POOL_CONTENTS), WM_SETFONT, (WPARAM)hFixedDigitFont, (LPARAM)TRUE);
-
- /* set default values */
-
- hash_algo = bSystemIsGPT ? SHA512 : DEFAULT_HASH_ALGORITHM_BOOT;
- RandSetHashFunction(hash_algo);
-
- nWipeMode = TC_WIPE_NONE;
- }
}
break;
case PIM_PAGE:
{
SendMessage (GetDlgItem (hwndDlg, IDC_PIM), EM_LIMITTEXT, SysEncInEffect()? MAX_BOOT_PIM: MAX_PIM, 0);
if (volumePim > 0)
{
SetPim (hwndDlg, IDC_PIM, volumePim);
@@ -4609,22 +4570,20 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
DisplayPortionsOfKeys (hHeaderKey, hMasterKey, HeaderKeyGUIView, MasterKeyGUIView, !showKeys);
break;
case SYSENC_RESCUE_DISK_CREATION_PAGE:
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("RESCUE_DISK"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString ("NEXT"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_PREV), GetString ("PREV"));
SetWindowTextW (GetDlgItem (hwndDlg, IDT_RESCUE_DISK_INFO), bSystemIsGPT? GetString ("RESCUE_DISK_EFI_INFO"): GetString ("RESCUE_DISK_INFO"));
- SetWindowTextW(GetDlgItem(hwndDlg, IDT_RESCUE_DISK_INFO_2), GetString("RESCUE_DISK_INFO_2"));
-
SetCheckBox (hwndDlg, IDC_SKIP_RESCUE_VERIFICATION, bDontVerifyRescueDisk);
SetDlgItemText (hwndDlg, IDC_RESCUE_DISK_ISO_PATH, szRescueDiskISO);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), (GetWindowTextLength (GetDlgItem (hwndDlg, IDC_RESCUE_DISK_ISO_PATH)) > 1));
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), TRUE);
break;
case SYSENC_RESCUE_DISK_BURN_PAGE:
{
wchar_t szTmp[8192];
@@ -4642,23 +4601,39 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
else
{
StringCbPrintfW (szTmp, sizeof szTmp,
GetString (bDontVerifyRescueDisk ? "RESCUE_DISK_BURN_INFO_NO_CHECK" : "RESCUE_DISK_BURN_INFO"),
szRescueDiskISO, IsWindowsIsoBurnerAvailable() ? L"" : GetString ("RESCUE_DISK_BURN_INFO_NONWIN_ISO_BURNER"));
}
SetWindowTextW (GetDlgItem (hwndDlg, IDT_RESCUE_DISK_BURN_INFO), szTmp);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), TRUE);
- /* The 'Back' button is enabled but user can't go back, instead warning is provided */
- EnableWindow(GetDlgItem(GetParent(hwndDlg), IDC_PREV), TRUE);
-
+ /* The 'Back' button must be disabled now because the user could burn a Rescue Disk, then go back, and
+ generate a different master key, which would cause the Rescue Disk verification to fail (the result
+ would be confusion and bug reports). */
+ EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), FALSE);
+
+ if (bSystemIsGPT)
+ {
+ ShowWindow (GetDlgItem (hwndDlg, IDC_DOWNLOAD_CD_BURN_SOFTWARE), SW_HIDE);
+ }
+ else
+ {
+ if (IsWindowsIsoBurnerAvailable())
+ SetWindowTextW (GetDlgItem (hwndDlg, IDC_DOWNLOAD_CD_BURN_SOFTWARE), GetString ("LAUNCH_WIN_ISOBURN"));
+
+ ToHyperlink (hwndDlg, IDC_DOWNLOAD_CD_BURN_SOFTWARE);
+
+ if (IsWindowsIsoBurnerAvailable() && !bDontVerifyRescueDisk)
+ LaunchWindowsIsoBurner (hwndDlg, szRescueDiskISO);
+ }
}
break;
case SYSENC_RESCUE_DISK_VERIFIED_PAGE:
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("RESCUE_DISK_DISK_VERIFIED_TITLE"));
SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("RESCUE_DISK_VERIFIED_INFO"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString ("NEXT"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_PREV), GetString ("PREV"));
@@ -4669,90 +4644,38 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), FALSE);
// Prevent losing the burned rescue disk by inadvertent exit
bConfirmQuit = TRUE;
break;
case SYSENC_WIPE_MODE_PAGE:
case NONSYS_INPLACE_ENC_WIPE_MODE_PAGE:
{
- if (SysEncInEffect ())
- {
- /* Wipe mode page is now checklist page */
- ShowWindow (GetDlgItem (hwndDlg, IDC_WIPE_MODE), SW_HIDE);
- ShowWindow (GetDlgItem (hwndDlg, IDT_WIPE_MODE), SW_HIDE);
- ShowWindow (GetDlgItem (hwndDlg, IDT_WIPE_MODE_INFO), SW_HIDE);
-
- SetWindowTextW (GetDlgItem (hwndDlg, IDC_REMEMBER_PASSWORD), GetString ("REMEMBER_PASSWORD"));
- SetWindowTextW (GetDlgItem (hwndDlg, IDC_STORE_RESCUE_DISK), GetString ("STORE_RESCUE_DISK"));
- SetWindowTextW (GetDlgItem (hwndDlg, IDC_BACKUP_DATA), GetString ("BACKUP_DATA"));
-
- SendMessage(GetDlgItem(hwndDlg, IDC_REMEMBER_PASSWORD), WM_SETFONT, (WPARAM)hUserBoldFont, (LPARAM)TRUE);
- SendMessage(GetDlgItem(hwndDlg, IDC_STORE_RESCUE_DISK), WM_SETFONT, (WPARAM)hUserBoldFont, (LPARAM)TRUE);
- SendMessage(GetDlgItem(hwndDlg, IDC_BACKUP_DATA), WM_SETFONT, (WPARAM)hUserBoldFont, (LPARAM)TRUE);
-
- bChecklistA = FALSE;
- bChecklistB = FALSE;
- bChecklistC = FALSE;
-
- SetWindowTextW(GetDlgItem(GetParent(hwndDlg), IDC_BOX_TITLE), GetString("CHECKLIST_TITLE"));
-
- SetDlgItemText(hwndDlg, IDC_BROWSE, GetString ("OPEN_PATH_CHECKLIST_PAGE"));
- SetWindowTextW (GetDlgItem (hwndDlg, IDT_STORE_RESCUE_DISK), GetString ("RESCUE_DISK_CHECKLIST_B"));
- SetWindowTextW (GetDlgItem (hwndDlg, IDT_REMEMBER_PASSWORD), GetString ("RESCUE_DISK_CHECKLIST_A"));
- SetWindowTextW (GetDlgItem (hwndDlg, IDT_BACKUP_DATA), GetString ("RESCUE_DISK_CHECKLIST_C"));
-
- EnableWindow(GetDlgItem(hwndDlg, IDC_REMEMBER_PASSWORD), TRUE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_STORE_RESCUE_DISK), TRUE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_BACKUP_DATA), TRUE);
-
- SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString ("NEXT"));
-
- SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_PREV), GetString ("PREV"));
- EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), TRUE);
- EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), FALSE);
- }
- else
- {
- /* Hide elements from Checklist page and show Wipe mode page */
- ShowWindow (GetDlgItem (hwndDlg, IDC_CHECKLIST_A), SW_HIDE);
- ShowWindow (GetDlgItem (hwndDlg, IDC_CHECKLIST_B), SW_HIDE);
- ShowWindow (GetDlgItem (hwndDlg, IDC_CHECKLIST_C), SW_HIDE);
- ShowWindow (GetDlgItem (hwndDlg, IDC_STORE_RESCUE_DISK), SW_HIDE);
- ShowWindow (GetDlgItem (hwndDlg, IDC_REMEMBER_PASSWORD), SW_HIDE);
- ShowWindow (GetDlgItem (hwndDlg, IDC_BACKUP_DATA), SW_HIDE);
- ShowWindow (GetDlgItem (hwndDlg, IDT_REMEMBER_PASSWORD), SW_HIDE);
- ShowWindow (GetDlgItem (hwndDlg, IDT_STORE_RESCUE_DISK), SW_HIDE);
- ShowWindow (GetDlgItem (hwndDlg, IDT_BACKUP_DATA), SW_HIDE);
- ShowWindow (GetDlgItem (hwndDlg, IDC_BROWSE), SW_HIDE);
- ShowWindow (GetDlgItem (hwndDlg, IDC_RESCUE_DISK_ISO_PATH), SW_HIDE);
-
- if (nWipeMode == TC_WIPE_1_RAND)
- nWipeMode = TC_WIPE_NONE;
-
- SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("WIPE_MODE_TITLE"));
- SetWindowTextW (GetDlgItem (hwndDlg, IDT_WIPE_MODE_INFO), GetString ("INPLACE_ENC_WIPE_MODE_INFO"));
-
- PopulateWipeModeCombo (GetDlgItem (hwndDlg, IDC_WIPE_MODE),
- SystemEncryptionStatus == SYSENC_STATUS_DECRYPTING && !bInPlaceEncNonSys,
- TRUE,
- FALSE);
+ if (nWipeMode == TC_WIPE_1_RAND)
+ nWipeMode = TC_WIPE_NONE;
- SelectAlgo (GetDlgItem (hwndDlg, IDC_WIPE_MODE), (int *) &nWipeMode);
+ SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("WIPE_MODE_TITLE"));
+ SetWindowTextW (GetDlgItem (hwndDlg, IDT_WIPE_MODE_INFO), GetString ("INPLACE_ENC_WIPE_MODE_INFO"));
- SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString ("NEXT"));
+ PopulateWipeModeCombo (GetDlgItem (hwndDlg, IDC_WIPE_MODE),
+ SystemEncryptionStatus == SYSENC_STATUS_DECRYPTING && !bInPlaceEncNonSys,
+ TRUE,
+ FALSE);
- SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_PREV), GetString ("PREV"));
- EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), TRUE);
- EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), TRUE);
- }
+ SelectAlgo (GetDlgItem (hwndDlg, IDC_WIPE_MODE), (int *) &nWipeMode);
+
+ SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString ("NEXT"));
+
+ SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_PREV), GetString ("PREV"));
+ EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), TRUE);
+ EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), TRUE);
}
break;
case SYSENC_PRETEST_INFO_PAGE:
if (bHiddenOS)
{
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("HIDDEN_OS_CREATION_PREINFO_TITLE"));
SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("HIDDEN_OS_CREATION_PREINFO_HELP"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString ("START"));
@@ -4761,21 +4684,21 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
else
{
wchar_t finalMsg[8024] = {0};
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("SYS_ENCRYPTION_PRETEST_TITLE"));
try
{
StringCbPrintfW (finalMsg, sizeof(finalMsg),
GetString ("SYS_ENCRYPTION_PRETEST_INFO"),
- GetSystemDriveLetter ());
+ BootEncObj->GetSystemDriveConfiguration().DriveNumber);
}
catch (Exception &e)
{
e.Show (hwndDlg);
EndMainDlg (MainDlg);
return 0;
}
SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), finalMsg);
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString ("TEST"));
@@ -4785,44 +4708,28 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_PREV), GetString ("PREV"));
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), TRUE);
break;
case SYSENC_PRETEST_RESULT_PAGE:
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("SYS_ENCRYPTION_PRETEST_RESULT_TITLE"));
SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("SYS_ENCRYPTION_PRETEST_RESULT_INFO"));
- ShowWindow (GetDlgItem (hwndDlg, IDC_CHECKBOX_PRETEST), SW_SHOW);
- SetWindowTextW (GetDlgItem (hwndDlg, IDC_CHECKBOX_PRETEST), GetString ("PRETEST_CHECKBOX"));
-
- bCheckboxPretest = FALSE;
-
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString ("ENCRYPT"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_PREV), GetString ("PREV"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDCANCEL), GetString ("DEFER"));
- EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), FALSE);
- EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), TRUE);
+ EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), TRUE);
+ EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), FALSE);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDCANCEL), TRUE);
- HWND hTooltip;
- hTooltip = GetDlgItem (GetParent (hwndDlg), IDC_PREV);
- if (hTooltip)
- {
- CreateToolTip (hwndDlg, hTooltip, GetString ("PRETEST_BACK_BUTTON"));
- }
- else
- {
- MessageBox (0, TEXT ("Cannot find dialog item for tooltip!"), 0, 0);
- }
-
break;
case SYSENC_ENCRYPTION_PAGE:
if (CreateSysEncMutex ())
{
try
{
BootEncStatus = BootEncObj->GetStatus();
bSystemEncryptionInProgress = BootEncStatus.SetupInProgress;
@@ -4830,62 +4737,56 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
catch (Exception &e)
{
e.Show (hwndDlg);
Error ("ERR_GETTING_SYSTEM_ENCRYPTION_STATUS", MainDlg);
EndMainDlg (MainDlg);
return 0;
}
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE),
GetString (SystemEncryptionStatus != SYSENC_STATUS_DECRYPTING ? "ENCRYPTION" : "DECRYPTION"));
-
- SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP),
- GetString (SystemEncryptionStatus != SYSENC_STATUS_DECRYPTING ? "SYSENC_ENCRYPTION_PAGE_INFO" : "SYSENC_DECRYPTION_PAGE_INFO"));
+
+ SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("SYSENC_ENCRYPTION_PAGE_INFO"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDCANCEL), GetString ("DEFER"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_PREV), GetString ("PREV"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT),
GetString (SystemEncryptionStatus != SYSENC_STATUS_DECRYPTING ? "ENCRYPT" : "DECRYPT"));
SetWindowTextW (GetDlgItem (hwndDlg, IDC_PAUSE),
GetString (bSystemEncryptionInProgress ? "IDC_PAUSE" : "RESUME"));
EnableWindow (GetDlgItem (hwndDlg, IDC_PAUSE), BootEncStatus.DriveEncrypted);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), FALSE);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), !BootEncStatus.SetupInProgress);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDCANCEL), TRUE);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDHELP), TRUE);
+ ToHyperlink (hwndDlg, IDC_MORE_INFO_SYS_ENCRYPTION);
+
if (SystemEncryptionStatus == SYSENC_STATUS_DECRYPTING)
{
nWipeMode = TC_WIPE_NONE;
EnableWindow (GetDlgItem (hwndDlg, IDC_WIPE_MODE), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDT_WIPE_MODE), FALSE);
PopulateWipeModeCombo (GetDlgItem (hwndDlg, IDC_WIPE_MODE), TRUE, TRUE, FALSE);
SelectAlgo (GetDlgItem (hwndDlg, IDC_WIPE_MODE), (int *) &nWipeMode);
}
else
{
EnableWindow (GetDlgItem (hwndDlg, IDC_WIPE_MODE), !bSystemEncryptionInProgress);
PopulateWipeModeCombo (GetDlgItem (hwndDlg, IDC_WIPE_MODE), FALSE, TRUE, FALSE);
SelectAlgo (GetDlgItem (hwndDlg, IDC_WIPE_MODE), (int *) &nWipeMode);
}
- if (nWipeMode == TC_WIPE_NONE)
- {
- ShowWindow (GetDlgItem(hwndDlg, IDC_WIPE_MODE), SW_HIDE);
- ShowWindow (GetDlgItem(hwndDlg, IDT_FORMAT_OPTIONS), SW_HIDE);
- ShowWindow (GetDlgItem(hwndDlg, IDT_WIPE_MODE), SW_HIDE);
- }
-
PostMessage (hwndDlg, TC_APPMSG_PERFORM_POST_SYSENC_WMINIT_TASKS, 0, 0);
}
else
{
Error ("SYSTEM_ENCRYPTION_IN_PROGRESS_ELSEWHERE", MainDlg);
EndMainDlg (MainDlg);
return 0;
}
return 0;
@@ -5361,52 +5262,20 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
case WM_HELP:
OpenPageHelp (GetParent (hwndDlg), nCurPageNo);
return 1;
case TC_APPMSG_PERFORM_POST_SYSENC_WMINIT_TASKS:
AfterSysEncProgressWMInitTasks (hwndDlg);
return 1;
case WM_CTLCOLORSTATIC:
{
- if ((HWND)lParam == GetDlgItem (hwndDlg, PASSWORD_METER) && iPasswordStrength == 1)
- {
- // we're about to draw the static
- // set the text colour in (HDC)lParam
- SetBkMode ((HDC)wParam, TRANSPARENT);
- SetTextColor ((HDC)wParam, RGB(255, 0, 0)); // password weak red
- return (BOOL)GetSysColorBrush(COLOR_MENU);
- }
-
- if ((HWND)lParam == GetDlgItem (hwndDlg, PASSWORD_METER) && iPasswordStrength == 2)
- {
- // we're about to draw the static
- // set the text colour in (HDC)lParam
- SetBkMode ((HDC)wParam, TRANSPARENT);
- SetTextColor ((HDC)wParam, RGB (255, 165, 0)); // password medium orange
- return (BOOL) GetSysColorBrush (COLOR_MENU);
- }
-
- if ((HWND)lParam == GetDlgItem (hwndDlg, PASSWORD_METER) && iPasswordStrength == 3)
- {
- SetBkMode ((HDC)wParam, TRANSPARENT);
- SetTextColor ((HDC)wParam, RGB (218, 218, 0)); // password strong yellow
- return (BOOL) GetSysColorBrush (COLOR_MENU);
- }
-
- if ((HWND)lParam == GetDlgItem (hwndDlg, PASSWORD_METER) && iPasswordStrength == 4)
- {
- SetBkMode((HDC)wParam, TRANSPARENT);
- SetTextColor((HDC)wParam, RGB(50, 205, 50)); // password very strong green
- return (BOOL) GetSysColorBrush (COLOR_MENU);
- }
-
if (PimValueChangedWarning && ((HWND)lParam == GetDlgItem(hwndDlg, IDC_PIM_HELP)) )
{
// we're about to draw the static
// set the text colour in (HDC)lParam
SetBkMode((HDC)wParam,TRANSPARENT);
SetTextColor((HDC)wParam, RGB(255,0,0));
// NOTE: per documentation as pointed out by selbie, GetSolidBrush would leak a GDI handle.
return (BOOL)GetSysColorBrush(COLOR_MENU);
}
}
@@ -5455,36 +5324,20 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
bHiddenVol = FALSE;
bHiddenVolHost = FALSE;
return 1;
case IDC_HIDDEN_SYSENC_INFO_LINK:
Applink ("hiddensysenc");
return 1;
}
}
- if (lw == IDC_ADVANCE_INTRO && nCurPageNo == SYSENC_TYPE_PAGE)
- {
- DialogBoxParamW(hInst,
- MAKEINTRESOURCEW(IDD_ADVANCE_MBR), hwndDlg,
- (DLGPROC)AdvanceDlgProcIntro, NULL);
- return 1;
- }
-
- if (lw == IDC_ADVANCE && nCurPageNo == PASSWORD_PAGE)
- {
- DialogBoxParamW(hInst,
- MAKEINTRESOURCEW(IDD_ADVANCE), hwndDlg,
- (DLGPROC)AdvanceDlgProc, NULL);
- return 1;
- }
-
if (nCurPageNo == SYSENC_HIDDEN_OS_REQ_CHECK_PAGE && lw == IDC_HIDDEN_SYSENC_INFO_LINK)
{
Applink ("hiddensysenc");
return 1;
}
if (nCurPageNo == SYSENC_SPAN_PAGE)
{
switch (lw)
{
@@ -5819,70 +5672,28 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
if (hw == EN_CHANGE && nCurPageNo == SIZE_PAGE)
{
VerifySizeAndUpdate (hwndDlg, FALSE);
return 1;
}
if (hw == EN_CHANGE && nCurPageNo == PASSWORD_PAGE)
{
- // If 'Next' button was clicked (and keyboard layout is not US), don't verify
- if (!bNextButtonClicked)
- {
- VerifyPasswordAndUpdate (hwndDlg, GetDlgItem (GetParent (hwndDlg), IDC_NEXT),
- GetDlgItem(hCurPage, IDC_PASSWORD),
- GetDlgItem(hCurPage, IDC_VERIFY),
- NULL,
- NULL,
- KeyFilesEnable && FirstKeyFile != NULL && !SysEncInEffect());
-
- bNextButtonClicked = FALSE;
- }
-
+ VerifyPasswordAndUpdate (hwndDlg, GetDlgItem (GetParent (hwndDlg), IDC_NEXT),
+ GetDlgItem (hwndDlg, IDC_PASSWORD),
+ GetDlgItem (hwndDlg, IDC_VERIFY),
+ NULL,
+ NULL,
+ KeyFilesEnable && FirstKeyFile!=NULL && !SysEncInEffect());
volumePassword.Length = (unsigned __int32) strlen ((char *) volumePassword.Text);
-
- SendMessage (GetDlgItem (hwndDlg, PASSWORD_METER), WM_SETFONT, (WPARAM)hUserBoldFont, (LPARAM)TRUE);
-
- memset (&tempPassword[0], 0, sizeof (tempPassword));
-
- if (GetPassword (hCurPage, IDC_PASSWORD, tempPassword, iMaxPasswordLength + 1, FALSE, TRUE))
- iPasswordStrength = PrintStrongness (tempPassword, strlen (tempPassword));
- else
- Error ("ERROR_GETTING_PWD", hwndDlg);
-
- burn (tempPassword, sizeof (tempPassword));
- if (iPasswordStrength == very_strong)
- {
- SetWindowTextW (GetDlgItem (hwndDlg, PASSWORD_METER), GetString ("VERY_STRONG_PASSWORD"));
- EnableWindow (GetDlgItem (hwndDlg, IDC_VERIFY), TRUE);
- }
- else if (iPasswordStrength == strong)
- {
- SetWindowTextW (GetDlgItem (hwndDlg, PASSWORD_METER), GetString ("STRONG_PASSWORD"));
- EnableWindow (GetDlgItem (hwndDlg, IDC_VERIFY), TRUE);
- }
- else if (iPasswordStrength == medium)
- {
- EnableWindow (GetDlgItem (hwndDlg, IDC_VERIFY), TRUE);
- SetWindowTextW (GetDlgItem (hwndDlg, PASSWORD_METER), GetString ("MEDIUM_PASSWORD"));
- }
- else if (iPasswordStrength == weak)
- {
- EnableWindow (GetDlgItem (hwndDlg, IDC_VERIFY), FALSE);
- SetWindowTextW (GetDlgItem (hwndDlg, PASSWORD_METER), GetString ("WEAK_PASSWORD"));
- }
- else
- {
- SetWindowTextW (GetDlgItem (hwndDlg, PASSWORD_METER), GetString ("VERY_WEAK_PASSWORD"));
- }
return 1;
}
if (hw == EN_CHANGE && nCurPageNo == PIM_PAGE)
{
if (lw == IDC_PIM)
{
if(GetPim (hwndDlg, IDC_PIM, 0) != 0)
{
PimValueChangedWarning = TRUE;
@@ -5903,46 +5714,20 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
HandleShowPasswordFieldAction (hwndDlg, IDC_SHOW_PASSWORD, IDC_PASSWORD, IDC_VERIFY);
return 1;
}
if (lw == IDC_SHOW_PIM && nCurPageNo == PIM_PAGE)
{
HandleShowPasswordFieldAction (hwndDlg, IDC_SHOW_PIM, IDC_PIM, 0);
return 1;
}
- if (lw == IDC_CHECKLIST_A)
- {
- bChecklistA = GetCheckBox (hwndDlg, IDC_CHECKLIST_A);
- bChecklistB = GetCheckBox (hwndDlg, IDC_CHECKLIST_B);
- bChecklistC = GetCheckBox (hwndDlg, IDC_CHECKLIST_C);
- }
-
- if (lw == IDC_CHECKLIST_B)
- {
- bChecklistA = GetCheckBox (hwndDlg, IDC_CHECKLIST_A);
- bChecklistB = GetCheckBox (hwndDlg, IDC_CHECKLIST_B);
- bChecklistC = GetCheckBox (hwndDlg, IDC_CHECKLIST_C);
- }
-
- if (lw == IDC_CHECKLIST_C)
- {
- bChecklistA = GetCheckBox (hwndDlg, IDC_CHECKLIST_A);
- bChecklistB = GetCheckBox (hwndDlg, IDC_CHECKLIST_B);
- bChecklistC = GetCheckBox (hwndDlg, IDC_CHECKLIST_C);
- }
-
- if (lw == IDC_CHECKBOX_PRETEST)
- {
- bCheckboxPretest = GetCheckBox (hwndDlg, IDC_CHECKBOX_PRETEST);
- }
-
if (lw == IDC_PIM_ENABLE)
{
PimEnable = GetCheckBox (hwndDlg, IDC_PIM_ENABLE);
if (!PimEnable)
volumePim = 0;
if (nCurPageNo == HIDDEN_VOL_HOST_PASSWORD_PAGE
|| nCurPageNo == NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE
)
{
ShowWindow (GetDlgItem( hwndDlg, IDC_PIM_ENABLE), PimEnable? SW_HIDE : SW_SHOW);
@@ -6258,61 +6043,28 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
if ( hw == EN_CHANGE )
{
GetDlgItemText (hwndDlg, IDC_RESCUE_DISK_ISO_PATH, szRescueDiskISO, sizeof(szRescueDiskISO));
EnableWindow (GetDlgItem (MainDlg, IDC_NEXT), (GetWindowTextLength (GetDlgItem (hwndDlg, IDC_RESCUE_DISK_ISO_PATH)) > 1));
return 1;
}
}
- /* The password and rescue checkbox have to be clicked in order to enable the next button */
- if ((nCurPageNo == SYSENC_WIPE_MODE_PAGE || nCurPageNo == NONSYS_INPLACE_ENC_WIPE_MODE_PAGE) &&
- (lw == IDC_CHECKLIST_A || lw == IDC_CHECKLIST_B || lw == IDC_CHECKLIST_C))
- {
- if (SysEncInEffect ())
- {
- if (bChecklistA && bChecklistB && bChecklistC)
- EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), TRUE);
- else
- EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), FALSE);
- }
- }
-
- if (lw == IDC_BROWSE && (nCurPageNo == SYSENC_WIPE_MODE_PAGE || nCurPageNo == NONSYS_INPLACE_ENC_WIPE_MODE_PAGE))
- {
- wchar_t tmpszRescueDiskISO [TC_MAX_PATH+1];
-
- StringCbCopyW (tmpszRescueDiskISO, sizeof(tmpszRescueDiskISO), szRescueDiskISO);
-
- //detects the last '\' in order to remove the name of the zip file and save file name
- for (int i = wcslen(tmpszRescueDiskISO); i > 1; i--)
- {
- if (tmpszRescueDiskISO[i] == '\\')
- {
- for (int j = i + 1; i < wcslen(tmpszRescueDiskISO); i++)
- tmpszRescueDiskISO[j] = '\0';
- break;
- }
- }
-
- if(!BrowseFile (hwndDlg, "RESCUE_DISK_PATH", tmpszRescueDiskISO))
- return 1;
-
- return 0;
- }
- if (nCurPageNo == SYSENC_PRETEST_RESULT_PAGE && lw == IDC_CHECKBOX_PRETEST)
+ if (nCurPageNo == SYSENC_RESCUE_DISK_BURN_PAGE && lw == IDC_DOWNLOAD_CD_BURN_SOFTWARE)
{
- if (bCheckboxPretest)
- EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), TRUE);
+ if (IsWindowsIsoBurnerAvailable())
+ LaunchWindowsIsoBurner (hwndDlg, szRescueDiskISO);
else
- EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), FALSE);
+ Applink ("isoburning");
+
+ return 1;
}
if ((nCurPageNo == SYSENC_WIPE_MODE_PAGE
|| nCurPageNo == NONSYS_INPLACE_ENC_WIPE_MODE_PAGE
|| nCurPageNo == DEVICE_WIPE_MODE_PAGE)
&& hw == CBN_SELCHANGE)
{
nWipeMode = (WipeAlgorithmId) SendMessage (GetDlgItem (hCurPage, IDC_WIPE_MODE),
CB_GETITEMDATA,
SendMessage (GetDlgItem (hCurPage, IDC_WIPE_MODE), CB_GETCURSEL, 0, 0),
@@ -6612,23 +6364,25 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
{
exit (1);
}
volTransformThreadFunction (hwndDlg);
exit (bOperationSuccess? 0 : 1);
}
SHGetFolderPath (NULL, CSIDL_MYDOCUMENTS, NULL, 0, szRescueDiskISO);
+ if (bSystemIsGPT)
+ StringCbCatW (szRescueDiskISO, sizeof(szRescueDiskISO), L"\\VeraCrypt Rescue Disk.zip");
+ else
+ StringCbCatW (szRescueDiskISO, sizeof(szRescueDiskISO), L"\\VeraCrypt Rescue Disk.iso");
- StringCbCatW (szRescueDiskISO, sizeof(szRescueDiskISO), L"\\VeraCrypt Rescue Disk.zip");
-
if (IsOSAtLeast (WIN_VISTA))
{
// Availability of in-place encryption (which is pre-selected by default whenever
// possible) makes partition-hosted volume creation safer.
bWarnDeviceFormatAdvanced = FALSE;
}
#ifdef _DEBUG
// For faster testing
StringCchCopyA (szVerify, ARRAYSIZE(szVerify), "q");
@@ -6898,53 +6652,55 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
{
// Keyboard layout is not standard US
WipePasswordsAndKeyfiles (true);
SetPassword (hCurPage, IDC_PASSWORD, szRawPassword);
SetPassword (hCurPage, IDC_VERIFY, szVerify);
keybLayout = (DWORD) LoadKeyboardLayout (L"00000409", KLF_ACTIVATE);
- // East Asian languages are not translated to US keyboard layout so we need to change keyboard layout
if (keybLayout != 0x00000409 && keybLayout != 0x04090409)
{
KillTimer (hwndDlg, TIMER_ID_KEYB_LAYOUT_GUARD);
Error ("CANT_CHANGE_KEYB_LAYOUT_FOR_SYS_ENCRYPTION", MainDlg);
EndMainDlg (MainDlg);
return 1;
}
-
+
bKeyboardLayoutChanged = TRUE;
+
wchar_t szTmp [4096];
StringCbCopyW (szTmp, sizeof(szTmp), GetString ("KEYB_LAYOUT_CHANGE_PREVENTED"));
StringCbCatW (szTmp, sizeof(szTmp), L"\n\n");
StringCbCatW (szTmp, sizeof(szTmp), GetString ("KEYB_LAYOUT_SYS_ENC_EXPLANATION"));
MessageBoxW (MainDlg, szTmp, lpszTitle, MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST);
+ }
- if (bKeyboardLayoutChanged && !bKeybLayoutAltKeyWarningShown)
- {
- if (GetAsyncKeyState (VK_RMENU) < 0)
- {
- bKeybLayoutAltKeyWarningShown = TRUE;
+ /* Watch the right Alt key (which is used to enter various characters on non-US keyboards) */
+ if (bKeyboardLayoutChanged && !bKeybLayoutAltKeyWarningShown)
+ {
+ if (GetAsyncKeyState (VK_RMENU) < 0)
+ {
+ bKeybLayoutAltKeyWarningShown = TRUE;
- wchar_t szTmp [4096];
- StringCbCopyW (szTmp, sizeof(szTmp), GetString ("ALT_KEY_CHARS_NOT_FOR_SYS_ENCRYPTION"));
- StringCbCatW (szTmp, sizeof(szTmp), L"\n\n");
- StringCbCatW (szTmp, sizeof(szTmp), GetString ("KEYB_LAYOUT_SYS_ENC_EXPLANATION"));
- MessageBoxW (MainDlg, szTmp, lpszTitle, MB_ICONINFORMATION | MB_SETFOREGROUND | MB_TOPMOST);
- }
+ wchar_t szTmp [4096];
+ StringCbCopyW (szTmp, sizeof(szTmp), GetString ("ALT_KEY_CHARS_NOT_FOR_SYS_ENCRYPTION"));
+ StringCbCatW (szTmp, sizeof(szTmp), L"\n\n");
+ StringCbCatW (szTmp, sizeof(szTmp), GetString ("KEYB_LAYOUT_SYS_ENC_EXPLANATION"));
+ MessageBoxW (MainDlg, szTmp, lpszTitle, MB_ICONINFORMATION | MB_SETFOREGROUND | MB_TOPMOST);
}
}
}
return 1;
+
case TIMER_ID_SYSENC_DRIVE_ANALYSIS_PROGRESS:
if (bSysEncDriveAnalysisInProgress)
{
UpdateProgressBarProc (GetTickCount() - SysEncDriveAnalysisStart);
if (GetTickCount() - SysEncDriveAnalysisStart > SYSENC_DRIVE_ANALYSIS_ETA)
{
// It's taking longer than expected -- reinit the progress bar
SysEncDriveAnalysisStart = GetTickCount ();
@@ -7251,34 +7007,21 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
EndMainDlg (hwndDlg);
return 1;
case WM_COMMAND:
if (lw == IDHELP)
{
- if (nCurPageNo == SYSENC_RESCUE_DISK_CREATION_PAGE ||
- nCurPageNo == SYSENC_RESCUE_DISK_BURN_PAGE ||
- nCurPageNo == SYSENC_RESCUE_DISK_VERIFIED_PAGE)
- {
- Applink("rescue");
- }
- else if (nCurPageNo == PASSWORD_PAGE)
- {
- Applink("passwords");
- }
- else
- {
- OpenPageHelp(hwndDlg, nCurPageNo);
- }
+ OpenPageHelp (hwndDlg, nCurPageNo);
return 1;
}
else if (lw == IDCANCEL)
{
PostMessage (hwndDlg, TC_APPMSG_FORMAT_USER_QUIT, 0, 0);
return 1;
}
else if (lw == IDC_NEXT)
{
if (nCurPageNo == INTRO_PAGE)
@@ -7333,21 +7076,21 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
else if (nCurPageNo == SYSENC_TYPE_PAGE)
{
if (bHiddenOS)
{
bWholeSysDrive = FALSE;
bHiddenVolDirect = FALSE;
}
if (!bHiddenOS)
- nNewPageNo = PASSWORD_PAGE - 1; // Skip irrelevant pages
+ nNewPageNo = SYSENC_SPAN_PAGE - 1; // Skip irrelevant pages
}
else if (nCurPageNo == SYSENC_HIDDEN_OS_REQ_CHECK_PAGE)
{
WaitCursor ();
try
{
BootEncObj->CheckRequirementsHiddenOS ();
if (CheckGapBetweenSysAndHiddenOS ())
Warning ("GAP_BETWEEN_SYS_AND_HIDDEN_OS_PARTITION", MainDlg);
@@ -7877,43 +7620,38 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
return 1;
}
}
if (!(bHiddenVolDirect && bHiddenVolHost))
nNewPageNo = PASSWORD_PAGE - 1;
}
else if (nCurPageNo == PASSWORD_PAGE)
{
- if (SysEncInEffect ())
- {
- wchar_t tmpPwd[MAX_PASSWORD + 1];
- GetWindowText (GetDlgItem (hCurPage, IDC_PASSWORD), tmpPwd, iMaxPasswordLength + 1);
- }
VerifyPasswordAndUpdate (hwndDlg, GetDlgItem (MainDlg, IDC_NEXT),
GetDlgItem (hCurPage, IDC_PASSWORD),
GetDlgItem (hCurPage, IDC_VERIFY),
volumePassword.Text,
szVerify,
KeyFilesEnable && FirstKeyFile!=NULL && !SysEncInEffect());
volumePassword.Length = (unsigned __int32) strlen ((char *) volumePassword.Text);
if (volumePassword.Length > 0)
{
// Password character encoding
if (SysEncInEffect () && !CheckPasswordCharEncoding (GetDlgItem (hCurPage, IDC_PASSWORD), NULL))
{
Error ("UNSUPPORTED_CHARS_IN_PWD", hwndDlg);
return 1;
}
- // Check password length (check also done for outer volume which is not the case in TrueCrypt).
+ // Check password length (check also done for outer volume which is not the case in TrueCrypt).
else if (!CheckPasswordLength (hwndDlg, volumePassword.Length, 0, SysEncInEffect(), SysEncInEffect()? hash_algo : 0, FALSE, FALSE))
{
return 1;
}
}
// Store the password in case we need to restore it after keyfile is applied to it
if (!GetPassword (hCurPage, IDC_PASSWORD, szRawPassword, iMaxPasswordLength + 1, FALSE, TRUE))
return 1;
@@ -7938,87 +7676,58 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
KillTimer (hwndDlg, TIMER_ID_KEYB_LAYOUT_GUARD);
if (bKeyboardLayoutChanged)
{
// Restore the original keyboard layout
if (LoadKeyboardLayout (OrigKeyboardLayout, KLF_ACTIVATE | KLF_SUBSTITUTE_OK) == NULL)
Warning ("CANNOT_RESTORE_KEYBOARD_LAYOUT", hwndDlg);
else
bKeyboardLayoutChanged = FALSE;
}
+
}
if (!PimEnable)
{
// PIM not activated. Skip PIM page
nNewPageNo = PIM_PAGE;
volumePim = 0;
if (!CreatingHiddenSysVol() && bHiddenVol && !bHiddenVolHost)
{
if ( (volumePim == outerVolumePim)
&& (volumePassword.Length == outerVolumePassword.Length)
&& (0 == memcmp (volumePassword.Text, outerVolumePassword.Text, volumePassword.Length))
)
{
Warning ("HIDDEN_CREDS_SAME_AS_OUTER", hwndDlg);
return 1;
}
}
+ if (SysEncInEffect ())
+ {
+ nNewPageNo = SYSENC_COLLECTING_RANDOM_DATA_PAGE - 1; // Skip irrelevant pages
+ }
+
if (bInPlaceEncNonSys)
{
nNewPageNo = NONSYS_INPLACE_ENC_RAND_DATA_PAGE - 1; // Skip irrelevant pages
}
else if (WizardMode != WIZARD_MODE_SYS_DEVICE
&& !FileSize4GBLimitQuestionNeeded ()
|| CreatingHiddenSysVol()) // If we're creating a hidden volume for a hidden OS, we don't need to format it with any filesystem (the entire OS will be copied to the hidden volume sector by sector).
{
nNewPageNo = FORMAT_PAGE - 1; // Skip irrelevant pages
}
}
-
-
- if (SysEncInEffect ())
- {
- if (PimEnable)
- nNewPageNo = PIM_PAGE - 1;
- else
- {
- nNewPageNo = SYSENC_RESCUE_DISK_CREATION_PAGE - 1; // Skip irrelevant pages
-
- wchar_t tmp[RANDPOOL_DISPLAY_SIZE + 1];
- if (!bInPlaceEncNonSys)
- {
- /* Generate master key and other related data (except the rescue disk) for system encryption. */
- try
- {
- WaitCursor();
- BootEncObj->PrepareInstallation(!bWholeSysDrive, volumePassword, nVolumeEA, FIRST_MODE_OF_OPERATION_ID, hash_algo, volumePim, L"");
- }
- catch (Exception &e)
- {
- e.Show(hwndDlg);
- NormalCursor();
- return 1;
- }
- }
- KillTimer(hwndDlg, TIMER_ID_RANDVIEW);
- // Attempt to wipe the GUI field showing portions of randpool
- wmemset(tmp, L'X', ARRAYSIZE(tmp));
- tmp[ARRAYSIZE(tmp) - 1] = 0;
- SetWindowText(hRandPoolSys, tmp);
- NormalCursor();
- }
-
- }
}
else if (nCurPageNo == PIM_PAGE)
{
volumePim = GetPim (hCurPage, IDC_PIM, 0);
if (!SysEncInEffect() && (volumePim > MAX_PIM_VALUE))
{
SetFocus (GetDlgItem(hCurPage, IDC_PIM));
Error ("PIM_TOO_BIG", hwndDlg);
@@ -8040,64 +7749,42 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if (volumePassword.Length > 0)
{
// Password character encoding
if (SysEncInEffect() && (volumePim > MAX_BOOT_PIM_VALUE))
{
SetFocus (GetDlgItem(hCurPage, IDC_PIM));
Error ("PIM_SYSENC_TOO_BIG", hwndDlg);
return 1;
}
// Check password length (check also done for outer volume which is not the case in TrueCrypt).
- else if (!CheckPasswordLength (hwndDlg, volumePassword.Length, volumePim, SysEncInEffect(), SysEncInEffect()? hash_algo : 0, FALSE, FALSE))
+ else if (!CheckPasswordLength (hwndDlg, volumePassword.Length, volumePim, SysEncInEffect(), SysEncInEffect()? hash_algo : 0, TRUE, FALSE))
{
return 1;
}
}
+ if (SysEncInEffect ())
+ {
+
+ nNewPageNo = SYSENC_COLLECTING_RANDOM_DATA_PAGE - 1; // Skip irrelevant pages
+ }
+
if (bInPlaceEncNonSys)
{
nNewPageNo = NONSYS_INPLACE_ENC_RAND_DATA_PAGE - 1; // Skip irrelevant pages
}
else if (WizardMode != WIZARD_MODE_SYS_DEVICE
&& !FileSize4GBLimitQuestionNeeded ()
|| CreatingHiddenSysVol()) // If we're creating a hidden volume for a hidden OS, we don't need to format it with any filesystem (the entire OS will be copied to the hidden volume sector by sector).
{
nNewPageNo = FORMAT_PAGE - 1; // Skip irrelevant pages
}
-
- if (SysEncInEffect ())
- {
- nNewPageNo = SYSENC_RESCUE_DISK_CREATION_PAGE - 1; // Skip irrelevant pages
-
- wchar_t tmp[RANDPOOL_DISPLAY_SIZE + 1];
- if (!bInPlaceEncNonSys)
- {
- /* Generate master key and other related data (except the rescue disk) for system encryption. */
- try
- {
- WaitCursor();
- BootEncObj->PrepareInstallation(!bWholeSysDrive, volumePassword, nVolumeEA, FIRST_MODE_OF_OPERATION_ID, hash_algo, volumePim, L"");
- }
- catch (Exception &e)
- {
- e.Show(hwndDlg);
- NormalCursor();
- return 1;
- }
- }
- KillTimer(hwndDlg, TIMER_ID_RANDVIEW);
- // Attempt to wipe the GUI field showing portions of randpool
- wmemset(tmp, L'X', ARRAYSIZE(tmp));
- tmp[ARRAYSIZE(tmp) - 1] = 0;
- SetWindowText(hRandPoolSys, tmp);
- NormalCursor();
- }
}
else if (nCurPageNo == HIDDEN_VOL_HOST_PASSWORD_PAGE
|| nCurPageNo == NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE)
{
WaitCursor ();
if (!GetPassword (hCurPage, IDC_PASSWORD_DIRECT, (char*) volumePassword.Text, iMaxPasswordLength + 1, FALSE, TRUE))
{
NormalCursor ();
@@ -9109,40 +8796,20 @@ ovf_end:
return 1;
}
else if (lw == IDC_PREV)
{
if (nCurPageNo == SYSENC_SPAN_PAGE)
{
// Skip irrelevant pages when going back
if (!bHiddenOS)
nNewPageNo = SYSENC_TYPE_PAGE + 1;
}
-
- if (nCurPageNo == SYSENC_RESCUE_DISK_CREATION_PAGE)
- {
- if (SysEncInEffect ())
- {
- nNewPageNo = (PimEnable? PIM_PAGE : PASSWORD_PAGE) + 1;
- }
- }
-
- if (nCurPageNo == SYSENC_RESCUE_DISK_BURN_PAGE)
- {
- nNewPageNo = SYSENC_RESCUE_DISK_BURN_PAGE + 1; // Stay on the same page
- Warning("RESCUE_DISK_BACK_BUTTON", hwndDlg);
- }
-
- if (nCurPageNo == SYSENC_PRETEST_RESULT_PAGE)
- {
- nNewPageNo = SYSENC_PRETEST_RESULT_PAGE + 1; // Stay on the same page
- }
-
if (nCurPageNo == SYSENC_MULTI_BOOT_MODE_PAGE)
{
// Skip the drive analysis page(s) or other irrelevant pages when going back
if (bHiddenOS)
nNewPageNo = SYSENC_HIDDEN_OS_REQ_CHECK_PAGE + 1;
else if (bWholeSysDrive)
nNewPageNo = SYSENC_PRE_DRIVE_ANALYSIS_PAGE + 1;
else
nNewPageNo = SYSENC_SPAN_PAGE + 1;
}
@@ -9254,24 +8921,21 @@ ovf_end:
szVerify,
KeyFilesEnable && FirstKeyFile!=NULL && !SysEncInEffect ());
volumePassword.Length = (unsigned __int32) strlen ((char *) volumePassword.Text);
nNewPageNo = SIZE_PAGE + 1; // Skip the hidden volume host password page
if (SysEncInEffect ())
{
- if (!bHiddenOS)
- nNewPageNo = SYSENC_TYPE_PAGE + 1; // Skip irrelevant pages
- else
- nNewPageNo = CIPHER_PAGE + 1; // Skip irrelevant pages
+ nNewPageNo = CIPHER_PAGE + 1; // Skip irrelevant pages
KillTimer (hwndDlg, TIMER_ID_KEYB_LAYOUT_GUARD);
if (bKeyboardLayoutChanged)
{
// Restore the original keyboard layout
if (LoadKeyboardLayout (OrigKeyboardLayout, KLF_ACTIVATE | KLF_SUBSTITUTE_OK) == NULL)
Warning ("CANNOT_RESTORE_KEYBOARD_LAYOUT", hwndDlg);
else
bKeyboardLayoutChanged = FALSE;
@@ -10960,519 +10624,10 @@ static DWORD GetFormatSectorSize ()
DISK_GEOMETRY_EX geometry;
if (!GetDriveGeometry (szDiskFile, &geometry))
{
handleWin32Error (MainDlg, SRC_POS);
AbortProcessSilent();
}
return geometry.Geometry.BytesPerSector;
}
-
-/* This function is called when advanced dialog in intro page is open */
-BOOL CALLBACK AdvanceDlgProcIntro (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- WORD lw = LOWORD(wParam);
-
- switch (msg)
- {
- case WM_INITDIALOG:
-
- bHiddenVolHost = bHiddenVol = bHiddenOS;
-
- SendMessage (GetDlgItem (hwndDlg, IDC_SYSENC_HIDDEN), WM_SETFONT, (WPARAM) hUserBoldFont, (LPARAM) TRUE);
- SendMessage (GetDlgItem (hwndDlg, IDC_SYSENC_NORMAL), WM_SETFONT, (WPARAM) hUserBoldFont, (LPARAM) TRUE);
-
- CheckButton (GetDlgItem (hwndDlg, bHiddenOS ? IDC_SYSENC_HIDDEN : IDC_SYSENC_NORMAL));
-
- return 1;
- case WM_COMMAND:
- {
- if (lw == IDCANCEL)
- {
- EndDialog(hwndDlg, lw);
- return 1;
- }
-
- if(lw == IDOK)
- {
- if (bHiddenOS)
- {
- bWholeSysDrive = FALSE;
- bHiddenVolDirect = FALSE;
- }
- EndDialog(hwndDlg, lw);
- return 1;
- }
-
- if (lw == IDC_SYSENC_HIDDEN)
- {
- SendMessage (GetDlgItem (hwndDlg, IDC_SYSENC_NORMAL), BM_SETCHECK, BST_UNCHECKED, 0);
-
- bHiddenOS = TRUE;
- bHiddenVol = TRUE;
- bHiddenVolHost = TRUE;
- return 1;
- }
-
- if (lw == IDC_SYSENC_NORMAL)
- {
- SendMessage (GetDlgItem (hwndDlg, IDC_SYSENC_HIDDEN), BM_SETCHECK, BST_UNCHECKED, 0);
-
- bHiddenOS = FALSE;
- bHiddenVol = FALSE;
- bHiddenVolHost = FALSE;
- return 1;
- }
-
- if(lw == IDHELP)
- {
- Applink ("hiddensysenc");
- return 1;
- }
- }
- }
- return 0;
-}
-
-/* AES, HASH, Pim and Wipe mode can be selected here */
-BOOL CALLBACK AdvanceDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- WORD lw = LOWORD(wParam);
- WORD hw = HIWORD(wParam);
- int ea, hid;
- wchar_t buf[100];
- BOOL bNTFSallowed = FALSE;
- BOOL bFATallowed = FALSE;
- BOOL bEXFATallowed = FALSE;
- BOOL bReFSallowed = FALSE;
- BOOL bNoFSallowed = FALSE;
- hCurPage = hwndDlg;
-
- switch (msg)
- {
- case WM_INITDIALOG:
- {
- SetWindowTextW ( GetDlgItem (hwndDlg, IDT_IMPORTANT_NOTE), GetString ("ADV_FEATURES_NOTE"));
- SetWindowTextW ( GetDlgItem (hwndDlg, IDT_PIM_INFO), GetString ("PIM_INFO"));
- SetWindowTextW ( GetDlgItem (hwndDlg, IDT_WIPE_INFO), GetString ("WIPE_INFO"));
-
- /* Encryption algorithms */
-
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_BOX), CB_RESETCONTENT, 0, 0);
-
- for (ea = EAGetFirst (); ea != 0; ea = EAGetNext (ea))
- {
- if (EAIsFormatEnabled (ea) && (!SysEncInEffect () || bSystemIsGPT || EAIsMbrSysEncEnabled (ea)))
- AddComboPair (GetDlgItem (hwndDlg, IDC_COMBO_BOX), EAGetName (buf, ARRAYSIZE(buf), ea, 1), ea);
- }
-
- SelectAlgo (GetDlgItem (hwndDlg, IDC_COMBO_BOX), &nVolumeEA);
- ComboSelChangeEA (hwndDlg);
- SetFocus (GetDlgItem (hwndDlg, IDC_COMBO_BOX));
-
- /* Hash algorithms */
- if (SysEncInEffect())
- {
- RandSetHashFunction(hash_algo);
- for (hid = FIRST_PRF_ID; hid <= LAST_PRF_ID; hid++)
- {
- // Use blake2s for hashing
- if (((hid == BLAKE2S) || !HashIsDeprecated(hid)) && (bSystemIsGPT || HashForSystemEncryption(hid)))
- AddComboPair(GetDlgItem(hwndDlg, IDC_COMBO_BOX_HASH_ALGO), HashGetName(hid), hid);
- }
- }
- else
- {
- hash_algo = RandGetHashFunction();
- for (hid = FIRST_PRF_ID; hid <= LAST_PRF_ID; hid++)
- {
- if (!HashIsDeprecated(hid))
- AddComboPair(GetDlgItem(hwndDlg, IDC_COMBO_BOX_HASH_ALGO), HashGetName(hid), hid);
- }
- }
-
- if (CreatingHiddenSysVol())
- Warning ("HIDDEN_OS_PRE_CIPHER_WARNING", MainDlg);
-
- SetWindowText(GetDlgItem(hwndDlg, IDC_SHA512_HELP), GetString("SHA512_HELP"));
- SelectAlgo(GetDlgItem(hwndDlg, IDC_COMBO_BOX_HASH_ALGO), &hash_algo);
-
- /* file system options */
- SetTimer(GetParent(hwndDlg), TIMER_ID_RANDVIEW, TIMER_INTERVAL_RANDVIEW, NULL);
-
- hMasterKey = GetDlgItem(hwndDlg, IDC_DISK_KEY);
- hHeaderKey = GetDlgItem(hwndDlg, IDC_HEADER_KEY);
- hRandPool = GetDlgItem(hwndDlg, IDC_RANDOM_BYTES);
-
- SendMessage(GetDlgItem(hwndDlg, IDC_RANDOM_BYTES), WM_SETFONT, (WPARAM)hFixedDigitFont, (LPARAM)TRUE);
- SendMessage(GetDlgItem(hwndDlg, IDC_DISK_KEY), WM_SETFONT, (WPARAM)hFixedDigitFont, (LPARAM)TRUE);
- SendMessage(GetDlgItem(hwndDlg, IDC_HEADER_KEY), WM_SETFONT, (WPARAM)hFixedDigitFont, (LPARAM)TRUE);
-
- /* Quick/Dynamic */
-
- if (bHiddenVol)
- {
- quickFormat = !bHiddenVolHost;
- dynamicFormat = FALSE;
- bSparseFileSwitch = FALSE;
- }
- else
- {
- if (bDevice)
- {
- dynamicFormat = FALSE;
- bSparseFileSwitch = FALSE;
- }
- else
- {
- wchar_t root[TC_MAX_PATH];
- DWORD fileSystemFlags = 0;
-
- /* Check if the host file system supports sparse files */
-
- if (GetVolumePathName (szFileName, root, array_capacity (root)))
- {
- GetVolumeInformation (root, NULL, 0, NULL, NULL, &fileSystemFlags, NULL, 0);
- bSparseFileSwitch = fileSystemFlags & FILE_SUPPORTS_SPARSE_FILES;
- }
- else
- bSparseFileSwitch = FALSE;
- if (!bSparseFileSwitch)
- {
- dynamicFormat = FALSE;
- }
- }
- }
- SendMessage (GetDlgItem (hwndDlg, IDC_SHOW_KEYS), BM_SETCHECK, showKeys ? BST_CHECKED : BST_UNCHECKED, 0);
- SetWindowText (GetDlgItem (hwndDlg, IDC_RANDOM_BYTES), showKeys ? L"" : L"******************************** ");
- SetWindowText (GetDlgItem (hwndDlg, IDC_HEADER_KEY), showKeys ? L"" : L"******************************** ");
- SetWindowText (GetDlgItem (hwndDlg, IDC_DISK_KEY), showKeys ? L"" : L"******************************** ");
-
- SendMessage(GetDlgItem(hwndDlg, IDC_CLUSTERSIZE), CB_RESETCONTENT, 0, 0);
- AddComboPairW(GetDlgItem(hwndDlg, IDC_CLUSTERSIZE), GetString("DEFAULT"), 0);
- SendMessage(GetDlgItem(hwndDlg, IDC_CLUSTERSIZE), CB_SETCURSEL, 0, 0);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CLUSTERSIZE), TRUE);
-
- /* Filesystems */
- bNTFSallowed = FALSE;
- bFATallowed = FALSE;
- bEXFATallowed = FALSE;
- bReFSallowed = FALSE;
- bNoFSallowed = FALSE;
-
- SendMessage(GetDlgItem(hwndDlg, IDC_FILESYS), CB_RESETCONTENT, 0, 0);
- EnableWindow(GetDlgItem(hwndDlg, IDC_FILESYS), TRUE);
-
- uint64 dataAreaSize = GetVolumeDataAreaSize (bHiddenVol && !bHiddenVolHost, nVolumeSize);
-
- if (!CreatingHiddenSysVol())
- {
- if (dataAreaSize >= TC_MIN_NTFS_FS_SIZE && dataAreaSize <= TC_MAX_NTFS_FS_SIZE)
- {
- AddComboPair (GetDlgItem (hwndDlg, IDC_FILESYS), L"NTFS", FILESYS_NTFS);
- bNTFSallowed = TRUE;
- }
-
- if (dataAreaSize >= TC_MIN_FAT_FS_SIZE && dataAreaSize <= TC_MAX_FAT_SECTOR_COUNT * GetFormatSectorSize())
- {
- AddComboPair (GetDlgItem (hwndDlg, IDC_FILESYS), L"FAT", FILESYS_FAT);
- bFATallowed = TRUE;
- }
-
- //exFAT support added starting from Vista SP1
- if (IsOSVersionAtLeast (WIN_VISTA, 1) && dataAreaSize >= TC_MIN_EXFAT_FS_SIZE && dataAreaSize <= TC_MAX_EXFAT_FS_SIZE)
- {
- AddComboPair (GetDlgItem (hwndDlg, IDC_FILESYS), L"exFAT", FILESYS_EXFAT);
- bEXFATallowed = TRUE;
- }
-
- //ReFS write support activated by default starting from Windows 10
- //We don't support it yet for the creation of hidden volumes
- if ((!bHiddenVolHost) && IsOSVersionAtLeast (WIN_10, 0) && dataAreaSize >= TC_MIN_REFS_FS_SIZE && dataAreaSize <= TC_MAX_REFS_FS_SIZE)
- {
- AddComboPair (GetDlgItem (hwndDlg, IDC_FILESYS), L"ReFS", FILESYS_REFS);
- bReFSallowed = TRUE;
- }
- }
- else
- {
- // We're creating a hidden volume for a hidden OS, so we don't need to format it with
- // any filesystem (the entire OS will be copied to the hidden volume sector by sector).
- EnableWindow (GetDlgItem (hwndDlg, IDC_FILESYS), FALSE);
- EnableWindow (GetDlgItem (hwndDlg, IDC_CLUSTERSIZE), FALSE);
- }
- if (!bHiddenVolHost)
- {
- AddComboPairW(GetDlgItem(hwndDlg, IDC_FILESYS), GetString("NONE"), FILESYS_NONE);
- bNoFSallowed = TRUE;
- }
- if (fileSystem == FILESYS_NONE) // If no file system has been previously selected
- {
- // Set default file system
-
- if (bFATallowed && !(nNeedToStoreFilesOver4GB == 1 && (bNTFSallowed || bEXFATallowed || bReFSallowed)))
- fileSystem = FILESYS_FAT;
- else if (bEXFATallowed)
- fileSystem = FILESYS_EXFAT;
- else if (bNTFSallowed)
- fileSystem = FILESYS_NTFS;
- else if (bReFSallowed)
- fileSystem = FILESYS_REFS;
- else if (bNoFSallowed)
- fileSystem = FILESYS_NONE;
- else
- {
- AddComboPair (GetDlgItem (hwndDlg, IDC_FILESYS), L"---", 0);
- }
- }
-
- SendMessage(GetDlgItem(hwndDlg, IDC_FILESYS), CB_SETCURSEL, 0, 0);
- SelectAlgo(GetDlgItem(hwndDlg, IDC_FILESYS), (int *)&fileSystem);
-
- /* PIM and Wipe mode */
- SetCheckBox(hwndDlg, IDC_PIM_ENABLE, PimEnable);
-
- PopulateWipeModeCombo(GetDlgItem(hwndDlg, IDC_WIPE_MODE),
- SystemEncryptionStatus == SYSENC_STATUS_DECRYPTING && !bInPlaceEncNonSys,
- TRUE,
- FALSE);
- SelectAlgo(GetDlgItem(hwndDlg, IDC_WIPE_MODE), (int *)&nWipeMode);
- SetFocus(GetDlgItem(GetParent(hwndDlg), IDOK));
- }
- return 1;
- case WM_COMMAND:
- if (lw == IDCANCEL)
- {
- EndDialog(hwndDlg, lw);
- return 1;
- }
- if (lw == IDOK)
- {
- /* Save hash and encryption algo */
- LPARAM nIndex;
- nIndex = SendMessage (GetDlgItem (hCurPage, IDC_COMBO_BOX), CB_GETCURSEL, 0, 0);
- nVolumeEA = (int) SendMessage (GetDlgItem (hCurPage, IDC_COMBO_BOX), CB_GETITEMDATA, nIndex, 0);
-
- if (!bSystemIsGPT && SysEncInEffect ()
- && EAGetCipherCount (nVolumeEA) > 1) // Cascade?
- {
- if (AskWarnNoYes ("CONFIRM_CASCADE_FOR_SYS_ENCRYPTION", hwndDlg) == IDNO)
- return 1;
-
- if (!bHiddenOS)
- Info ("NOTE_CASCADE_FOR_SYS_ENCRYPTION", hwndDlg);
- }
-
- nIndex = SendMessage (GetDlgItem (hCurPage, IDC_COMBO_BOX_HASH_ALGO), CB_GETCURSEL, 0, 0);
- hash_algo = (int) SendMessage (GetDlgItem (hCurPage, IDC_COMBO_BOX_HASH_ALGO), CB_GETITEMDATA, nIndex, 0);
-
- RandSetHashFunction (hash_algo);
-
- /* Save PIM and Wipe mode */
- nWipeMode = (WipeAlgorithmId)SendMessage(GetDlgItem(hwndDlg, IDC_WIPE_MODE),
- CB_GETITEMDATA,
- SendMessage(GetDlgItem(hwndDlg, IDC_WIPE_MODE), CB_GETCURSEL, 0, 0),
- 0);
-
- PimEnable = GetCheckBox(hwndDlg, IDC_PIM_ENABLE);
- SetCheckBox(hwndDlg, IDC_PIM_ENABLE, PimEnable);
-
- EndDialog(hwndDlg, lw);
- return 1;
- }
- if (lw == IDC_CIPHER_TEST)
- {
- LPARAM nIndex;
- int c;
-
- nIndex = SendMessage (GetDlgItem (hCurPage, IDC_COMBO_BOX), CB_GETCURSEL, 0, 0);
- nVolumeEA = (int) SendMessage (GetDlgItem (hCurPage, IDC_COMBO_BOX), CB_GETITEMDATA, nIndex, 0);
-
- for (c = EAGetLastCipher (nVolumeEA); c != 0; c = EAGetPreviousCipher (nVolumeEA, c))
- {
- DialogBoxParamW (hInst, MAKEINTRESOURCEW (IDD_CIPHER_TEST_DLG),
- GetParent (hwndDlg), (DLGPROC) CipherTestDialogProc, (LPARAM) c);
- }
-
- return 1;
- }
-
- if (lw == IDC_BENCHMARK)
- {
- // Reduce CPU load
- bFastPollEnabled = FALSE;
- bRandmixEnabled = FALSE;
-
- DialogBoxParamW (hInst,
- MAKEINTRESOURCEW (IDD_BENCHMARK_DLG), hwndDlg,
- (DLGPROC) BenchmarkDlgProc, (LPARAM) bSystemIsGPT);
-
- bFastPollEnabled = TRUE;
- bRandmixEnabled = TRUE;
- return 1;
- }
-
- if (lw == IDC_WIPE_MODE && hw == CBN_SELCHANGE)
- {
- Warning ("WIPE_WARNING", hwndDlg);
- return 1;
- }
-
- if (hw == CBN_SELCHANGE && lw == IDC_COMBO_BOX)
- {
- ComboSelChangeEA (hwndDlg);
- SetWindowTextW (GetDlgItem (hCurPage, IDC_BENCHMARK), GetString ("IDC_BENCHMARK"));
- return 1;
- }
-
- if (hw == CBN_SELCHANGE && lw == IDC_COMBO_BOX_HASH_ALGO)
- {
- ShowWindow (GetDlgItem (hwndDlg, IDT_HASH_ALGO), SW_SHOW);
- if (SysEncInEffect())
- {
- HWND hHashAlgoItem = GetDlgItem (hCurPage, IDC_COMBO_BOX_HASH_ALGO);
- int selectedAlgo = (int)SendMessage (hHashAlgoItem, CB_GETITEMDATA, SendMessage (hHashAlgoItem, CB_GETCURSEL, 0, 0), 0);
-
- if (!bSystemIsGPT && !HashForSystemEncryption (selectedAlgo))
- {
- hash_algo = DEFAULT_HASH_ALGORITHM_BOOT;
- RandSetHashFunction (DEFAULT_HASH_ALGORITHM_BOOT);
- Info ("ALGO_NOT_SUPPORTED_FOR_SYS_ENCRYPTION", MainDlg);
- SelectAlgo (GetDlgItem (hCurPage, IDC_COMBO_BOX_HASH_ALGO), &hash_algo);
- }
- }
- return 1;
- }
-
- if (lw == IDC_PIM_ENABLE)
- {
- PimEnable = GetCheckBox (hwndDlg, IDC_PIM_ENABLE);
- if (!PimEnable)
- volumePim = 0;
- return 1;
- }
- }
- return 0;
-}
-
-void
-AddComboPairW (HWND hComboBox, const wchar_t *lpszItem, int value)
-{
- LPARAM nIndex;
- nIndex = SendMessageW(hComboBox, CB_ADDSTRING, 0, (LPARAM)lpszItem);
- nIndex = SendMessage(hComboBox, CB_SETITEMDATA, nIndex, (LPARAM)value);
-}
-
-/* Acording to NIST, only a blacklist check and at least 8 character should be compulsary, no special character check... */
-int PrintStrongness (char input[], unsigned int length)
-{
- unsigned int n = length;
- int iReturnValue = 0;
- if (n < 10)
- {
- burn (input, sizeof(input));
- return iReturnValue = weak;
- }
- else if (CheckWord(input))
- {
- burn (input, sizeof(input));
- return iReturnValue = weak;
- }
- //Tetermine the strength of the passsord
- if ((n >= 13))
- {
- iReturnValue = very_strong;
- }
- //if 3 out of 4 paramters are true
- else if (n >= 10)
- {
- iReturnValue = strong;
- }
- //if 2 out of 4 values are true
- else if (n >= 8)
- {
- iReturnValue = medium;
- }
- else
- {
- iReturnValue = weak;
- }
- burn (input, sizeof(input));
- return iReturnValue;
-}
-
-/* Check if password is in list
-Credits go Martin York from https://codereview.stackexchange.com/questions/52702/how-to-search-for-a-word-in-a-sorted-text-file-efficiently */
-BOOL CheckWord (char* search)
-{
-
- bool isWordInDict(std::string const& word);
- {
- struct MyDict : std::set<std::string>
- {
- typedef std::set<std::string>::const_iterator const_iterator;
- MyDict()
- {
- wchar_t path[TC_MAX_PATH];
- wchar_t tmp[TC_MAX_PATH];
- wchar_t destFileName[TC_MAX_PATH] = L"password1000000.txt";
-
- if (GetModuleFileName (NULL, path, ARRAYSIZE (path)) == 0)
- {
- Error ("ERROR_GETTING_PATH", MainDlg);
- }
-
- StringCbCopyW(tmp, ARRAYSIZE(tmp), path);
-
- //detects the last '\' in order to remove the name of the exe file. Afterwards add .txt file in the path
- for (int i = wcslen(path); i > 1; i--)
- {
- if (tmp[i] == '\\')
- {
- for(unsigned int j = i + 1; j < wcslen(path); j++)
- {
- tmp[j] = '\0';
- }
- break;
- }
- }
- StringCbCatW(tmp, sizeof(tmp), destFileName);
-
- std::ifstream fin(tmp);
- std::copy(std::istream_iterator<std::string>(fin), std::istream_iterator<std::string>(),
- std::inserter(*this, end()));
- }
- };
- static const MyDict dict;
- MyDict::const_iterator find = dict.find(search);
-
- return find != dict.end();
- }
-}
-
-/* Credits go to Barmak Shemirani from https://stackoverflow.com/questions/31407492/c-tooltip-function-for-checkbox */
-void CreateToolTip(HWND hWndParent, HWND hControlItem, PTSTR pszText)
-{
- if (!hControlItem || !hWndParent || !pszText)
- return;
-
- HWND hwndTip = CreateWindowEx(NULL, TOOLTIPS_CLASS, NULL,
- WS_POPUP | TTS_NOFADE | TTS_ALWAYSTIP /*| TTS_BALLOON*/,
- CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
- hWndParent, NULL, GetModuleHandle(NULL), NULL);
-
- if (!hwndTip)
- return;
-
- TOOLINFO toolInfo = { 0 };
- toolInfo.cbSize = sizeof(toolInfo);
- toolInfo.hwnd = hWndParent;
- toolInfo.uFlags = TTF_IDISHWND | TTF_SUBCLASS;
- toolInfo.uId = (UINT_PTR)hControlItem;
- toolInfo.lpszText = pszText;
- GetClientRect(hWndParent, &toolInfo.rect);
- if (!SendMessage(hwndTip, TTM_ADDTOOL, 0, (LPARAM)&toolInfo))
- {
- MessageBox(0, TEXT("TTM_ADDTOOL failed\nWrong project manifest!"), 0, 0);
- }
-}
diff --git a/src/Format/Tcformat.h b/src/Format/Tcformat.h
index a8237521..f9328afd 100644
--- a/src/Format/Tcformat.h
+++ b/src/Format/Tcformat.h
@@ -97,21 +97,13 @@ extern volatile BOOL bInPlaceDecNonSys;
extern __int64 NonSysInplaceEncBytesDone;
extern __int64 NonSysInplaceEncTotalSize;
extern int nPbar;
extern volatile int WizardMode;
extern volatile BOOL bInPlaceEncNonSysResumed;
extern wchar_t HeaderKeyGUIView [KEY_GUI_VIEW_SIZE];
extern wchar_t MasterKeyGUIView [KEY_GUI_VIEW_SIZE];
extern volatile int NonSysInplaceEncStatus;
-BOOL CALLBACK AdvanceDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-BOOL CALLBACK FinishDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-void AddComboPairW (HWND hComboBox, const wchar_t *lpszItem, int value);
-int PrintStrongness (char* input, unsigned int length);
-BOOL CheckWord (char search[]);
-BOOL CALLBACK AdvanceDlgProcIntro (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-void CreateToolTip (HWND hWndParent, HWND hControlItem, PTSTR pszText);
-
#ifdef __cplusplus
}
#endif
diff --git a/src/Release/Setup Files/Product64.wxs b/src/Release/Setup Files/Product64.wxs
index 2f43edd1..e20fd1dc 100644
--- a/src/Release/Setup Files/Product64.wxs
+++ b/src/Release/Setup Files/Product64.wxs
@@ -860,20 +860,23 @@
</Component>
<Component Id="cmpB313B00E647A121B2CBE47F3048A18A7" Guid="{5985576D-6F6C-4D96-9B3E-9E0961CF9FAF}">
<File Id="fil2EB5F87C05CCC55D3964D595C85EF19E" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Release Notes.html" DiskId="1" />
</Component>
<Component Id="cmp400428F6494DE58618E3B92539548C39" Guid="{0A1869ED-25F1-4430-97A5-4C6EA8CDA7FC}">
<File Id="filEDEDEF956F04F36B4163989F9AB9285F" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Removable Medium Volume.html" DiskId="1" />
</Component>
<Component Id="cmpFB2313AB16EF2467366ED136C0E61CE6" Guid="{CFEC9559-9F85-46C6-9E98-AEBB573B96FE}">
<File Id="filE496203C4727FDF47F8352CB9722A8C7" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Removing Encryption.html" DiskId="1" />
</Component>
+ <Component Id="cmp960F36632D3FB602421D1195E4EB6FE1" Guid="{321F49A5-8A1B-4881-A32D-12EDA99D1B85}">
+ <File Id="fil324009D5856BF4C5270D40F1EC4110EB" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\RIPEMD-160.html" DiskId="1" />
+ </Component>
<Component Id="cmpB4C7B1A7A3EC0CB2DE805AC5CC5FC0D7" Guid="{4534E8B2-114E-4173-AE3E-75E0D96EB573}">
<File Id="fil8CFD1CFDCBE261B6F91D9E587F8720C0" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Security Model.html" DiskId="1" />
</Component>
<Component Id="cmp00540BF93A805E0B9996945B61E1BC2F" Guid="{1D5B7A85-87F3-45AF-9C09-BA7E088A835D}">
<File Id="filA7A29851126AC571C090BB0FBEE83CB5" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Security Requirements and Precautions.html" DiskId="1" />
</Component>
<Component Id="cmp4C46C6668AD830D543AFE593D51676B3" Guid="{4CD21E9D-243F-4A58-A535-AA8EF9D2BFD1}">
<File Id="fil440C5158A3CD96689918C976DC917325" KeyPath="yes" Source="$(sys.CURRENTDIR)\docs\html\en\Security Requirements for Hidden Volumes.html" DiskId="1" />
</Component>
<Component Id="cmp6EE914124966E3A0F695359116413DD4" Guid="{724FA79D-49BC-4075-ABF4-0C318AE39855}">
@@ -1373,20 +1376,21 @@
<ComponentRef Id="cmpF36A771DF9B1C4CD8E82C08A6D3D0786" />
<ComponentRef Id="cmp63F6A68C5538B45661168554BC3B93D1" />
<ComponentRef Id="cmp0158A6D8BED6391AC7150B6C6AE2A9F9" />
<ComponentRef Id="cmpDE45667E9E3CD9F800EAC1E02B57AAB7" />
<ComponentRef Id="cmp632453049391BAACDD117A40EC442743" />
<ComponentRef Id="cmpCE16E453CAD75A461B4FEBF451A51B7B" />
<ComponentRef Id="cmpC741D187A28A87BD33866C9AC09A1298" />
<ComponentRef Id="cmpB313B00E647A121B2CBE47F3048A18A7" />
<ComponentRef Id="cmp400428F6494DE58618E3B92539548C39" />
<ComponentRef Id="cmpFB2313AB16EF2467366ED136C0E61CE6" />
+ <ComponentRef Id="cmp960F36632D3FB602421D1195E4EB6FE1" />
<ComponentRef Id="cmpB4C7B1A7A3EC0CB2DE805AC5CC5FC0D7" />
<ComponentRef Id="cmp00540BF93A805E0B9996945B61E1BC2F" />
<ComponentRef Id="cmp4C46C6668AD830D543AFE593D51676B3" />
<ComponentRef Id="cmp6EE914124966E3A0F695359116413DD4" />
<ComponentRef Id="cmp28E29B4CA17AB51913B756CD9397EEFE" />
<ComponentRef Id="cmp5DF24509F284FABC600232197F803DE5" />
<ComponentRef Id="cmp09E31B885345FBEA1F473AF7A10FD88D" />
<ComponentRef Id="cmpAE05C79A35A43ECCAC995A711DC4D60B" />
<ComponentRef Id="cmpB6D91209A93313D08150643F1738DED8" />
<ComponentRef Id="cmpDB66E821EC13977824FB1069DF5DAA69" />
@@ -1695,11 +1699,11 @@
<!-- Set the ARP -->
<Custom Action="SetARPINSTALLLOCATION" After="InstallValidate"></Custom>
<!-- ScheduleReboot only after DoChecks, which sets ISREBOOTREQUIRED -->
<ScheduleReboot After="DoChecks">ISREBOOTREQUIRED = "1"</ScheduleReboot>
</InstallExecuteSequence>
</Product>
-</Wix>
+</Wix> \ No newline at end of file
diff --git a/src/Release/Setup Files/password1000000.txt b/src/Release/Setup Files/password1000000.txt
deleted file mode 100644
index e6e50bf5..00000000
--- a/src/Release/Setup Files/password1000000.txt
+++ /dev/null
@@ -1,999999 +0,0 @@
-123456
-password
-12345678
-qwerty
-123456789
-12345
-1234
-111111
-1234567
-dragon
-123123
-baseball
-abc123
-football
-monkey
-letmein
-696969
-shadow
-master
-666666
-qwertyuiop
-123321
-mustang
-1234567890
-michael
-654321
-pussy
-superman
-1qaz2wsx
-7777777
-fuckyou
-121212
-000000
-qazwsx
-123qwe
-killer
-trustno1
-jordan
-jennifer
-zxcvbnm
-asdfgh
-hunter
-buster
-soccer
-harley
-batman
-andrew
-tigger
-sunshine
-iloveyou
-fuckme
-2000
-charlie
-robert
-thomas
-hockey
-ranger
-daniel
-starwars
-klaster
-112233
-george
-asshole
-computer
-michelle
-jessica
-pepper
-1111
-zxcvbn
-555555
-11111111
-131313
-freedom
-777777
-pass
-fuck
-maggie
-159753
-aaaaaa
-ginger
-princess
-joshua
-cheese
-amanda
-summer
-love
-ashley
-6969
-nicole
-chelsea
-biteme
-matthew
-access
-yankees
-987654321
-dallas
-austin
-thunder
-taylor
-matrix
-william
-corvette
-hello
-martin
-heather
-secret
-fucker
-merlin
-diamond
-1234qwer
-gfhjkm
-hammer
-silver
-222222
-88888888
-anthony
-justin
-test
-bailey
-q1w2e3r4t5
-patrick
-internet
-scooter
-orange
-11111
-golfer
-cookie
-richard
-samantha
-bigdog
-guitar
-jackson
-whatever
-mickey
-chicken
-sparky
-snoopy
-maverick
-phoenix
-camaro
-sexy
-peanut
-morgan
-welcome
-falcon
-cowboy
-ferrari
-samsung
-andrea
-smokey
-steelers
-joseph
-mercedes
-dakota
-arsenal
-eagles
-melissa
-boomer
-booboo
-spider
-nascar
-monster
-tigers
-yellow
-xxxxxx
-123123123
-gateway
-marina
-diablo
-bulldog
-qwer1234
-compaq
-purple
-hardcore
-banana
-junior
-hannah
-123654
-porsche
-lakers
-iceman
-money
-cowboys
-987654
-london
-tennis
-999999
-ncc1701
-coffee
-scooby
-0000
-miller
-boston
-q1w2e3r4
-fuckoff
-brandon
-yamaha
-chester
-mother
-forever
-johnny
-edward
-333333
-oliver
-redsox
-player
-nikita
-knight
-fender
-barney
-midnight
-please
-brandy
-chicago
-badboy
-iwantu
-slayer
-rangers
-charles
-angel
-flower
-bigdaddy
-rabbit
-wizard
-bigdick
-jasper
-enter
-rachel
-chris
-steven
-winner
-adidas
-victoria
-natasha
-1q2w3e4r
-jasmine
-winter
-prince
-panties
-marine
-ghbdtn
-fishing
-cocacola
-casper
-james
-232323
-raiders
-888888
-marlboro
-gandalf
-asdfasdf
-crystal
-87654321
-12344321
-sexsex
-golden
-blowme
-bigtits
-8675309
-panther
-lauren
-angela
-bitch
-spanky
-thx1138
-angels
-madison
-winston
-shannon
-mike
-toyota
-blowjob
-jordan23
-canada
-sophie
-Password
-apples
-dick
-tiger
-razz
-123abc
-pokemon
-qazxsw
-55555
-qwaszx
-muffin
-johnson
-murphy
-cooper
-jonathan
-liverpoo
-david
-danielle
-159357
-jackie
-1990
-123456a
-789456
-turtle
-horny
-abcd1234
-scorpion
-qazwsxedc
-101010
-butter
-carlos
-password1
-dennis
-slipknot
-qwerty123
-booger
-asdf
-1991
-black
-startrek
-12341234
-cameron
-newyork
-rainbow
-nathan
-john
-1992
-rocket
-viking
-redskins
-butthead
-asdfghjkl
-1212
-sierra
-peaches
-gemini
-doctor
-wilson
-sandra
-helpme
-qwertyui
-victor
-florida
-dolphin
-pookie
-captain
-tucker
-blue
-liverpool
-theman
-bandit
-dolphins
-maddog
-packers
-jaguar
-lovers
-nicholas
-united
-tiffany
-maxwell
-zzzzzz
-nirvana
-jeremy
-suckit
-stupid
-porn
-monica
-elephant
-giants
-jackass
-hotdog
-rosebud
-success
-debbie
-mountain
-444444
-xxxxxxxx
-warrior
-1q2w3e4r5t
-q1w2e3
-123456q
-albert
-metallic
-lucky
-azerty
-7777
-shithead
-alex
-bond007
-alexis
-1111111
-samson
-5150
-willie
-scorpio
-bonnie
-gators
-benjamin
-voodoo
-driver
-dexter
-2112
-jason
-calvin
-freddy
-212121
-creative
-12345a
-sydney
-rush2112
-1989
-asdfghjk
-red123
-bubba
-4815162342
-passw0rd
-trouble
-gunner
-happy
-fucking
-gordon
-legend
-jessie
-stella
-qwert
-eminem
-arthur
-apple
-nissan
-bullshit
-bear
-america
-1qazxsw2
-nothing
-parker
-4444
-rebecca
-qweqwe
-garfield
-01012011
-beavis
-69696969
-jack
-asdasd
-december
-2222
-102030
-252525
-11223344
-magic
-apollo
-skippy
-315475
-girls
-kitten
-golf
-copper
-braves
-shelby
-godzilla
-beaver
-fred
-tomcat
-august
-buddy
-airborne
-1993
-1988
-lifehack
-qqqqqq
-brooklyn
-animal
-platinum
-phantom
-online
-xavier
-darkness
-blink182
-power
-fish
-green
-789456123
-voyager
-police
-travis
-12qwaszx
-heaven
-snowball
-lover
-abcdef
-00000
-pakistan
-007007
-walter
-playboy
-blazer
-cricket
-sniper
-hooters
-donkey
-willow
-loveme
-saturn
-therock
-redwings
-bigboy
-pumpkin
-trinity
-williams
-tits
-nintendo
-digital
-destiny
-topgun
-runner
-marvin
-guinness
-chance
-bubbles
-testing
-fire
-november
-minecraft
-asdf1234
-lasvegas
-sergey
-broncos
-cartman
-private
-celtic
-birdie
-little
-cassie
-babygirl
-donald
-beatles
-1313
-dickhead
-family
-12121212
-school
-louise
-gabriel
-eclipse
-fluffy
-147258369
-lol123
-explorer
-beer
-nelson
-flyers
-spencer
-scott
-lovely
-gibson
-doggie
-cherry
-andrey
-snickers
-buffalo
-pantera
-metallica
-member
-carter
-qwertyu
-peter
-alexande
-steve
-bronco
-paradise
-goober
-5555
-samuel
-montana
-mexico
-dreams
-michigan
-cock
-carolina
-yankee
-friends
-magnum
-surfer
-poopoo
-maximus
-genius
-cool
-vampire
-lacrosse
-asd123
-aaaa
-christin
-kimberly
-speedy
-sharon
-carmen
-111222
-kristina
-sammy
-racing
-ou812
-sabrina
-horses
-0987654321
-qwerty1
-pimpin
-baby
-stalker
-enigma
-147147
-star
-poohbear
-boobies
-147258
-simple
-bollocks
-12345q
-marcus
-brian
-1987
-qweasdzxc
-drowssap
-hahaha
-caroline
-barbara
-dave
-viper
-drummer
-action
-einstein
-bitches
-genesis
-hello1
-scotty
-friend
-forest
-010203
-hotrod
-google
-vanessa
-spitfire
-badger
-maryjane
-friday
-alaska
-1232323q
-tester
-jester
-jake
-champion
-billy
-147852
-rock
-hawaii
-badass
-chevy
-420420
-walker
-stephen
-eagle1
-bill
-1986
-october
-gregory
-svetlana
-pamela
-1984
-music
-shorty
-westside
-stanley
-diesel
-courtney
-242424
-kevin
-porno
-hitman
-boobs
-mark
-12345qwert
-reddog
-frank
-qwe123
-popcorn
-patricia
-aaaaaaaa
-1969
-teresa
-mozart
-buddha
-anderson
-paul
-melanie
-abcdefg
-security
-lucky1
-lizard
-denise
-3333
-a12345
-123789
-ruslan
-stargate
-simpsons
-scarface
-eagle
-123456789a
-thumper
-olivia
-naruto
-1234554321
-general
-cherokee
-a123456
-vincent
-Usuckballz1
-spooky
-qweasd
-cumshot
-free
-frankie
-douglas
-death
-1980
-loveyou
-kitty
-kelly
-veronica
-suzuki
-semperfi
-penguin
-mercury
-liberty
-spirit
-scotland
-natalie
-marley
-vikings
-system
-sucker
-king
-allison
-marshall
-1979
-098765
-qwerty12
-hummer
-adrian
-1985
-vfhbyf
-sandman
-rocky
-leslie
-antonio
-98765432
-4321
-softball
-passion
-mnbvcxz
-bastard
-passport
-horney
-rascal
-howard
-franklin
-bigred
-assman
-alexander
-homer
-redrum
-jupiter
-claudia
-55555555
-141414
-zaq12wsx
-shit
-patches
-nigger
-cunt
-raider
-infinity
-andre
-54321
-galore
-college
-russia
-kawasaki
-bishop
-77777777
-vladimir
-money1
-freeuser
-wildcats
-francis
-disney
-budlight
-brittany
-1994
-00000000
-sweet
-oksana
-honda
-domino
-bulldogs
-brutus
-swordfis
-norman
-monday
-jimmy
-ironman
-ford
-fantasy
-9999
-7654321
-PASSWORD
-hentai
-duncan
-cougar
-1977
-jeffrey
-house
-dancer
-brooke
-timothy
-super
-marines
-justice
-digger
-connor
-patriots
-karina
-202020
-molly
-everton
-tinker
-alicia
-rasdzv3
-poop
-pearljam
-stinky
-naughty
-colorado
-123123a
-water
-test123
-ncc1701d
-motorola
-ireland
-asdfg
-slut
-matt
-houston
-boogie
-zombie
-accord
-vision
-bradley
-reggie
-kermit
-froggy
-ducati
-avalon
-6666
-9379992
-sarah
-saints
-logitech
-chopper
-852456
-simpson
-madonna
-juventus
-claire
-159951
-zachary
-yfnfif
-wolverin
-warcraft
-hello123
-extreme
-penis
-peekaboo
-fireman
-eugene
-brenda
-123654789
-russell
-panthers
-georgia
-smith
-skyline
-jesus
-elizabet
-spiderma
-smooth
-pirate
-empire
-bullet
-8888
-virginia
-valentin
-psycho
-predator
-arizona
-134679
-mitchell
-alyssa
-vegeta
-titanic
-christ
-goblue
-fylhtq
-wolf
-mmmmmm
-kirill
-indian
-hiphop
-baxter
-awesome
-people
-danger
-roland
-mookie
-741852963
-1111111111
-dreamer
-bambam
-arnold
-1981
-skipper
-serega
-rolltide
-elvis
-changeme
-simon
-1q2w3e
-lovelove
-fktrcfylh
-denver
-tommy
-mine
-loverboy
-hobbes
-happy1
-alison
-nemesis
-chevelle
-cardinal
-burton
-wanker
-picard
-151515
-tweety
-michael1
-147852369
-12312
-xxxx
-windows
-turkey
-456789
-1974
-vfrcbv
-sublime
-1975
-galina
-bobby
-newport
-manutd
-daddy
-american
-alexandr
-1966
-victory
-rooster
-qqq111
-madmax
-electric
-bigcock
-a1b2c3
-wolfpack
-spring
-phpbb
-lalala
-suckme
-spiderman
-eric
-darkside
-classic
-raptor
-123456789q
-hendrix
-1982
-wombat
-avatar
-alpha
-zxc123
-crazy
-hard
-england
-brazil
-1978
-01011980
-wildcat
-polina
-freepass
-carrie
-99999999
-qaz123
-holiday
-fyfcnfcbz
-brother
-taurus
-shaggy
-raymond
-maksim
-gundam
-admin
-vagina
-pretty
-pickle
-good
-chronic
-alabama
-airplane
-22222222
-1976
-1029384756
-01011
-time
-sports
-ronaldo
-pandora
-cheyenne
-caesar
-billybob
-bigman
-1968
-124578
-snowman
-lawrence
-kenneth
-horse
-france
-bondage
-perfect
-kristen
-devils
-alpha1
-pussycat
-kodiak
-flowers
-1973
-01012000
-leather
-amber
-gracie
-chocolat
-bubba1
-catch22
-business
-2323
-1983
-cjkysirj
-1972
-123qweasd
-ytrewq
-wolves
-stingray
-ssssss
-serenity
-ronald
-greenday
-135790
-010101
-tiger1
-sunset
-charlie1
-berlin
-bbbbbb
-171717
-panzer
-lincoln
-katana
-firebird
-blizzard
-a1b2c3d4
-white
-sterling
-redhead
-password123
-candy
-anna
-142536
-sasha
-pyramid
-outlaw
-hercules
-garcia
-454545
-trevor
-teens
-maria
-kramer
-girl
-popeye
-pontiac
-hardon
-dude
-aaaaa
-323232
-tarheels
-honey
-cobra
-buddy1
-remember
-lickme
-detroit
-clinton
-basketball
-zeppelin
-whynot
-swimming
-strike
-service
-pavilion
-michele
-engineer
-dodgers
-britney
-bobafett
-adam
-741852
-21122112
-xxxxx
-robbie
-miranda
-456123
-future
-darkstar
-icecream
-connie
-1970
-jones
-hellfire
-fisher
-fireball
-apache
-fuckit
-blonde
-bigmac
-abcd
-morris
-angel1
-666999
-321321
-simone
-rockstar
-flash
-defender
-1967
-wallace
-trooper
-oscar
-norton
-casino
-cancer
-beauty
-weasel
-savage
-raven
-harvey
-bowling
-246810
-wutang
-theone
-swordfish
-stewart
-airforce
-abcdefgh
-nipples
-nastya
-jenny
-hacker
-753951
-amateur
-viktor
-srinivas
-maxima
-lennon
-freddie
-bluebird
-qazqaz
-presario
-pimp
-packard
-mouse
-looking
-lesbian
-jeff
-cheryl
-2001
-wrangler
-sandy
-machine
-lights
-eatme
-control
-tattoo
-precious
-harrison
-duke
-beach
-tornado
-tanner
-goldfish
-catfish
-openup
-manager
-1971
-street
-Soso123aljg
-roscoe
-paris
-natali
-light
-julian
-jerry
-dilbert
-dbrnjhbz
-chris1
-atlanta
-xfiles
-thailand
-sailor
-pussies
-pervert
-lucifer
-longhorn
-enjoy
-dragons
-young
-target
-elaine
-dustin
-123qweasdzxc
-student
-madman
-lisa
-integra
-wordpass
-prelude
-newton
-lolita
-ladies
-hawkeye
-corona
-bubble
-31415926
-trigger
-spike
-katie
-iloveu
-herman
-design
-cannon
-999999999
-video
-stealth
-shooter
-nfnmzyf
-hottie
-browns
-314159
-trucks
-malibu
-bruins
-bobcat
-barbie
-1964
-orlando
-letmein1
-freaky
-foobar
-cthutq
-baller
-unicorn
-scully
-pussy1
-potter
-cookies
-pppppp
-philip
-gogogo
-elena
-country
-assassin
-1010
-zaqwsx
-testtest
-peewee
-moose
-microsoft
-teacher
-sweety
-stefan
-stacey
-shotgun
-random
-laura
-hooker
-dfvgbh
-devildog
-chipper
-athena
-winnie
-valentina
-pegasus
-kristin
-fetish
-butterfly
-woody
-swinger
-seattle
-lonewolf
-joker
-booty
-babydoll
-atlantis
-tony
-powers
-polaris
-montreal
-angelina
-77777
-tickle
-regina
-pepsi
-gizmo
-express
-dollar
-squirt
-shamrock
-knicks
-hotstuff
-balls
-transam
-stinger
-smiley
-ryan
-redneck
-mistress
-hjvfirf
-cessna
-bunny
-toshiba
-single
-piglet
-fucked
-father
-deftones
-coyote
-castle
-cadillac
-blaster
-valerie
-samurai
-oicu812
-lindsay
-jasmin
-james1
-ficken
-blahblah
-birthday
-1234abcd
-01011990
-sunday
-manson
-flipper
-asdfghj
-181818
-wicked
-great
-daisy
-babes
-skeeter
-reaper
-maddie
-cavalier
-veronika
-trucker
-qazwsx123
-mustang1
-goldberg
-escort
-12345678910
-wolfgang
-rocks
-mylove
-mememe
-lancer
-ibanez
-travel
-sugar
-snake
-sister
-siemens
-savannah
-minnie
-leonardo
-basketba
-1963
-trumpet
-texas
-rocky1
-galaxy
-cristina
-aardvark
-shelly
-hotsex
-goldie
-fatboy
-benson
-321654
-141627
-sweetpea
-ronnie
-indigo
-13131313
-spartan
-roberto
-hesoyam
-freeman
-freedom1
-fredfred
-pizza
-manchester
-lestat
-kathleen
-hamilton
-erotic
-blabla
-22222
-1995
-skater
-pencil
-passwor
-larisa
-hornet
-hamlet
-gambit
-fuckyou2
-alfred
-456456
-sweetie
-marino
-lollol
-565656
-techno
-special
-renegade
-insane
-indiana
-farmer
-drpepper
-blondie
-bigboobs
-272727
-1a2b3c
-valera
-storm
-seven
-rose
-nick
-mister
-karate
-casey
-1qaz2wsx3edc
-1478963
-maiden
-julie
-curtis
-colors
-christia
-buckeyes
-13579
-0123456789
-toronto
-stephani
-pioneer
-kissme
-jungle
-jerome
-holland
-harry
-garden
-enterpri
-dragon1
-diamonds
-chrissy
-bigone
-343434
-wonder
-wetpussy
-subaru
-smitty
-racecar
-pascal
-morpheus
-joanne
-irina
-indians
-impala
-hamster
-charger
-change
-bigfoot
-babylon
-66666666
-timber
-redman
-pornstar
-bernie
-tomtom
-thuglife
-millie
-buckeye
-aaron
-virgin
-tristan
-stormy
-rusty
-pierre
-napoleon
-monkey1
-highland
-chiefs
-chandler
-catdog
-aurora
-1965
-trfnthbyf
-sampson
-nipple
-dudley
-cream
-consumer
-burger
-brandi
-welcome1
-triumph
-joejoe
-hunting
-dirty
-caserta
-brown
-aragorn
-363636
-mariah
-element
-chichi
-2121
-123qwe123
-wrinkle1
-smoke
-omega
-monika
-leonard
-justme
-hobbit
-gloria
-doggy
-chicks
-bass
-audrey
-951753
-51505150
-11235813
-sakura
-philips
-griffin
-butterfl
-artist
-66666
-island
-goforit
-emerald
-elizabeth
-anakin
-watson
-poison
-none
-italia
-callie
-bobbob
-autumn
-andreas
-123
-sherlock
-q12345
-pitbull
-marathon
-kelsey
-inside
-german
-blackie
-access14
-123asd
-zipper
-overlord
-nadine
-marie
-basket
-trombone
-stones
-sammie
-nugget
-naked
-kaiser
-isabelle
-huskers
-bomber
-barcelona
-babylon5
-babe
-alpine
-weed
-ultimate
-pebbles
-nicolas
-marion
-loser
-linda
-eddie
-wesley
-warlock
-tyler
-goddess
-fatcat
-energy
-david1
-bassman
-yankees1
-whore
-trojan
-trixie
-superfly
-kkkkkk
-ybrbnf
-warren
-sophia
-sidney
-pussys
-nicola
-campbell
-vfvjxrf
-singer
-shirley
-qawsed
-paladin
-martha
-karen
-help
-harold
-geronimo
-forget
-concrete
-191919
-westham
-soldier
-q1w2e3r4t5y6
-poiuyt
-nikki
-mario
-juice
-jessica1
-global
-dodger
-123454321
-webster
-titans
-tintin
-tarzan
-sexual
-sammy1
-portugal
-onelove
-marcel
-manuel
-madness
-jjjjjj
-holly
-christy
-424242
-yvonne
-sundance
-sex4me
-pleasure
-logan
-danny
-wwwwww
-truck
-spartak
-smile
-michel
-history
-Exigen
-65432
-1234321
-sherry
-sherman
-seminole
-rommel
-network
-ladybug
-isabella
-holden
-harris
-germany
-fktrctq
-cotton
-angelo
-14789632
-sergio
-qazxswedc
-moon
-jesus1
-trunks
-snakes
-sluts
-kingkong
-bluesky
-archie
-adgjmptw
-911911
-112358
-sunny
-suck
-snatch
-planet
-panama
-ncc1701e
-mongoose
-head
-hansolo
-desire
-alejandr
-1123581321
-whiskey
-waters
-teen
-party
-martina
-margaret
-january
-connect
-bluemoon
-bianca
-andrei
-5555555
-smiles
-nolimit
-long
-assass
-abigail
-555666
-yomama
-rocker
-plastic
-katrina
-ghbdtnbr
-ferret
-emily
-bonehead
-blessed
-beagle
-asasas
-abgrtyu
-sticky
-olga
-japan
-jamaica
-home
-hector
-dddddd
-1961
-turbo
-stallion
-personal
-peace
-movie
-morrison
-joanna
-geheim
-finger
-cactus
-7895123
-susan
-super123
-spyder
-mission
-anything
-aleksandr
-zxcvb
-shalom
-rhbcnbyf
-pickles
-passat
-natalia
-moomoo
-jumper
-inferno
-dietcoke
-cumming
-cooldude
-chuck
-christop
-million
-lollipop
-fernando
-christian
-blue22
-bernard
-apple1
-unreal
-spunky
-ripper
-open
-niners
-letmein2
-flatron
-faster
-deedee
-bertha
-april
-4128
-01012010
-werewolf
-rubber
-punkrock
-orion
-mulder
-missy
-larry
-giovanni
-gggggg
-cdtnkfyf
-yoyoyo
-tottenha
-shaved
-newman
-lindsey
-joey
-hongkong
-freak
-daniela
-camera
-brianna
-blackcat
-a1234567
-1q1q1q
-zzzzzzzz
-stars
-pentium
-patton
-jamie
-hollywoo
-florence
-biscuit
-beetle
-andy
-always
-speed
-sailing
-phillip
-legion
-gn56gn56
-909090
-martini
-dream
-darren
-clifford
-2002
-stocking
-solomon
-silvia
-pirates
-office
-monitor
-monique
-milton
-matthew1
-maniac
-loulou
-jackoff
-immortal
-fossil
-dodge
-delta
-44444444
-121314
-sylvia
-sprite
-shadow1
-salmon
-diana
-shasta
-patriot
-palmer
-oxford
-nylons
-molly1
-irish
-holmes
-curious
-asdzxc
-1999
-makaveli
-kiki
-kennedy
-groovy
-foster
-drizzt
-twister
-snapper
-sebastia
-philly
-pacific
-jersey
-ilovesex
-dominic
-charlott
-carrot
-anthony1
-africa
-111222333
-sharks
-serena
-satan666
-maxmax
-maurice
-jacob
-gerald
-cosmos
-columbia
-colleen
-cjkywt
-cantona
-brooks
-99999
-787878
-rodney
-nasty
-keeper
-infantry
-frog
-french
-eternity
-dillon
-coolio
-condor
-anton
-waterloo
-velvet
-vanhalen
-teddy
-skywalke
-sheila
-sesame
-seinfeld
-funtime
-012345
-standard
-squirrel
-qazwsxed
-ninja
-kingdom
-grendel
-ghost
-fuckfuck
-damien
-crimson
-boeing
-bird
-biggie
-090909
-zaq123
-wolverine
-wolfman
-trains
-sweets
-sunrise
-maxine
-legolas
-jericho
-isabel
-foxtrot
-anal
-shogun
-search
-robinson
-rfrfirf
-ravens
-privet
-penny
-musicman
-memphis
-megadeth
-dogs
-butt
-brownie
-oldman
-graham
-grace
-505050
-verbatim
-support
-safety
-review
-newlife
-muscle
-herbert
-colt45
-bottom
-2525
-1q2w3e4r5t6y
-1960
-159159
-western
-twilight
-thanks
-suzanne
-potato
-pikachu
-murray
-master1
-marlin
-gilbert
-getsome
-fuckyou1
-dima
-denis
-789789
-456852
-stone
-stardust
-seven7
-peanuts
-obiwan
-mollie
-licker
-kansas
-frosty
-ball
-262626
-tarheel
-showtime
-roman
-markus
-maestro
-lobster
-darwin
-cindy
-chubby
-2468
-147896325
-tanker
-surfing
-skittles
-showme
-shaney14
-qwerty12345
-magic1
-goblin
-fusion
-blades
-banshee
-alberto
-123321123
-123098
-powder
-malcolm
-intrepid
-garrett
-delete
-chaos
-bruno
-1701
-tequila
-short
-sandiego
-python
-punisher
-newpass
-iverson
-clayton
-amadeus
-1234567a
-stimpy
-sooners
-preston
-poopie
-photos
-neptune
-mirage
-harmony
-gold
-fighter
-dingdong
-cats
-whitney
-sucks
-slick
-rick
-ricardo
-princes
-liquid
-helena
-daytona
-clover
-blues
-anubis
-1996
-192837465
-starcraft
-roxanne
-pepsi1
-mushroom
-eatshit
-dagger
-cracker
-capital
-brendan
-blackdog
-25802580
-strider
-slapshot
-porter
-pink
-jason1
-hershey
-gothic
-flight
-ekaterina
-cody
-buffy
-boss
-bananas
-aaaaaaa
-123698745
-1234512345
-tracey
-miami
-kolobok
-danni
-chargers
-cccccc
-blue123
-bigguy
-33333333
-0.0.000
-warriors
-walnut
-raistlin
-ping
-miguel
-latino
-griffey
-green1
-gangster
-felix
-engine
-doodle
-coltrane
-byteme
-buck
-asdf123
-123456z
-0007
-vertigo
-tacobell
-shark
-portland
-penelope
-osiris
-nymets
-nookie
-mary
-lucky7
-lucas
-lester
-ledzep
-gorilla
-coco
-bugger
-bruce
-blood
-bentley
-battle
-1a2b3c4d
-19841984
-12369874
-weezer
-turner
-thegame
-stranger
-sally
-Mailcreated5240
-knights
-halflife
-ffffff
-dorothy
-dookie
-damian
-258456
-women
-trance
-qwerasdf
-playtime
-paradox
-monroe
-kangaroo
-henry
-dumbass
-dublin
-charly
-butler
-brasil
-blade
-blackman
-bender
-baggins
-wisdom
-tazman
-swallow
-stuart
-scruffy
-phoebe
-panasonic
-Michael
-masters
-ghjcnj
-firefly
-derrick
-christine
-beautiful
-auburn
-archer
-aliens
-161616
-1122
-woody1
-wheels
-test1
-spanking
-robin
-redred
-racerx
-postal
-parrot
-nimrod
-meridian
-madrid
-lonestar
-kittycat
-hell
-goodluck
-gangsta
-formula
-devil
-cassidy
-camille
-buttons
-bonjour
-bingo
-barcelon
-allen
-98765
-898989
-303030
-2020
-0000000
-tttttt
-tamara
-scoobydo
-samsam
-rjntyjr
-richie
-qwertz
-megaman
-luther
-jazz
-crusader
-bollox
-123qaz
-12312312
-102938
-window
-sprint
-sinner
-sadie
-rulez
-quality
-pooper
-pass123
-oakland
-misty
-lvbnhbq
-lady
-hannibal
-guardian
-grizzly
-fuckface
-finish
-discover
-collins
-catalina
-carson
-black1
-bang
-annie
-123987
-1122334455
-wookie
-volume
-tina
-rockon
-qwer
-molson
-marco
-californ
-angelica
-2424
-world
-william1
-stonecol
-shemale
-shazam
-picasso
-oracle
-moscow
-luke
-lorenzo
-kitkat
-johnjohn
-janice
-gerard
-flames
-duck
-dark
-celica
-445566
-234567
-yourmom
-topper
-stevie
-septembe
-scarlett
-santiago
-milano
-lowrider
-loving
-incubus
-dogdog
-anastasia
-1962
-123zxc
-vacation
-tempest
-sithlord
-scarlet
-rebels
-ragnarok
-prodigy
-mobile
-keyboard
-golfing
-english
-carlo
-anime
-545454
-19921992
-11112222
-vfhecz
-sobaka
-shiloh
-penguins
-nuttertools
-mystery
-lorraine
-llllll
-lawyer
-kiss
-jeep
-gizmodo
-elwood
-dkflbvbh
-987456
-6751520
-12121
-titleist
-tardis
-tacoma
-smoker
-shaman
-rootbeer
-magnolia
-julia
-juan
-hoover
-gotcha
-dodgeram
-creampie
-buffett
-bridge
-aspirine
-456654
-socrates
-photo
-parola
-nopass
-megan
-lucy
-kenwood
-kenny
-imagine
-forgot
-cynthia
-blondes
-ashton
-aezakmi
-1234567q
-viper1
-terry
-sabine
-redalert
-qqqqqqqq
-munchkin
-monkeys
-mersedes
-melvin
-mallard
-lizzie
-imperial
-honda1
-gremlin
-gillian
-elliott
-defiant
-dadada
-cooler
-bond
-blueeyes
-birdman
-bigballs
-analsex
-753159
-zaq1xsw2
-xanadu
-weather
-violet
-sergei
-sebastian
-romeo
-research
-putter
-oooooo
-national
-lexmark
-hotboy
-greg
-garbage
-colombia
-chucky
-carpet
-bobo
-bobbie
-assfuck
-88888
-01012001
-smokin
-shaolin
-roger
-rammstein
-pussy69
-katerina
-hearts
-frogger
-freckles
-dogg
-dixie
-claude
-caliente
-amazon
-abcde
-1221
-wright
-willis
-spidey
-sleepy
-sirius
-santos
-rrrrrr
-randy
-picture
-payton
-mason
-dusty
-director
-celeste
-broken
-trebor
-sheena
-qazwsxedcrfv
-polo
-oblivion
-mustangs
-margarita
-letsgo
-josh
-jimbob
-jimbo
-janine
-jackal
-iforgot
-hallo
-fatass
-deadhead
-abc12
-zxcv1234
-willy
-stud
-slappy
-roberts
-rescue
-porkchop
-noodles
-nellie
-mypass
-mikey
-marvel
-laurie
-grateful
-fuck_inside
-formula1
-Dragon
-cxfcnmt
-bridget
-aussie
-asterix
-a1s2d3f4
-23232323
-123321q
-veritas
-spankme
-shopping
-roller
-rogers
-queen
-peterpan
-palace
-melinda
-martinez
-lonely
-kristi
-justdoit
-goodtime
-frances
-camel
-beckham
-atomic
-alexandra
-active
-223344
-vanilla
-thankyou
-springer
-sommer
-Software
-sapphire
-richmond
-printer
-ohyeah
-massive
-lemons
-kingston
-granny
-funfun
-evelyn
-donnie
-deanna
-brucelee
-bosco
-aggies
-313131
-wayne
-thunder1
-throat
-temple
-smudge
-qqqq
-qawsedrf
-plymouth
-pacman
-myself
-mariners
-israel
-hitler
-heather1
-faith
-Exigent
-clancy
-chelsea1
-353535
-282828
-123456qwerty
-tobias
-tatyana
-stuff
-spectrum
-sooner
-shitty
-sasha1
-pooh
-pineappl
-mandy
-labrador
-kisses
-katrin
-kasper
-kaktus
-harder
-eduard
-dylan
-dead
-chloe
-astros
-1234567890q
-10101010
-stephanie
-satan
-hudson
-commando
-bones
-bangkok
-amsterdam
-1959
-webmaster
-valley
-space
-southern
-rusty1
-punkin
-napass
-marian
-magnus
-lesbians
-krishna
-hungry
-hhhhhh
-fuckers
-fletcher
-content
-account
-906090
-thompson
-simba
-scream
-q1q1q1
-primus
-Passw0rd
-mature
-ivanov
-husker
-homerun
-esther
-ernest
-champs
-celtics
-candyman
-bush
-boner
-asian
-aquarius
-33333
-zxcv
-starfish
-pics
-peugeot
-painter
-monopoly
-lick
-infiniti
-goodbye
-gangbang
-fatman
-darling
-celine
-camelot
-boat
-blackjac
-barkley
-area51
-8J4yE3Uz
-789654
-19871987
-0000000000
-vader
-shelley
-scrappy
-sarah1
-sailboat
-richard1
-moloko
-method
-mama
-kyle
-kicker
-keith
-judith
-john316
-horndog
-godsmack
-flyboy
-emmanuel
-drago
-cosworth
-blake
-19891989
-writer
-usa123
-topdog
-timmy
-speaker
-rosemary
-pancho
-night
-melody
-lightnin
-life
-hidden
-gator
-farside
-falcons
-desert
-chevrole
-catherin
-carolyn
-bowler
-anders
-666777
-369369
-yesyes
-sabbath
-qwerty123456
-power1
-pete
-oscar1
-ludwig
-jammer
-frontier
-fallen
-dance
-bryan
-asshole1
-amber1
-aaa111
-123457
-01011991
-terror
-telefon
-strong
-spartans
-sara
-odessa
-luckydog
-frank1
-elijah
-chang
-center
-bull
-blacks
-15426378
-132435
-vivian
-tanya
-swingers
-stick
-snuggles
-sanchez
-redbull
-reality
-qwertyuio
-qwert123
-mandingo
-ihateyou
-hayden
-goose
-franco
-forrest
-double
-carol
-bohica
-bell
-beefcake
-beatrice
-avenger
-andrew1
-anarchy
-963852
-1366613
-111111111
-whocares
-scooter1
-rbhbkk
-matilda
-labtec
-kevin1
-jojo
-jesse
-hermes
-fitness
-doberman
-dawg
-clitoris
-camels
-5555555555
-1957
-vulcan
-vectra
-topcat
-theking
-skiing
-nokia
-muppet
-moocow