Compare commits

..
Author SHA1 Message Date
Mounir IDRASSI 9a6b371c96 MacOSX/Linux: Solve truncated text in some Wizard windows by defining a large enough minimum size. 2014-12-07 22:40:27 +01:00
Mounir IDRASSI 078614fbce Windows: Implement creation of multiple keyfiles at once. 2014-12-07 22:40:25 +01:00
Mounir IDRASSI ec327c006e Windows: implement auto-dismount option when session is locked 2014-12-07 22:40:23 +01:00
Mounir IDRASSI 03afe1224a Windows: correct issue in handling "More information on keyfiles" link that caused a crash on some machines 2014-12-04 13:47:37 +01:00
Mounir IDRASSI 11013ce71e Linux/macOSX: handle project URLs using the new values 2014-12-04 13:47:35 +01:00
Mounir IDRASSI a185b540bd Windows: put back the tutorial prompt since we now have online documentation. 2014-12-04 13:47:33 +01:00
Mounir IDRASSI a5df5d981a Windows: correct issue in displaying PDF of User Guide. 2014-12-04 13:47:31 +01:00
Mounir IDRASSI dfff927389 Windows: update URLs to points to the online documentation. Use a dedicated donation link. 2014-12-04 13:47:30 +01:00
Mounir IDRASSI e6ebc63c66 Update VeraCrypt User Guide 2014-12-01 00:34:16 +01:00
Mounir IDRASSI f31c7b3a88 Add test vectors for HMAC-SHA256 and PBKDF2-HMAC-SHA256 2014-12-01 00:34:13 +01:00
Mounir IDRASSI bc9005968a Windows: Avoid calling RegCloseKey on an invalid handle. 2014-11-11 19:25:05 +01:00
Mounir IDRASSI b2438b5029 Windows: close file handle if the call to GetFileSize fails. 2014-11-10 23:11:12 +01:00
Mounir IDRASSI 51fa86b246 Copy license file to the top of git repository 2014-11-08 23:59:26 +01:00
Mounir IDRASSI b5dfe9c9ed Add copy of src/Reader.txt to make Github happy 2014-11-08 23:42:51 +01:00
Mounir IDRASSI c3353c71d4 Readme: Add more MacOSX specific details concerning the build of VeraCrypt following users feedback 2014-11-08 23:24:59 +01:00
20 changed files with 1389 additions and 111 deletions
+503
View File
@@ -0,0 +1,503 @@
TrueCrypt License Version 3.0
Software distributed under this license is distributed on an "AS
IS" BASIS WITHOUT WARRANTIES OF ANY KIND. THE AUTHORS AND
DISTRIBUTORS OF THE SOFTWARE DISCLAIM ANY LIABILITY. ANYONE WHO
USES, COPIES, MODIFIES, OR (RE)DISTRIBUTES ANY PART OF THE
SOFTWARE IS, BY SUCH ACTION(S), ACCEPTING AND AGREEING TO BE
BOUND BY ALL TERMS AND CONDITIONS OF THIS LICENSE. IF YOU DO NOT
ACCEPT THEM, DO NOT USE, COPY, MODIFY, NOR (RE)DISTRIBUTE THE
SOFTWARE, NOR ANY PART(S) THEREOF.
I. Definitions
1. "This Product" means the work (including, but not limited to,
source code, graphics, texts, and accompanying files) made
available under and governed by this version of this license
("License"), as may be indicated by, but is not limited to,
copyright notice(s) attached to or included in the work.
2. "You" means (and "Your" refers to) an individual or a legal
entity (e.g., a non-profit organization, commercial
organization, government agency, etc.) exercising permissions
granted by this License.
3. "Modification" means (and "modify" refers to) any alteration
of This Product, including, but not limited to, addition to or
deletion from the substance or structure of This Product,
translation into another language, repackaging, alteration or
removal of any file included with This Product, and addition of
any new files to This Product.
4. "Your Product" means This Product modified by You, or any
work You derive from (or base on) any part of This Product. In
addition, "Your Product" means any work in which You include any
(modified or unmodified) portion of This Product. However, if
the work in which you include it is an aggregate software
distribution (such as an operating system distribution or a
cover CD-ROM of a magazine) containing multiple separate
products, then the term "Your Product" includes only those
products (in the aggregate software distribution) that use,
include, or depend on a modified or unmodified version of This
Product (and the term "Your Product" does not include the whole
aggregate software distribution). For the purposes of this
License, a product suite consisting of two or more products is
considered a single product (operating system distributions and
cover media of magazines are not considered product suites).
5. "Distribution" means (and "distribute" refers to), regardless
of means or methods, conveyance, transfer, providing, or making
available of This/Your Product or portions thereof to third
parties (including, but not limited to, making This/Your
Product, or portions thereof, available for download to third
parties, whether or not any third party has downloaded the
product, or any portion thereof, made available for download).
II. Use, Copying, and Distribution of This Product
1. Provided that You comply with all applicable terms and
conditions of this License, You may make copies of This Product
(unmodified) and distribute copies of This Product (unmodified)
that are not included in another product forming Your Product
(except as permitted under Chapter III). Note: For terms and
conditions for copying and distribution of modified versions of
This Product, see Chapter III.
2. Provided that You comply with all applicable terms and
conditions of this License, You may use This Product freely (see
also Chapter III) on any number of computers/systems for non-
commercial and/or commercial purposes.
III. Modification, Derivation, and Inclusion in Other Products
1. If all conditions specified in the following paragraphs in
this Chapter (III) are met (for exceptions, see Section III.2)
and if You comply with all other applicable terms and conditions
of this License, You may modify This Product (thus forming Your
Product), derive new works from This Product or portions thereof
(thus forming Your Product), include This Product or portions
thereof in another product (thus forming Your Product, unless
defined otherwise in Chapter I), and You may use (for non-
commercial and/or commercial purposes), copy, and/or distribute
Your Product.
a. The name of Your Product (or of Your modified version of
This Product) must not contain the name TrueCrypt (for
example, the following names are not allowed: TrueCrypt,
TrueCrypt+, TrueCrypt Professional, iTrueCrypt, etc.) nor
any other names confusingly similar to the name TrueCrypt
(e.g., True-Crypt, True Crypt, TruKrypt, etc.)
All occurrences of the name TrueCrypt that could reasonably
be considered to identify Your Product must be removed from
Your Product and from any associated materials. Logo(s)
included in (or attached to) Your Product (and in/to
associated materials) must not incorporate and must not be
confusingly similar to any of the TrueCrypt logos
(including, but not limited to, the non-textual logo
consisting primarily of a key in stylized form) or
portion(s) thereof. All graphics contained in This Product
(logos, icons, etc.) must be removed from Your Product (or
from Your modified version of This Product) and from any
associated materials.
b. The following phrases must be removed from Your Product
and from any associated materials, except the text of this
License: "A TrueCrypt Foundation Release", "Released by
TrueCrypt Foundation", "This is a TrueCrypt Foundation
release."
c. Phrase "Based on TrueCrypt, freely available at
http://www.truecrypt.org/" must be displayed by Your Product
(if technically feasible) and contained in its
documentation. Alternatively, if This Product or its portion
You included in Your Product constitutes only a minor
portion of Your Product, phrase "Portions of this product
are based in part on TrueCrypt, freely available at
http://www.truecrypt.org/" may be displayed instead. In each
of the cases mentioned above in this paragraph,
"http://www.truecrypt.org/" must be a hyperlink (if
technically feasible) pointing to http://www.truecrypt.org/
and You may freely choose the location within the user
interface (if there is any) of Your Product (e.g., an
"About" window, etc.) and the way in which Your Product will
display the respective phrase.
Your Product (and any associated materials, e.g., the
documentation, the content of the official web site of Your
Product, etc.) must not present any Internet address
containing the domain name truecrypt.org (or any domain name
that forwards to the domain name truecrypt.org) in a manner
that might suggest that it is where information about Your
Product may be obtained or where bugs found in Your Product
may be reported or where support for Your Product may be
available or otherwise attempt to indicate that the domain
name truecrypt.org is associated with Your Product.
d. The complete source code of Your Product must be freely
and publicly available (for exceptions, see Section III.2)
at least until You cease to distribute Your Product. This
condition can be met in one or both of the following ways:
(i) You include the complete source code of Your Product
with every copy of Your Product that You make and distribute
and You make all such copies of Your Product available to
the general public free of charge, and/or (ii) You include
information (valid and correct at least until You cease to
distribute Your Product) about where the complete source
code of Your Product can be obtained free of charge (e.g.,
an Internet address) or for a reasonable reproduction fee
with every copy of Your Product that You make and distribute
and, if there is a web site officially associated with Your
Product, You include the aforementioned information about
the source code on a freely and publicly accessible web
page to which such web site links via an easily viewable
hyperlink (at least until You cease to distribute Your
Product).
The source code of Your Product must not be deliberately
obfuscated and it must not be in an intermediate form (e.g.,
the output of a preprocessor). Source code means the
preferred form in which a programmer would usually modify
the program.
Portions of the source code of Your Product not contained in
This Product (e.g., portions added by You in creating Your
Product, whether created by You or by third parties) must be
available under license(s) that (however, see also
Subsection III.1.e) allow(s) anyone to modify and derive new
works from the portions of the source code that are not
contained in This Product and to use, copy, and redistribute
such modifications and/or derivative works. The license(s)
must be perpetual, non-exclusive, royalty-free, no-charge,
and worldwide, and must not invalidate, weaken, restrict,
interpret, amend, modify, interfere with or otherwise affect
any part, term, provision, or clause of this License. The
text(s) of the license(s) must be included with every copy
of Your Product that You make and distribute.
e. You must not change the license terms of This Product in
any way (adding any new terms is considered changing the
license terms even if the original terms are retained),
which means, e.g., that no part of This Product may be put
under another license. You must keep intact all the legal
notices contained in the source code files. You must include
the following items with every copy of Your Product that You
make and distribute: a clear and conspicuous notice stating
that Your Product or portion(s) thereof is/are governed by
this version of the TrueCrypt License, a verbatim copy of
this version of the TrueCrypt License (as contained herein),
a clear and conspicuous notice containing information about
where the included copy of the License can be found, and an
appropriate copyright notice.
2. You are not obligated to comply with Subsection III.1.d if
Your Product is not distributed (i.e., Your Product is available
only to You).
IV. Disclaimer of Liability, Disclaimer of Warranty,
Indemnification
You expressly acknowledge and agree to the following:
1. IN NO EVENT WILL ANY (CO)AUTHOR OF THIS PRODUCT, OR ANY
APPLICABLE INTELLECTUAL-PROPERTY OWNER, OR ANY OTHER PARTY WHO
MAY COPY AND/OR (RE)DISTRIBUTE THIS PRODUCT OR PORTIONS THEREOF,
AS MAY BE PERMITTED HEREIN, BE LIABLE TO YOU OR TO ANY OTHER
PARTY FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, ANY
DIRECT, INDIRECT, GENERAL, SPECIAL, INCIDENTAL, PUNITIVE,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, CORRUPTION OR LOSS OF DATA, ANY LOSSES SUSTAINED BY YOU OR
THIRD PARTIES, A FAILURE OF THIS PRODUCT TO OPERATE WITH ANY
OTHER PRODUCT, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR
BUSINESS INTERRUPTION), WHETHER IN CONTRACT, STRICT LIABILITY,
TORT (INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE) OR OTHERWISE,
ARISING OUT OF THE USE, COPYING, MODIFICATION, OR
(RE)DISTRIBUTION OF THIS PRODUCT (OR A PORTION THEREOF) OR OF
YOUR PRODUCT (OR A PORTION THEREOF), OR INABILITY TO USE THIS
PRODUCT (OR A PORTION THEREOF), EVEN IF SUCH DAMAGES (OR THE
POSSIBILITY OF SUCH DAMAGES) ARE/WERE PREDICTABLE OR KNOWN TO
ANY (CO)AUTHOR, INTELLECTUAL-PROPERTY OWNER, OR ANY OTHER PARTY.
2. THIS PRODUCT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
KIND, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT
LIMITED TO, THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THE ENTIRE RISK AS TO
THE QUALITY AND PERFORMANCE OF THIS PRODUCT IS WITH YOU. SHOULD
THIS PRODUCT PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
NECESSARY SERVICING, REPAIR, OR CORRECTION.
3. THIS PRODUCT MAY INCORPORATE IMPLEMENTATIONS OF CRYPTOGRAPHIC
ALGORITHMS THAT ARE REGULATED (E.G., SUBJECT TO EXPORT/IMPORT
CONTROL REGULATIONS) OR ILLEGAL IN SOME COUNTRIES. IT IS SOLELY
YOUR RESPONSIBILITY TO VERIFY THAT IT IS LEGAL TO IMPORT AND/OR
(RE)EXPORT AND/OR USE THIS PRODUCT (OR PORTIONS THEREOF) IN
COUNTRIES WHERE YOU INTEND TO USE IT AND/OR TO WHICH YOU INTEND
TO IMPORT IT AND/OR FROM WHICH YOU INTEND TO EXPORT IT, AND IT
IS SOLELY YOUR RESPONSIBILITY TO COMPLY WITH ANY APPLICABLE
REGULATIONS, RESTRICTIONS, AND LAWS.
4. YOU SHALL INDEMNIFY, DEFEND AND HOLD ALL (CO)AUTHORS OF THIS
PRODUCT, AND APPLICABLE INTELLECTUAL-PROPERTY OWNERS, HARMLESS
FROM AND AGAINST ANY AND ALL LIABILITY, DAMAGES, LOSSES,
SETTLEMENTS, PENALTIES, FINES, COSTS, EXPENSES (INCLUDING
REASONABLE ATTORNEYS' FEES), DEMANDS, CAUSES OF ACTION, CLAIMS,
ACTIONS, PROCEEDINGS, AND SUITS, DIRECTLY RELATED TO OR ARISING
OUT OF YOUR USE, INABILITY TO USE, COPYING, (RE)DISTRIBUTION,
IMPORT AND/OR (RE)EXPORT OF THIS PRODUCT (OR PORTIONS THEREOF)
AND/OR YOUR BREACH OF ANY TERM OF THIS LICENSE.
V. Trademarks
This License does not grant permission to use trademarks
associated with (or applying to) This Product, except for fair
use as defined by applicable law and except for use expressly
permitted or required by this License. Any attempt otherwise to
use trademarks associated with (or applying to) This Product
automatically and immediately terminates Your rights under This
License and may constitute trademark infringement (which may be
prosecuted).
VI. General Terms and Conditions, Miscellaneous Provisions
1. ANYONE WHO USES AND/OR COPIES AND/OR MODIFIES AND/OR CREATES
DERIVATIVE WORKS OF AND/OR (RE)DISTRIBUTES THIS PRODUCT, OR ANY
PORTION(S) THEREOF, IS, BY SUCH ACTION(S), AGREEING TO BE BOUND
BY AND ACCEPTING ALL TERMS AND CONDITIONS OF THIS LICENSE (AND
THE RESPONSIBILITIES AND OBLIGATIONS CONTAINED IN THIS LICENSE).
IF YOU DO NOT ACCEPT (AND AGREE TO BE BOUND BY) ALL TERMS AND
CONDITIONS OF THIS LICENSE, DO NOT USE, COPY, MODIFY, CREATE
DERIVATIVE WORKS OF, NOR (RE)DISTRIBUTE THIS PRODUCT, NOR ANY
PORTION(S) THEREOF.
2. YOU MAY NOT USE, MODIFY, COPY, CREATE DERIVATIVE WORKS OF,
(RE)DISTRIBUTE, OR SUBLICENSE THIS PRODUCT, OR PORTION(S)
THEREOF, EXCEPT AS EXPRESSLY PROVIDED IN THIS LICENSE (EVEN IF
APPLICABLE LAW GIVES YOU MORE RIGHTS). ANY ATTEMPT (EVEN IF
PERMITTED BY APPLICABLE LAW) OTHERWISE TO USE, MODIFY, COPY,
CREATE DERIVATIVE WORKS OF, (RE)DISTRIBUTE, OR SUBLICENSE THIS
PRODUCT, OR PORTION(S) THEREOF, AUTOMATICALLY AND IMMEDIATELY
TERMINATES YOUR RIGHTS UNDER THIS LICENSE AND CAN CONSTITUTE
COPYRIGHT INFRINGEMENT (WHICH MAY BE PROSECUTED). ANY CONDITIONS
AND RESTRICTIONS CONTAINED IN THIS LICENSE ARE ALSO LIMITATIONS
ON THE SCOPE OF THIS LICENSE AND ALSO DEFINE THE SCOPE OF YOUR
RIGHTS UNDER THIS LICENSE. YOUR FAILURE TO COMPLY WITH THE TERMS
AND CONDITIONS OF THIS LICENSE OR FAILURE TO PERFORM ANY
APPLICABLE OBLIGATION IMPOSED BY THIS LICENSE AUTOMATICALLY AND
IMMEDIATELY TERMINATES YOUR RIGHTS UNDER THIS LICENSE AND CAN
CAUSE OR BE CONSIDERED COPYRIGHT INFRINGEMENT (WHICH MAY BE
PROSECUTED). NOTHING IN THIS LICENSE SHALL IMPLY OR BE CONSTRUED
AS A PROMISE, OBLIGATION, OR COVENANT NOT TO SUE FOR COPYRIGHT
OR TRADEMARK INFRINGEMENT IF YOU DO NOT COMPLY WITH THE TERMS
AND CONDITIONS OF THIS LICENSE.
3. This License does not constitute or imply a waiver of any
intellectual property rights except as may be otherwise
expressly provided in this License. This License does not
transfer, assign, or convey any intellectual property rights
(e.g., it does not transfer ownership of copyrights or
trademarks).
4. Subject to the terms and conditions of this License, You may
allow a third party to use Your copy of This Product (or a copy
that You make and distribute, or Your Product) provided that the
third party explicitly accepts and agrees to be bound by all
terms and conditions of this License and the third party is not
prohibited from using This Product (or portions thereof) by this
License (see, e.g., Section VI.7) or by applicable law. However,
You are not obligated to ensure that the third party accepts
(and agrees to be bound by all terms of) this License if You
distribute only the self-extracting package (containing This
Product) that does not allow the user to install (nor extract)
the files contained in the package until he or she accepts and
agrees to be bound by all terms and conditions of this License.
5. Without specific prior written permission from the authors of
This Product (or from their common representative), You must not
use the name of This Product, the names of the authors of This
Product, or the names of the legal entities (or informal groups)
of which the authors were/are members/employees, to endorse or
promote Your Product or any work in which You include a modified
or unmodified version of This Product, or to endorse or promote
You or Your affiliates, or in a way that might suggest that Your
Product (or any work in which You include a modified or
unmodified version of This Product), You, or Your affiliates
is/are endorsed by one or more authors of This Product, or in a
way that might suggest that one or more authors of This Product
is/are affiliated with You (or Your affiliates) or directly
participated in the creation of Your Product or of any work in
which You include a modified or unmodified version of This
Product.
6. IF YOU ARE NOT SURE WHETHER YOU UNDERSTAND ALL PARTS OF THIS
LICENSE OR IF YOU ARE NOT SURE WHETHER YOU CAN COMPLY WITH ALL
TERMS AND CONDITIONS OF THIS LICENSE, YOU MUST NOT USE, COPY,
MODIFY, CREATE DERIVATIVE WORKS OF, NOR (RE)DISTRIBUTE THIS
PRODUCT, NOR ANY PORTION(S) OF IT. YOU SHOULD CONSULT WITH A
LAWYER.
7. IF (IN RELEVANT CONTEXT) ANY PROVISION OF CHAPTER IV OF THIS
LICENSE IS UNENFORCEABLE, INVALID, OR PROHIBITED UNDER
APPLICABLE LAW IN YOUR JURISDICTION, YOU HAVE NO RIGHTS UNDER
THIS LICENSE AND YOU MUST NOT USE, COPY, MODIFY, CREATE
DERIVATIVE WORKS OF, NOR (RE)DISTRIBUTE THIS PRODUCT, NOR ANY
PORTION(S) THEREOF.
8. Except as otherwise provided in this License, if any
provision of this License, or a portion thereof, is found to be
invalid or unenforceable under applicable law, it shall not
affect the validity or enforceability of the remainder of this
License, and such invalid or unenforceable provision shall be
construed to reflect the original intent of the provision and
shall be enforced to the maximum extent permitted by applicable
law so as to effect the original intent of the provision as
closely as possible.
____________________________________________________________
Third-Party Licenses
This Product contains components that were created by third
parties and that are governed by third-party licenses, which are
contained hereinafter (separated by lines consisting of
underscores). Each of the third-party licenses applies only to
(portions of) the source code file(s) in which the third-party
license is contained or in which it is explicitly referenced,
and to compiled or otherwise processed forms of such source
code. None of the third-party licenses applies to This Product
as a whole, even when it uses terms such as "product",
"program", or any other equivalent terms/phrases. This Product
as a whole is governed by the TrueCrypt License (see above).
Some of the third-party components have been modified by the
authors of This Product. Unless otherwise stated, such
modifications and additions are governed by the TrueCrypt
License (see above). Note: Unless otherwise stated, graphics and
files that are not part of the source code are governed by the
TrueCrypt License.
____________________________________________________________
License agreement for Encryption for the Masses.
Copyright (C) 1998-2000 Paul Le Roux. All Rights Reserved.
This product can be copied and distributed free of charge,
including source code.
You may modify this product and source code, and distribute such
modifications, and you may derive new works based on this
product, provided that:
1. Any product which is simply derived from this product cannot
be called E4M, or Encryption for the Masses.
2. If you use any of the source code in your product, and your
product is distributed with source code, you must include this
notice with those portions of this source code that you use.
Or,
If your product is distributed in binary form only, you must
display on any packaging, and marketing materials which
reference your product, a notice which states:
"This product uses components written by Paul Le Roux
<pleroux@swprofessionals.com>"
3. If you use any of the source code originally by Eric Young,
you must in addition follow his terms and conditions.
4. Nothing requires that you accept this License, as you have
not signed it. However, nothing else grants you permission to
modify or distribute the product or its derivative works.
These actions are prohibited by law if you do not accept this
License.
5. If any of these license terms is found to be to broad in
scope, and declared invalid by any court or legal process, you
agree that all other terms shall not be so affected, and shall
remain valid and enforceable.
6. THIS PROGRAM IS DISTRIBUTED FREE OF CHARGE, THEREFORE THERE
IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. UNLESS OTHERWISE STATED THE PROGRAM IS PROVIDED
"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS
WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE
COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
7. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
INABILITY TO USE THE PROGRAM, INCLUDING BUT NOT LIMITED TO LOSS
OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH
ANY OTHER PROGRAMS, EVEN IF SUCH HOLDER OR OTHER PARTY HAD
PREVIOUSLY BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
____________________________________________________________
Copyright (c) 1998-2008, Brian Gladman, Worcester, UK.
All rights reserved.
LICENSE TERMS
The free distribution and use of this software is allowed (with
or without changes) provided that:
1. source code distributions include the above copyright
notice, this list of conditions and the following
disclaimer;
2. binary distributions include the above copyright notice,
this list of conditions and the following disclaimer in
their documentation;
3. the name of the copyright holder is not used to endorse
products built using this software without specific written
permission.
DISCLAIMER
This software is provided 'as is' with no explicit or implied
warranties in respect of its properties, including, but not
limited to, correctness and/or fitness for purpose.
____________________________________________________________
Copyright (C) 2002-2004 Mark Adler, all rights reserved
version 1.8, 9 Jan 2004
This software is provided 'as-is', without any express or
implied warranty. In no event will the author be held liable
for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you
must not claim that you wrote the original software. If you
use this software in a product, an acknowledgment in the
product documentation would be appreciated but is not
required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
____________________________________________________________
+257
View File
@@ -0,0 +1,257 @@
This archive contains the source code of VeraCrypt.
It is based on original TrueCrypt 7.1a with security enhancements and modifications.
Important
=========
You may use the source code contained in this archive only if you accept and
agree to the license terms contained in the file 'License.txt', which is
included in this archive.
Note that the license specifies, for example, that a derived work must not be
called 'TrueCrypt' or 'VeraCrypt'
Contents
========
I. Windows
Requirements for Building VeraCrypt for Windows
Instructions for Building VeraCrypt for Windows
Instructions for Signing and Packaging VeraCrypt for Windows
II. Linux and Mac OS X
Requirements for Building VeraCrypt for Linux and Mac OS X
Instructions for Building VeraCrypt for Linux and Mac OS X
Mac OS X specifics
III. FreeBSD and OpenSolaris
IV. Third-Party Developers (Contributors)
V. Legal Information
VI. Further Information
I. Windows
==========
Requirements for Building VeraCrypt for Windows:
------------------------------------------------
- Microsoft Visual C++ 2008 SP1 (Professional Edition or compatible)
- Microsoft Visual C++ 1.52 (available from MSDN Subscriber Downloads)
- Microsoft Windows SDK for Windows 7 (configured for Visual C++)
- Microsoft Windows Driver Kit 7.1.0 (build 7600.16385.1)
- RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki) 2.20
header files (available at ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20)
- NASM assembler 2.08 or compatible
- gzip compressor
IMPORTANT:
The 64-bit editions of Windows Vista and later versions of Windows, and in
some cases (e.g. playback of HD DVD content) also the 32-bit editions, do not
allow the VeraCrypt driver to run without an appropriate digital signature.
Therefore, all .sys files in official VeraCrypt binary packages are digitally
signed with the digital certificate of the IDRIX, which was
issued by Thawt certification authority. At the end of each official .exe and
.sys file, there are embedded digital signatures and all related certificates
(i.e. all certificates in the relevant certification chain, such as the
certification authority certificates, CA-MS cross-certificate, and the
IDRIX certificate). Keep this in mind if you compile VeraCrypt
and compare your binaries with the official binaries. If your binaries are
unsigned, the sizes of the official binaries will usually be approximately
10 KB greater than sizes of your binaries (there may be further differences
if you use a different version of the compiler, or if you install a different
or no service pack for Visual Studio, or different hotfixes for it, or if you
use different versions of the required SDKs).
Instructions for Building VeraCrypt for Windows:
------------------------------------------------
1) Create an environment variable 'MSVC16_ROOT' pointing to the folder 'MSVC15'
extracted from the Visual C++ 1.52 self-extracting package.
Note: The 16-bit installer MSVC15\SETUP.EXE cannot be run on 64-bit Windows,
but it is actually not necessary to run it. You only need to extract the
folder 'MSVC15', which contains the 32-bit binaries required to build the
VeraCrypt Boot Loader.
2) If you have installed the Windows Driver Development Kit in another
directory than '%SYSTEMDRIVE%\WinDDK', create an environment variable
'WINDDK_ROOT' pointing to the DDK installation directory.
3) Copy the PKCS #11 header files to a standard include path or create an
environment variable 'PKCS11_INC' pointing to the directory where
the PKCS #11 header files are installed.
4) Open the solution file 'VeraCrypt.sln' in Microsoft Visual Studio 2008.
5) Select 'All' as the active solution configuration.
6) Build the solution.
7) If successful, there should be newly built VeraCrypt binaries in the
'Release' folder.
Instructions for Signing VeraCrypt for Windows:
------------------------------------------------
The folder "Signing" contains a batch file (sign.bat) that will sign all
VeraCrypt components using a code signing certificate present on the
certificate store and also build the final installation setup.
The batch file suppose that the code signing certificate is issued by Thawt.
This is the case for IDRIX's certificate. If yours is issued by another CA,
then you should put the Root and Intermediate certificates in the "Signing"
folder and then modify sign.bat accordingly.
II. Linux and Mac OS X
======================
Requirements for Building VeraCrypt for Linux and Mac OS X:
-----------------------------------------------------------
- GNU Make
- GNU C++ Compiler 4.0 or compatible
- Apple Xcode (Mac OS X only)
- NASM assembler 2.08 or compatible (x86/x64 architecture only)
- pkg-config
- wxWidgets 3.0 shared library and header files installed or
wxWidgets 3.0 library source code (available at http://www.wxwidgets.org)
- FUSE library and header files (available at http://fuse.sourceforge.net
and https://osxfuse.github.io/)
- RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki) 2.20
header files (available at ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20).
They are already included in the source tree under the directory PKCS11 but
it is possible to override it using the environment variable 'PKCS11_INC'.
Instructions for Building VeraCrypt for Linux and Mac OS X:
-----------------------------------------------------------
1) Change the current directory to the root of the VeraCrypt source code.
2) If you have no wxWidgets shared library installed, run the following
command to configure the wxWidgets static library for VeraCrypt and to
build it:
$ make WXSTATIC=1 WX_ROOT=/usr/src/wxWidgets wxbuild
The variable WX_ROOT must point to the location of the source code of the
wxWidgets library. Output files will be placed in the './wxrelease/'
directory.
3) To build VeraCrypt, run the following command:
$ make
or if you have no wxWidgets shared library installed:
$ make WXSTATIC=1
4) If successful, the VeraCrypt executable should be located in the directory
'Main'.
By default, a universal executable supporting both graphical and text user
interface is built. To build a console-only executable, which requires no GUI
library, use the 'NOGUI' parameter:
$ make NOGUI=1 WXSTATIC=1 WX_ROOT=/usr/src/wxWidgets wxbuild
$ make NOGUI=1 WXSTATIC=1
Mac OS X specifics:
-----------------------------------------------------------
Under MacOSX, the SDK for OSX 10.7 is used by default. To use another version
of the SDK (e.i. 10.6), you can export the environment variable VC_OSX_TARGET :
$ export VC_OSX_TARGET=10.6
Before building under MacOSX, pkg-config must be installed if not yet available.
Get it from http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz and
compile using the following commands :
$ ./configure --with-internal-glib
$ make
$ sudo make install
After making sure pkg-config is available, download and install OSXFuse from
https://osxfuse.github.io/ (MacFUSE compatibility layer must selected)
The script build_veracrypt_macosx.sh available under "src/Build" performs the
full build of VeraCrypt including the creation of the installer pkg. It expects
to find the wxWidgets 3.0.2 sources at the same level as where you put
VeraCrypt sources (e.i. if "src" path is "/Users/joe/Projects/VeraCrypt/src"
then wxWidgets should be at "/Users/joe/Projects/wxWidgets-wxWidgets-3.0.2")
The build process uses Code Signing certificates whose ID is specified in
src/Main/Main.make (lines 167 & 169). You'll have to modify these lines to put
the ID of your Code Signing certificates or comment them if you don't have one.
Because of incompatibility issues with OSXFUSE, the SDK 10.9 generates a
VeraCrypt binary that has issues communicating with the OSXFUSE kernel extension.
Thus, we recommend to use the SDK 10.8 or earlier for building VeraCrypt.
III. FreeBSD and OpenSolaris
============================
FreeBSD and OpenSolaris are not yet supported.
IV. Third-Party Developers (Contributors)
=========================================
If you intend to implement a feature, please contact us first to make sure:
1) That the feature has not been implemented (we may have already implemented
it, but haven't released the code yet).
2) That the feature is acceptable.
3) Whether we need help of third-party developers with implementing the feature.
Information on how to contact us can be found at:
https://veracrypt.codeplex.com/
V. Legal Information
====================
Copyright Information
---------------------
This software as a whole:
Copyright (c) 2013-2014 IDRIX. All rights reserved.
Portions of this software:
Copyright (c) 2003-2012 TrueCrypt Developers Association. All rights reserved.
Copyright (c) 1998-2000 Paul Le Roux. All rights reserved.
Copyright (c) 1998-2008 Brian Gladman, Worcester, UK. All rights reserved.
Copyright (c) 2002-2004 Mark Adler. All rights reserved.
For more information, please see the legal notices attached to parts of the
source code.
Trademark Information
---------------------
Any trademarks contained in the source code, binaries, and/or in the
documentation, are the sole property of their respective owners.
VI. Further Information
=======================
http://www.veracrypt.fr
+16 -12
View File
@@ -194,20 +194,24 @@ BEGIN
CONTROL "",IDC_INFO_BOX_TEXT,"RichEdit20A",ES_MULTILINE | ES_READONLY | ES_NUMBER | WS_BORDER | WS_VSCROLL | WS_TABSTOP,5,6,361,188
END
IDD_KEYFILE_GENERATOR DIALOGEX 0, 0, 308, 270
IDD_KEYFILE_GENERATOR DIALOGEX 0, 0, 308, 303
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "VeraCrypt - Keyfile Generator"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Close",IDCLOSE,237,10,59,14
COMBOBOX IDC_PRF_ID,79,49,91,90,CBS_DROPDOWNLIST | WS_TABSTOP
PUSHBUTTON "Generate and Save Keyfile...",IDC_GENERATE_AND_SAVE_KEYFILE,89,248,131,14
PUSHBUTTON "Generate and Save Keyfile...",IDC_GENERATE_AND_SAVE_KEYFILE,92,281,131,14
LTEXT "IMPORTANT: Move your mouse as randomly as possible within this window. The longer you move it, the better. This significantly increases the cryptographic strength of the keyfile.",IDT_KEYFILE_GENERATOR_NOTE,11,5,213,33
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,1,40,307,1,WS_EX_STATICEDGE
RTEXT "Mixing PRF:",IDT_PRF,6,51,67,10,SS_CENTERIMAGE
GROUPBOX "Current Pool Content",IDT_POOL_CONTENTS,6,70,296,170
CONTROL "",IDC_POOL_CONTENTS,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,16,83,282,148,WS_EX_TRANSPARENT
CONTROL "Display pool content",IDC_DISPLAY_POOL_CONTENTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,191,51,111,10
LTEXT "Number of keyfiles:",IDT_NUMBER_KEYFILES,9,247,75,8
EDITTEXT IDC_NUMBER_KEYFILES,92,244,51,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
LTEXT "Keyfiles base name:",IDT_KEYFILES_BASE_NAME,9,266,75,8
EDITTEXT IDC_KEYFILES_BASE_NAME,92,263,131,14,ES_AUTOHSCROLL
END
IDD_MULTI_CHOICE_DLG DIALOGEX 0, 0, 167, 322
@@ -373,7 +377,7 @@ BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 299
TOPMARGIN, 7
BOTTOMMARGIN, 266
BOTTOMMARGIN, 299
END
IDD_MULTI_CHOICE_DLG, DIALOG
@@ -450,12 +454,12 @@ IDR_BOOT_LOADER_AES BIN "..\\Boot\\Windows\\Release_AES\
IDR_BOOT_LOADER_SERPENT BIN "..\\Boot\\Windows\\Release_Serpent\\BootLoader.com.gz"
IDR_BOOT_LOADER_TWOFISH BIN "..\\Boot\\Windows\\Release_Twofish\\BootLoader.com.gz"
IDR_BOOT_SECTOR_SHA2 BIN "..\\Boot\\Windows\\Release_SHA2\\BootSector.bin"
IDR_BOOT_SECTOR_AES_SHA2 BIN "..\\Boot\\Windows\\Release_AES_SHA2\\BootSector.bin"
IDR_BOOT_SECTOR_SHA2 BIN "..\\Boot\\Windows\\Release_SHA2\\BootSector.bin"
IDR_BOOT_SECTOR_AES_SHA2 BIN "..\\Boot\\Windows\\Release_AES_SHA2\\BootSector.bin"
IDR_BOOT_SECTOR_SERPENT_SHA2 BIN "..\\Boot\\Windows\\Release_Serpent_SHA2\\BootSector.bin"
IDR_BOOT_SECTOR_TWOFISH_SHA2 BIN "..\\Boot\\Windows\\Release_Twofish_SHA2\\BootSector.bin"
IDR_BOOT_LOADER_SHA2 BIN "..\\Boot\\Windows\\Release_SHA2\\BootLoader.com.gz"
IDR_BOOT_LOADER_AES_SHA2 BIN "..\\Boot\\Windows\\Release_AES_SHA2\\BootLoader.com.gz"
IDR_BOOT_LOADER_SHA2 BIN "..\\Boot\\Windows\\Release_SHA2\\BootLoader.com.gz"
IDR_BOOT_LOADER_AES_SHA2 BIN "..\\Boot\\Windows\\Release_AES_SHA2\\BootLoader.com.gz"
IDR_BOOT_LOADER_SERPENT_SHA2 BIN "..\\Boot\\Windows\\Release_Serpent_SHA2\\BootLoader.com.gz"
IDR_BOOT_LOADER_TWOFISH_SHA2 BIN "..\\Boot\\Windows\\Release_Twofish_SHA2\\BootLoader.com.gz"
@@ -469,14 +473,14 @@ IDR_RESCUE_LOADER_AES BIN "..\\Boot\\Windows\\Rescue_AES\\
IDR_RESCUE_LOADER_SERPENT BIN "..\\Boot\\Windows\\Rescue_Serpent\\BootLoader.com.gz"
IDR_RESCUE_LOADER_TWOFISH BIN "..\\Boot\\Windows\\Rescue_Twofish\\BootLoader.com.gz"
IDR_RESCUE_BOOT_SECTOR_SHA2 BIN "..\\Boot\\Windows\\Rescue_SHA2\\BootSector.bin"
IDR_RESCUE_BOOT_SECTOR_SHA2 BIN "..\\Boot\\Windows\\Rescue_SHA2\\BootSector.bin"
IDR_RESCUE_BOOT_SECTOR_AES_SHA2 BIN "..\\Boot\\Windows\\Rescue_AES_SHA2\\BootSector.bin"
IDR_RESCUE_BOOT_SECTOR_SERPENT_SHA2 BIN "..\\Boot\\Windows\\Rescue_Serpent_SHA2\\BootSector.bin"
IDR_RESCUE_BOOT_SECTOR_TWOFISH_SHA2 BIN "..\\Boot\\Windows\\Rescue_Twofish_SHA2\\BootSector.bin"
IDR_RESCUE_LOADER_SHA2 BIN "..\\Boot\\Windows\\Rescue_SHA2\\BootLoader.com.gz"
IDR_RESCUE_LOADER_AES_SHA2 BIN "..\\Boot\\Windows\\Rescue_AES_SHA2\\BootLoader.com.gz"
IDR_RESCUE_LOADER_SERPENT_SHA2 BIN "..\\Boot\\Windows\\Rescue_Serpent_SHA2\\BootLoader.com.gz"
IDR_RESCUE_LOADER_TWOFISH_SHA2 BIN "..\\Boot\\Windows\\Rescue_Twofish_SHA2\\BootLoader.com.gz"
IDR_RESCUE_LOADER_SHA2 BIN "..\\Boot\\Windows\\Rescue_SHA2\\BootLoader.com.gz"
IDR_RESCUE_LOADER_AES_SHA2 BIN "..\\Boot\\Windows\\Rescue_AES_SHA2\\BootLoader.com.gz"
IDR_RESCUE_LOADER_SERPENT_SHA2 BIN "..\\Boot\\Windows\\Rescue_Serpent_SHA2\\BootLoader.com.gz"
IDR_RESCUE_LOADER_TWOFISH_SHA2 BIN "..\\Boot\\Windows\\Rescue_Twofish_SHA2\\BootLoader.com.gz"
/////////////////////////////////////////////////////////////////////////////
//
+283 -31
View File
@@ -350,6 +350,57 @@ std::string ToUpperCase (const std::string &str)
return u;
}
size_t TrimWhiteSpace(char *str)
{
char *end, *ptr = str;
size_t out_size;
if(!str || *str == 0)
return 0;
// Trim leading space
while(isspace(*ptr)) ptr++;
if(*ptr == 0) // All spaces?
{
*str = 0;
return 0;
}
// Trim trailing space
end = str + strlen(str) - 1;
while(end > ptr && isspace(*end)) end--;
end++;
// Set output size to trimmed string length
out_size = (end - ptr);
// Copy trimmed string and add null terminator
memmove(str, ptr, out_size);
str[out_size] = 0;
return out_size;
}
// check the validity of a file name
BOOL IsValidFileName(const char* str)
{
static char invalidChars[9] = {'<', '>', ':', '"', '/', '\\', '|', '?', '*'};
char c;
int i;
BOOL bNotDotOnly = FALSE;
while ((c = *str))
{
if (c != '.')
bNotDotOnly = TRUE;
for (i= 0; i < sizeof(invalidChars); i++)
if (c == invalidChars[i])
return FALSE;
str++;
}
return bNotDotOnly;
}
BOOL IsVolumeDeviceHosted (const char *lpszDiskFile)
{
@@ -2409,14 +2460,15 @@ void InitApp (HINSTANCE hInstance, char *lpszCommandLine)
DWORD val = 0, size = sizeof(val);
HKEY hkey;
if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\Atapi\\Parameters", 0, KEY_READ, &hkey) == ERROR_SUCCESS
&& (RegQueryValueEx (hkey, "EnableBigLba", 0, 0, (LPBYTE) &val, &size) != ERROR_SUCCESS
|| val != 1))
if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\Atapi\\Parameters", 0, KEY_READ, &hkey) == ERROR_SUCCESS)
{
Warning ("LARGE_IDE_WARNING_2K_REGISTRY");
if (RegQueryValueEx (hkey, "EnableBigLba", 0, 0, (LPBYTE) &val, &size) != ERROR_SUCCESS
|| val != 1)
{
Warning ("LARGE_IDE_WARNING_2K_REGISTRY");
}
RegCloseKey (hkey);
}
RegCloseKey (hkey);
}
break;
@@ -2514,7 +2566,7 @@ void InitHelpFileName (void)
// Primary file name
if (strcmp (GetPreferredLangId(), "en") == 0
|| GetPreferredLangId() == NULL)
|| strlen(GetPreferredLangId()) == 0)
{
StringCbCatA (szHelpFile, sizeof(szHelpFile), "VeraCrypt User Guide.pdf");
}
@@ -2531,7 +2583,7 @@ void InitHelpFileName (void)
{
++lpszTmp;
*lpszTmp = 0;
StringCbCopyA (szHelpFile2, sizeof(szHelpFile2), "VeraCrypt User Guide.pdf");
StringCbCatA (szHelpFile2, sizeof(szHelpFile2), "VeraCrypt User Guide.pdf");
}
}
}
@@ -4944,6 +4996,10 @@ BOOL CALLBACK KeyfileGeneratorDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LP
#endif
SetTimer (hwndDlg, 0xfd, RANDPOOL_DISPLAY_REFRESH_INTERVAL, NULL);
SendMessage (GetDlgItem (hwndDlg, IDC_POOL_CONTENTS), WM_SETFONT, (WPARAM) hFixedDigitFont, (LPARAM) TRUE);
SendMessage (GetDlgItem (hwndDlg, IDC_NUMBER_KEYFILES), EM_SETLIMITTEXT, (WPARAM) (TC_MAX_PATH - 1), 0);
SetWindowText(GetDlgItem (hwndDlg, IDC_NUMBER_KEYFILES), "1");
// set the maximum length of the keyfile base name to (TC_MAX_PATH - 1)
SendMessage (GetDlgItem (hwndDlg, IDC_KEYFILES_BASE_NAME), EM_SETLIMITTEXT, (WPARAM) (TC_MAX_PATH - 1), 0);
return 1;
}
@@ -5010,40 +5066,133 @@ BOOL CALLBACK KeyfileGeneratorDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LP
if (lw == IDC_GENERATE_AND_SAVE_KEYFILE)
{
char szFileName [TC_MAX_PATH];
char szNumberKeyFiles[TC_MAX_PATH] = {0};
char szFileBaseName[TC_MAX_PATH];
char szDirName[TC_MAX_PATH];
char szFileName [3*TC_MAX_PATH];
unsigned char keyfile [MAX_PASSWORD];
int fhKeyfile = -1;
int fhKeyfile = -1, status;
long keyfilesCount = 0, i;
char* fileExtensionPtr = 0;
char szSuffix[32];
BOOL bBaseNameValid = FALSE;
/* Select filename */
if (!BrowseFiles (hwndDlg, "OPEN_TITLE", szFileName, bHistory, TRUE, NULL))
return 1;
if (!GetWindowText(GetDlgItem (hwndDlg, IDC_NUMBER_KEYFILES), szNumberKeyFiles, TC_MAX_PATH))
szNumberKeyFiles[0] = 0;
/* Conceive the file */
if ((fhKeyfile = _open(szFileName, _O_CREAT|_O_TRUNC|_O_WRONLY|_O_BINARY, _S_IREAD|_S_IWRITE)) == -1)
keyfilesCount = strtoul(szNumberKeyFiles, NULL, 0);
if (keyfilesCount <= 0 || keyfilesCount == LONG_MAX)
{
handleWin32Error (hwndDlg);
Warning("KEYFILE_INCORRECT_NUMBER");
SendMessage(hwndDlg, WM_NEXTDLGCTL, (WPARAM) GetDlgItem (hwndDlg, IDC_NUMBER_KEYFILES), TRUE);
return 1;
}
/* Generate the keyfile */
if (!GetWindowText(GetDlgItem (hwndDlg, IDC_KEYFILES_BASE_NAME), szFileBaseName, TC_MAX_PATH))
szFileBaseName[0] = 0;
// Trim trailing space
if (TrimWhiteSpace(szFileBaseName) == 0)
{
Warning("KEYFILE_EMPTY_BASE_NAME");
SendMessage(hwndDlg, WM_NEXTDLGCTL, (WPARAM) GetDlgItem (hwndDlg, IDC_KEYFILES_BASE_NAME), TRUE);
return 1;
}
if (!IsValidFileName(szFileBaseName))
{
Warning("KEYFILE_INVALID_BASE_NAME");
SendMessage(hwndDlg, WM_NEXTDLGCTL, (WPARAM) GetDlgItem (hwndDlg, IDC_KEYFILES_BASE_NAME), TRUE);
return 1;
}
fileExtensionPtr = strrchr(szFileBaseName, '.');
/* Select directory */
if (!BrowseDirectories (hwndDlg, "SELECT_KEYFILE_GENERATION_DIRECTORY", szDirName))
return 1;
if (szDirName[strlen(szDirName) - 1] != '\\' && szDirName[strlen(szDirName) - 1] != '/')
StringCbCat(szDirName, sizeof(szDirName), "\\");
WaitCursor();
if (!RandgetBytes (keyfile, sizeof(keyfile), TRUE))
for (i= 0; i < keyfilesCount; i++)
{
StringCbCopy(szFileName, sizeof(szFileName), szDirName);
if (i > 0)
{
StringCbPrintfA(szSuffix, sizeof(szSuffix), "_%d", i);
// Append the counter to the name
if (fileExtensionPtr)
{
StringCbCatN(szFileName, sizeof(szFileName), szFileBaseName, (size_t) (fileExtensionPtr - szFileBaseName));
StringCbCat(szFileName, sizeof(szFileName), szSuffix);
StringCbCat(szFileName, sizeof(szFileName), fileExtensionPtr);
}
else
{
StringCbCat(szFileName, sizeof(szFileName), szFileBaseName);
StringCbCat(szFileName, sizeof(szFileName), szSuffix);
}
}
else
StringCbCat(szFileName, sizeof(szFileName), szFileBaseName);
// check if the file exists
if ((fhKeyfile = _open(szFileName, _O_RDONLY|_O_BINARY, _S_IREAD|_S_IWRITE)) != -1)
{
WCHAR s[4*TC_MAX_PATH] = {0};
WCHAR wszFileName[3*TC_MAX_PATH] = {0};
_close (fhKeyfile);
MultiByteToWideChar(CP_ACP, 0, szFileName, -1, wszFileName, sizeof(wszFileName) / sizeof(WCHAR));
StringCbPrintfW (s, sizeof(s), GetString ("KEYFILE_ALREADY_EXISTS"), wszFileName);
status = AskWarnNoYesString (s);
if (status == IDNO)
{
NormalCursor();
return 1;
}
}
/* Conceive the file */
if ((fhKeyfile = _open(szFileName, _O_CREAT|_O_TRUNC|_O_WRONLY|_O_BINARY, _S_IREAD|_S_IWRITE)) == -1)
{
NormalCursor();
handleWin32Error (hwndDlg);
return 1;
}
/* Generate the keyfile */
if (!RandgetBytes (keyfile, sizeof(keyfile), TRUE))
{
_close (fhKeyfile);
DeleteFile (szFileName);
NormalCursor();
return 1;
}
/* Write the keyfile */
status = _write (fhKeyfile, keyfile, sizeof(keyfile));
burn (keyfile, sizeof(keyfile));
_close (fhKeyfile);
DeleteFile (szFileName);
NormalCursor();
return 1;
if (status == -1)
{
NormalCursor();
handleWin32Error (hwndDlg);
return 1;
}
}
NormalCursor();
/* Write the keyfile */
if (_write (fhKeyfile, keyfile, sizeof(keyfile)) == -1)
handleWin32Error (hwndDlg);
else
Info("KEYFILE_CREATED");
Info("KEYFILE_CREATED");
burn (keyfile, sizeof(keyfile));
_close (fhKeyfile);
return 1;
}
return 0;
@@ -7425,7 +7574,10 @@ char *LoadFile (const char *fileName, DWORD *size)
return NULL;
if ((fileSize = GetFileSize (h, NULL)) == INVALID_FILE_SIZE)
{
CloseHandle (h);
return NULL;
}
*size = fileSize;
buf = (char *) calloc (*size + 1, 1);
@@ -8364,15 +8516,115 @@ void Applink (char *dest, BOOL bSendOS, char *extraOutput)
// sprintf_s (url, sizeof (url), TC_APPLINK "%s%s&dest=%s", bSendOS ? ("&os=" + GetWindowsEdition()).c_str() : "", extraOutput, dest);
if (strcmp(dest, "donate") == 0)
{
StringCbPrintfA (url, sizeof (url),"%s", "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=PWT5LHZWANHY6");
StringCbCopyA (url, sizeof (url),"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5BCXVMTTNJDCY");
}
else if (strcmp(dest, "main") == 0)
{
StringCbCopyA (url, sizeof (url),TC_HOMEPAGE);
}
else if (strcmp(dest,"localizations") == 0)
{
StringCbPrintfA (url, sizeof (url),"http://sourceforge.net/projects/veracrypt/files/VeraCrypt%%20%s/VeraCrypt_%s_Language_Files.zip/download", VERSION_STRING, VERSION_STRING);
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Language%20Packs");
}
else if (strcmp(dest, "beginnerstutorial") == 0 || strcmp(dest,"tutorial") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Beginner%27s%20Tutorial");
}
else if (strcmp(dest, "releasenotes") == 0 || strcmp(dest, "history") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Release%20Notes");
}
else if (strcmp(dest, "hwacceleration") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Hardware%20Acceleration");
}
else if (strcmp(dest, "parallelization") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Parallelization");
}
else if (strcmp(dest, "help") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/documentation");
}
else if (strcmp(dest, "keyfiles") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Keyfiles");
}
else if (strcmp(dest, "introcontainer") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Creating%20New%20Volumes");
}
else if (strcmp(dest, "introsysenc") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=System%20Encryption");
}
else if (strcmp(dest, "hiddensysenc") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=VeraCrypt%20Hidden%20Operating%20System");
}
else if (strcmp(dest, "sysencprogressinfo") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=System%20Encryption");
}
else if (strcmp(dest, "hiddenvolume") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Hidden%20Volume");
}
else if (strcmp(dest, "aes") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=AES");
}
else if (strcmp(dest, "serpent") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Serpent");
}
else if (strcmp(dest, "twofish") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Twofish");
}
else if (strcmp(dest, "cascades") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Cascades");
}
else if (strcmp(dest, "hashalgorithms") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Hash%20Algorithms");
}
else if (strcmp(dest, "isoburning") == 0)
{
StringCbCopyA (url, sizeof (url),"https://cdburnerxp.se/en/home");
}
else if (strcmp(dest, "sysfavorites") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=System%20Favorite%20Volumes");
}
else if (strcmp(dest, "favorites") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Favorite%20Volumes");
}
else if (strcmp(dest, "hiddenvolprotection") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Protection%20of%20Hidden%20Volumes");
}
else if (strcmp(dest, "faq") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=FAQ");
}
else if (strcmp(dest, "downloads") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Downloads");
}
else if (strcmp(dest, "news") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=News");
}
else if (strcmp(dest, "contact") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Contact");
}
else
{
StringCbPrintfA (url, sizeof (url),"%s", "https://sourceforge.net/projects/veracrypt/");
StringCbCopyA (url, sizeof (url),TC_APPLINK);
}
ShellExecute (NULL, "open", url, NULL, NULL, SW_SHOWNORMAL);
+2
View File
@@ -557,6 +557,7 @@ BOOL CALLBACK KeyFilesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
if (lw == IDC_LINK_KEYFILES_INFO)
{
Applink ("keyfiles", TRUE, "");
return 1;
}
if (lw == IDOK)
@@ -574,6 +575,7 @@ BOOL CALLBACK KeyFilesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
EndDialog (hwndDlg, IDCLOSE);
return 1;
}
break;
case WM_DROPFILES:
{
+10 -2
View File
@@ -145,6 +145,7 @@
<control lang="en" key="IDC_PREF_CACHE_PASSWORDS">Cache passwords in driver memory</control>
<control lang="en" key="IDC_PREF_DISMOUNT_INACTIVE">Auto-dismount volume after no data has been read/written to it for</control>
<control lang="en" key="IDC_PREF_DISMOUNT_LOGOFF">User logs off</control>
<control lang="en" key="IDC_PREF_DISMOUNT_SESSION_LOCKED">User session locked</control>
<control lang="en" key="IDC_PREF_DISMOUNT_POWERSAVING">Entering power saving mode</control>
<control lang="en" key="IDC_PREF_DISMOUNT_SCREENSAVER">Screen saver is launched</control>
<control lang="en" key="IDC_PREF_FORCE_AUTO_DISMOUNT">Force auto-dismount even if volume contains open files or directories</control>
@@ -330,6 +331,8 @@
<control lang="en" key="IDT_KEYFILE_GENERATOR_NOTE">IMPORTANT: Move your mouse as randomly as possible within this window. The longer you move it, the better. This significantly increases the cryptographic strength of the keyfile.</control>
<control lang="en" key="IDT_KEYFILE_WARNING">WARNING: If you lose a keyfile or if any bit of its first 1024 kilobytes changes, it will be impossible to mount volumes that use the keyfile!</control>
<control lang="en" key="IDT_KEY_UNIT">bits</control>
<control lang="en" key="IDT_NUMBER_KEYFILES">Number of keyfiles:</control>
<control lang="en" key="IDT_KEYFILES_BASE_NAME">Keyfiles base name:</control>
<control lang="en" key="IDT_LANGPACK_AUTHORS">Translated by:</control>
<control lang="en" key="IDT_PLAINTEXT">Plaintext size:</control>
<control lang="en" key="IDT_PLAINTEXT_SIZE_UNIT">bits</control>
@@ -599,6 +602,7 @@
<string lang="en" key="SELECT_DEST_DIR">Select destination directory</string>
<string lang="en" key="SELECT_KEYFILE">Select Keyfile</string>
<string lang="en" key="SELECT_KEYFILE_PATH">Select a keyfile search path. WARNING: Note that only the path will be remembered, not the filenames!</string>
<string lang="en" key="SELECT_KEYFILE_GENERATION_DIRECTORY">Select a directory where to store the keyfiles.</string>
<string lang="en" key="SERPENT_HELP">Designed by Ross Anderson, Eli Biham, and Lars Knudsen. Published in 1998. 256-bit key, 128-bit block. Mode of operation is XTS. Serpent was one of the AES finalists.</string>
<string lang="en" key="SIZE_HELP">Please specify the size of the container you want to create.\n\nIf you create a dynamic (sparse-file) container, this parameter will specify its maximum possible size.\n\nNote that the minimum possible size of a FAT volume is 292 KB. The minimum possible size of an NTFS volume is 3792 KB.</string>
<string lang="en" key="SIZE_HELP_HIDDEN_HOST_VOL">Please specify the size of the outer volume to be created (you will first create the outer volume and then a hidden volume within it). The minimum possible size of a volume within which a hidden volume is intended to be created is 340 KB.</string>
@@ -862,7 +866,11 @@
<string lang="en" key="ENTER_NORMAL_VOL_PASSWORD">Enter password for the normal/outer volume</string>
<string lang="en" key="ENTER_HIDDEN_VOL_PASSWORD">Enter password for the hidden volume</string>
<string lang="en" key="ENTER_HEADER_BACKUP_PASSWORD">Enter password for the header stored in backup file</string>
<string lang="en" key="KEYFILE_CREATED">Keyfile has been successfully created.</string>
<string lang="en" key="KEYFILE_CREATED">Keyfiles have been successfully created.</string>
<string lang="en" key="KEYFILE_INCORRECT_NUMBER">The number of keyfiles you supplied is invalid.</string>
<string lang="en" key="KEYFILE_EMPTY_BASE_NAME">Please enter a name for the keyfile(s) to be generated</string>
<string lang="en" key="KEYFILE_INVALID_BASE_NAME">The base name of the keyfile(s) is invalid</string>
<string lang="en" key="KEYFILE_ALREADY_EXISTS">The keyfile '%s' already exists.\nDo you want to overwrite it? The generation process will be stopped if you answer No.</string>
<string lang="en" key="HEADER_DAMAGED_AUTO_USED_HEADER_BAK">WARNING: The header of this volume is damaged! VeraCrypt automatically used the backup of the volume header embedded in the volume.\n\nYou should repair the volume header by selecting 'Tools' > 'Restore Volume Header'.</string>
<string lang="en" key="VOL_HEADER_BACKED_UP">Volume header backup has been successfully created.\n\nIMPORTANT: Restoring the volume header using this backup will also restore the current volume password. Moreover, if keyfile(s) are/is necessary to mount the volume, the same keyfile(s) will be necessary to mount the volume again when the volume header is restored.\n\nWARNING: This volume header backup may be used to restore the header ONLY of this particular volume. If you use this header backup to restore a header of a different volume, you will be able to mount the volume, but you will NOT be able to decrypt any data stored in the volume (because you will change its master key).</string>
<string lang="en" key="VOL_HEADER_RESTORED">The volume header has been successfully restored.\n\nIMPORTANT: Please note that an old password may have been restored as well. Moreover, if keyfile(s) were/was necessary to mount the volume when the backup was created, the same keyfile(s) are now necessary to mount the volume again.</string>
@@ -1216,7 +1224,7 @@
<string lang="en" key="ASK_REMOVE_DEVICE_WRITE_PROTECTION">Do you want VeraCrypt to attempt to disable write protection of the partition/drive?</string>
<string lang="en" key="CONFIRM_SETTING_DEGRADES_PERFORMANCE">WARNING: This setting may degrade performance.\n\nAre you sure you want to use this setting?</string>
<string lang="en" key="HOST_DEVICE_REMOVAL_DISMOUNT_WARN_TITLE">Warning: VeraCrypt volume auto-dismounted</string>
<string lang="en" key="HOST_DEVICE_REMOVAL_DISMOUNT_WARN">Before you physically remove or turn off a device containing a mounted volume, you should always dismount the volume in VeraCrypt first.\n\nUnexpected spontaneous dismount is usually caused by an intermittently failing cable, drive (enclosure), etc.</string>
<string lang="en" key="HOST_DEVICE_REMOVAL_DISMOUNT_WARN">Before you physically remove or turn off a device containing a mounted volume, you should always dismount the volume in VeraCrypt first.\n\nUnexpected spontaneous dismount is usually caused by an intermittently failing cable, drive (enclosure), etc.</string>
<string lang="en" key="TEST">Test</string>
<string lang="en" key="KEYFILE">Keyfile</string>
<string lang="en" key="VKEY_08">Backspace</string>
+14 -10
View File
@@ -43,18 +43,18 @@
#define IDD_NEW_TOKEN_KEYFILE 539
#define IDD_RANDOM_POOL_ENRICHMENT 540
#define IDI_TRUECRYPT_MOUNTED_ICON 541
#define IDR_BOOT_SECTOR_SHA2 542
#define IDR_BOOT_SECTOR_AES_SHA2 543
#define IDR_BOOT_SECTOR_SERPENT_SHA2 544
#define IDR_BOOT_SECTOR_TWOFISH_SHA2 545
#define IDR_BOOT_SECTOR_SHA2 542
#define IDR_BOOT_SECTOR_AES_SHA2 543
#define IDR_BOOT_SECTOR_SERPENT_SHA2 544
#define IDR_BOOT_SECTOR_TWOFISH_SHA2 545
#define IDR_BOOT_LOADER_SHA2 546
#define IDR_BOOT_LOADER_AES_SHA2 547
#define IDR_BOOT_LOADER_SERPENT_SHA2 548
#define IDR_BOOT_LOADER_TWOFISH_SHA2 549
#define IDR_RESCUE_BOOT_SECTOR_SHA2 550
#define IDR_RESCUE_BOOT_SECTOR_AES_SHA2 551
#define IDR_RESCUE_BOOT_SECTOR_SERPENT_SHA2 552
#define IDR_RESCUE_BOOT_SECTOR_TWOFISH_SHA2 553
#define IDR_BOOT_LOADER_TWOFISH_SHA2 549
#define IDR_RESCUE_BOOT_SECTOR_SHA2 550
#define IDR_RESCUE_BOOT_SECTOR_AES_SHA2 551
#define IDR_RESCUE_BOOT_SECTOR_SERPENT_SHA2 552
#define IDR_RESCUE_BOOT_SECTOR_TWOFISH_SHA2 553
#define IDR_RESCUE_LOADER_SHA2 554
#define IDR_RESCUE_LOADER_AES_SHA2 555
#define IDR_RESCUE_LOADER_SERPENT_SHA2 556
@@ -176,6 +176,10 @@
#define IDC_CONTINUE 5114
#define IDT_ABOUT_RELEASE 5115
#define IDT_STATIC_MODELESS_WAIT_DLG_INFO 5116
#define IDT_NUMBER_KEYFILES 5117
#define IDC_NUMBER_KEYFILES 5118
#define IDT_KEYFILES_BASE_NAME 5119
#define IDC_KEYFILES_BASE_NAME 5120
// Next default values for new objects
//
@@ -184,7 +188,7 @@
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 542
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 5117
#define _APS_NEXT_CONTROL_VALUE 5121
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
+2 -2
View File
@@ -252,8 +252,8 @@ void EraseMemory (void *memory, int size);
#define MAX_URL_LENGTH 2084 /* Internet Explorer limit. Includes the terminating null character. */
#define TC_HOMEPAGE "http://www.idrix.fr/"
#define TC_APPLINK "http://sourceforge.net/projects/veracrypt/"
#define TC_APPLINK_SECURE "https://sourceforge.net/projects/veracrypt/"
#define TC_APPLINK "https://veracrypt.codeplex.com"
#define TC_APPLINK_SECURE "https://veracrypt.codeplex.com"
enum
{
+71
View File
@@ -348,6 +348,36 @@ TWOFISH_TEST twofish_vectors[TWOFISH_TEST_COUNT] = {
/* Test vectors from FIPS 198a, RFC 4231, RFC 2104, RFC 2202, and other sources. */
char *hmac_sha256_test_keys[] =
{
"\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
"Jefe",
"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19",
"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
};
char *hmac_sha256_test_data[] =
{
"Hi There",
"what do ya want for nothing?",
"\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
"\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
"Test Using Larger Than Block-Size Key - Hash Key First",
"This is a test using a larger than block-size key and a larger than block-size data. The key needs to be hashed before being used by the HMAC algorithm.",
};
char *hmac_sha256_test_vectors[] =
{
"\xb0\x34\x4c\x61\xd8\xdb\x38\x53\x5c\xa8\xaf\xce\xaf\x0b\xf1\x2b\x88\x1d\xc2\x00\xc9\x83\x3d\xa7\x26\xe9\x37\x6c\x2e\x32\xcf\xf7",
"\x5b\xdc\xc1\x46\xbf\x60\x75\x4e\x6a\x04\x24\x26\x08\x95\x75\xc7\x5a\x00\x3f\x08\x9d\x27\x39\x83\x9d\xec\x58\xb9\x64\xec\x38\x43",
"\x77\x3e\xa9\x1e\x36\x80\x0e\x46\x85\x4d\xb8\xeb\xd0\x91\x81\xa7\x29\x59\x09\x8b\x3e\xf8\xc1\x22\xd9\x63\x55\x14\xce\xd5\x65\xfe",
"\x82\x55\x8a\x38\x9a\x44\x3c\x0e\xa4\xcc\x81\x98\x99\xf2\x08\x3a\x85\xf0\xfa\xa3\xe5\x78\xf8\x07\x7a\x2e\x3f\xf4\x67\x29\x66\x5b",
"\x60\xe4\x31\x59\x1e\xe0\xb6\x7f\x0d\x8a\x26\xaa\xcb\xf5\xb7\x7f\x8e\x0b\xc6\x21\x37\x28\xc5\x14\x05\x46\x04\x0f\x0e\xe3\x7f\x54",
"\x9b\x09\xff\xa7\x1b\x94\x2f\xcb\x27\x63\x5f\xbc\xd5\xb0\xe9\x44\xbf\xdc\x63\x64\x4f\x07\x13\x93\x8a\x7f\x51\x53\x5c\x3a\x35\xe2",
};
char *hmac_sha512_test_keys[] =
{
"\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
@@ -979,6 +1009,23 @@ BOOL AutoTestAlgorithms (void)
return result;
}
BOOL test_hmac_sha256 ()
{
unsigned int i;
int nTestsPerformed = 0;
for (i = 0; i < sizeof (hmac_sha256_test_data) / sizeof(char *); i++)
{
char digest[SHA256_DIGESTSIZE];
hmac_sha256 (hmac_sha256_test_keys[i], (int) strlen (hmac_sha256_test_keys[i]), hmac_sha256_test_data[i], (int) strlen (hmac_sha256_test_data[i]), digest);
if (memcmp (digest, hmac_sha256_test_vectors[i], SHA256_DIGESTSIZE) != 0)
return FALSE;
else
nTestsPerformed++;
}
return (nTestsPerformed == 6);
}
BOOL test_hmac_sha512 ()
{
@@ -1031,6 +1078,10 @@ BOOL test_pkcs5 ()
{
char dk[144];
/* HMAC-SHA-256 tests */
if (!test_hmac_sha256())
return FALSE;
/* HMAC-SHA-512 tests */
if (!test_hmac_sha512())
return FALSE;
@@ -1043,6 +1094,26 @@ BOOL test_pkcs5 ()
if (test_hmac_whirlpool() == FALSE)
return FALSE;
/* PKCS-5 test 1 with HMAC-SHA-256 used as the PRF (https://tools.ietf.org/html/draft-josefsson-scrypt-kdf-00) */
derive_key_sha256 ("passwd", 6, "\x73\x61\x6C\x74", 4, 1, dk, 64);
if (memcmp (dk, "\x55\xac\x04\x6e\x56\xe3\x08\x9f\xec\x16\x91\xc2\x25\x44\xb6\x05\xf9\x41\x85\x21\x6d\xde\x04\x65\xe6\x8b\x9d\x57\xc2\x0d\xac\xbc\x49\xca\x9c\xcc\xf1\x79\xb6\x45\x99\x16\x64\xb3\x9d\x77\xef\x31\x7c\x71\xb8\x45\xb1\xe3\x0b\xd5\x09\x11\x20\x41\xd3\xa1\x97\x83", 64) != 0)
return FALSE;
/* PKCS-5 test 2 with HMAC-SHA-256 used as the PRF (https://stackoverflow.com/questions/5130513/pbkdf2-hmac-sha2-test-vectors) */
derive_key_sha256 ("password", 8, "\x73\x61\x6C\x74", 4, 2, dk, 32);
if (memcmp (dk, "\xae\x4d\x0c\x95\xaf\x6b\x46\xd3\x2d\x0a\xdf\xf9\x28\xf0\x6d\xd0\x2a\x30\x3f\x8e\xf3\xc2\x51\xdf\xd6\xe2\xd8\x5a\x95\x47\x4c\x43", 32) != 0)
return FALSE;
/* PKCS-5 test 3 with HMAC-SHA-256 used as the PRF (MS CryptoAPI) */
derive_key_sha256 ("password", 8, "\x12\x34\x56\x78", 4, 5, dk, 4);
if (memcmp (dk, "\xf2\xa0\x4f\xb2", 4) != 0)
return FALSE;
/* PKCS-5 test 4 with HMAC-SHA-256 used as the PRF (MS CryptoAPI) */
derive_key_sha256 ("password", 8, "\x12\x34\x56\x78", 4, 5, dk, 144);
if (memcmp (dk, "\xf2\xa0\x4f\xb2\xd3\xe9\xa5\xd8\x51\x0b\x5c\x06\xdf\x70\x8e\x24\xe9\xc7\xd9\x15\x3d\x22\xcd\xde\xb8\xa6\xdb\xfd\x71\x85\xc6\x99\x32\xc0\xee\x37\x27\xf7\x24\xcf\xea\xa6\xac\x73\xa1\x4c\x4e\x52\x9b\x94\xf3\x54\x06\xfc\x04\x65\xa1\x0a\x24\xfe\xf0\x98\x1d\xa6\x22\x28\xeb\x24\x55\x74\xce\x6a\x3a\x28\xe2\x04\x3a\x59\x13\xec\x3f\xf2\xdb\xcf\x58\xdd\x53\xd9\xf9\x17\xf6\xda\x74\x06\x3c\x0b\x66\xf5\x0f\xf5\x58\xa3\x27\x52\x8c\x5b\x07\x91\xd0\x81\xeb\xb6\xbc\x30\x69\x42\x71\xf2\xd7\x18\x42\xbe\xe8\x02\x93\x70\x66\xad\x35\x65\xbc\xf7\x96\x8e\x64\xf1\xc6\x92\xda\xe0\xdc\x1f\xb5\xf4", 144) != 0)
return FALSE;
/* PKCS-5 test 1 with HMAC-SHA-512 used as the PRF */
derive_key_sha512 ("password", 8, "\x12\x34\x56\x78", 4, 5, dk, 4);
if (memcmp (dk, "\x13\x64\xae\xf8", 4) != 0)
+5 -6
View File
@@ -519,10 +519,9 @@ MainFrameBase::~MainFrameBase()
WizardFrameBase::WizardFrameBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
this->SetSizeHints( wxSize( 750,450 ), wxDefaultSize );
wxBoxSizer* bSizer92;
bSizer92 = new wxBoxSizer( wxVERTICAL );
MainSizer = new wxBoxSizer( wxVERTICAL );
MainPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bSizer63;
@@ -598,12 +597,12 @@ WizardFrameBase::WizardFrameBase( wxWindow* parent, wxWindowID id, const wxStrin
MainPanel->SetSizer( bSizer63 );
MainPanel->Layout();
bSizer63->Fit( MainPanel );
bSizer92->Add( MainPanel, 1, wxEXPAND, 5 );
MainSizer->Add( MainPanel, 1, wxEXPAND, 5 );
this->SetSizer( bSizer92 );
this->SetSizer( MainSizer );
this->Layout();
bSizer92->Fit( this );
MainSizer->Fit( this );
// Connect Events
this->Connect( wxEVT_ACTIVATE, wxActivateEventHandler( WizardFrameBase::OnActivate ) );
+1
View File
@@ -161,6 +161,7 @@ namespace VeraCrypt
private:
protected:
wxBoxSizer* MainSizer;
wxPanel* MainPanel;
wxStaticBitmap* WizardBitmap;
wxStaticText* PageTitleStaticText;
+3 -3
View File
@@ -2403,7 +2403,7 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="minimum_size">750,450</property>
<property name="name">WizardFrameBase</property>
<property name="pos"></property>
<property name="size">-1,-1</property>
@@ -2452,9 +2452,9 @@
<event name="OnUpdateUI"></event>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer92</property>
<property name="name">MainSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<property name="permission">protected</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
+107 -38
View File
@@ -1006,48 +1006,117 @@ namespace VeraCrypt
wxString GraphicUserInterface::GetHomepageLinkURL (const wxString &linkId, bool secure, const wxString &extraVars) const
{
wxString url = wxString (StringConverter::ToWide (secure ? TC_APPLINK_SECURE : TC_APPLINK)); /* + L"&dest=" + linkId;
wxString os, osVersion, architecture;
#ifdef TC_WINDOWS
os = L"Windows";
#elif defined (TC_UNIX)
struct utsname unameData;
if (uname (&unameData) != -1)
wxString url = wxString (StringConverter::ToWide (secure ? TC_APPLINK_SECURE : TC_APPLINK));
if (linkId == L"donate")
{
os = StringConverter::ToWide (unameData.sysname);
osVersion = StringConverter::ToWide (unameData.release);
architecture = StringConverter::ToWide (unameData.machine);
if (os == L"Darwin")
os = L"MacOSX";
url = L"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5BCXVMTTNJDCY";
}
else
os = L"Unknown";
#else
os = L"Unknown";
#endif
os.Replace (L" ", L"-");
url += L"&os=";
url += os;
osVersion.Replace (L" ", L"-");
url += L"&osver=";
url += osVersion;
architecture.Replace (L" ", L"-");
url += L"&arch=";
url += architecture;
if (!extraVars.empty())
else if (linkId == L"main")
{
url += L"&";
url += extraVars;
url = wxString (StringConverter::ToWide (TC_HOMEPAGE));
}
*/
else if (linkId == L"localizations")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=Language%20Packs";
}
else if (linkId == L"beginnerstutorial" || linkId == L"tutorial")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=Beginner%27s%20Tutorial";
}
else if (linkId == L"releasenotes" || linkId == L"history")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=Release%20Notes";
}
else if (linkId == L"hwacceleration")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=Hardware%20Acceleration";
}
else if (linkId == L"parallelization")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=Parallelization";
}
else if (linkId == L"help")
{
url = L"https://veracrypt.codeplex.com/documentation";
}
else if (linkId == L"keyfiles")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=Keyfiles";
}
else if (linkId == L"introcontainer")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=Creating%20New%20Volumes";
}
else if (linkId == L"introsysenc")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=System%20Encryption";
}
else if (linkId == L"hiddensysenc")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=VeraCrypt%20Hidden%20Operating%20System";
}
else if (linkId == L"sysencprogressinfo")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=System%20Encryption";
}
else if (linkId == L"hiddenvolume")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=Hidden%20Volume";
}
else if (linkId == L"aes")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=AES";
}
else if (linkId == L"serpent")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=Serpent";
}
else if (linkId == L"twofish")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=Twofish";
}
else if (linkId == L"cascades")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=Cascades";
}
else if (linkId == L"hashalgorithms")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=Hash%20Algorithms";
}
else if (linkId == L"isoburning")
{
url = L"https://cdburnerxp.se/en/home";
}
else if (linkId == L"sysfavorites")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=System%20Favorite%20Volumes";
}
else if (linkId == L"favorites")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=Favorite%20Volumes";
}
else if (linkId == L"hiddenvolprotection")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=Protection%20of%20Hidden%20Volumes";
}
else if (linkId == L"faq")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=FAQ";
}
else if (linkId == L"downloads")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=Downloads";
}
else if (linkId == L"news")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=News";
}
else if (linkId == L"contact")
{
url = L"https://veracrypt.codeplex.com/wikipage?title=Contact";
}
return url;
}
+92 -1
View File
@@ -48,6 +48,11 @@
#include <Strsafe.h>
#include <wtsapi32.h>
typedef BOOL (WINAPI *WTSREGISTERSESSIONNOTIFICATION)(HWND, DWORD);
typedef BOOL (WINAPI *WTSUNREGISTERSESSIONNOTIFICATION)(HWND);
using namespace VeraCrypt;
enum timer_ids
@@ -85,6 +90,7 @@ BOOL bWipeCacheOnAutoDismount = TRUE;
BOOL bEnableBkgTask = FALSE;
BOOL bCloseBkgTaskWhenNoVolumes = FALSE;
BOOL bDismountOnLogOff = TRUE;
BOOL bDismountOnSessionLocked = TRUE;
BOOL bDismountOnScreenSaver = TRUE;
BOOL bDismountOnPowerSaving = FALSE;
BOOL bForceAutoDismount = TRUE;
@@ -142,6 +148,51 @@ static int bPrebootPasswordDlgMode = FALSE;
static int NoCmdLineArgs;
static BOOL CmdLineVolumeSpecified;
static int LastDriveListVolumeColumnWidth;
// WTS handling
static HMODULE hWtsLib = NULL;
static WTSREGISTERSESSIONNOTIFICATION fnWtsRegisterSessionNotification = NULL;
static WTSUNREGISTERSESSIONNOTIFICATION fnWtsUnRegisterSessionNotification = NULL;
static void RegisterWtsNotification(HWND hWnd)
{
if (!hWtsLib)
{
char dllPath[MAX_PATH];
if (GetSystemDirectory(dllPath, MAX_PATH))
StringCbCatA(dllPath, sizeof(dllPath), "\\wtsapi32.dll");
else
StringCbCopyA(dllPath, sizeof(dllPath), "c:\\Windows\\System32\\wtsapi32.dll");
hWtsLib = LoadLibrary(dllPath);
if (hWtsLib)
{
fnWtsRegisterSessionNotification = (WTSREGISTERSESSIONNOTIFICATION) GetProcAddress(hWtsLib, "WTSRegisterSessionNotification" );
fnWtsUnRegisterSessionNotification = (WTSUNREGISTERSESSIONNOTIFICATION) GetProcAddress(hWtsLib, "WTSUnRegisterSessionNotification" );
if ( !fnWtsRegisterSessionNotification
|| !fnWtsUnRegisterSessionNotification
|| !fnWtsRegisterSessionNotification( hWnd, NOTIFY_FOR_THIS_SESSION )
)
{
fnWtsRegisterSessionNotification = NULL;
fnWtsUnRegisterSessionNotification = NULL;
FreeLibrary(hWtsLib);
hWtsLib = NULL;
}
}
}
}
static void UnregisterWtsNotification(HWND hWnd)
{
if (hWtsLib && fnWtsUnRegisterSessionNotification)
{
fnWtsUnRegisterSessionNotification(hWnd);
FreeLibrary(hWtsLib);
hWtsLib = NULL;
fnWtsRegisterSessionNotification = NULL;
fnWtsUnRegisterSessionNotification = NULL;
}
}
static void localcleanup (void)
{
@@ -215,6 +266,7 @@ void EndMainDlg (HWND hwndDlg)
{
KillTimer (hwndDlg, TIMER_ID_MAIN);
TaskBarIconRemove (hwndDlg);
UnregisterWtsNotification(hwndDlg);
EndDialog (hwndDlg, 0);
}
}
@@ -427,6 +479,7 @@ void LoadSettings (HWND hwndDlg)
bCloseBkgTaskWhenNoVolumes = ConfigReadInt ("CloseBackgroundTaskOnNoVolumes", FALSE);
bDismountOnLogOff = ConfigReadInt ("DismountOnLogOff", !(IsServerOS() && IsAdmin()));
bDismountOnSessionLocked = ConfigReadInt ("DismountOnSessionLocked", FALSE);
bDismountOnPowerSaving = ConfigReadInt ("DismountOnPowerSaving", FALSE);
bDismountOnScreenSaver = ConfigReadInt ("DismountOnScreenSaver", FALSE);
bForceAutoDismount = ConfigReadInt ("ForceAutoDismount", TRUE);
@@ -521,6 +574,7 @@ void SaveSettings (HWND hwndDlg)
ConfigWriteInt ("CloseBackgroundTaskOnNoVolumes", bCloseBkgTaskWhenNoVolumes);
ConfigWriteInt ("DismountOnLogOff", bDismountOnLogOff);
ConfigWriteInt ("DismountOnSessionLocked", bDismountOnSessionLocked);
ConfigWriteInt ("DismountOnPowerSaving", bDismountOnPowerSaving);
ConfigWriteInt ("DismountOnScreenSaver", bDismountOnScreenSaver);
ConfigWriteInt ("ForceAutoDismount", bForceAutoDismount);
@@ -2187,6 +2241,7 @@ static void PreferencesDlgEnableButtons (HWND hwndDlg)
BOOL back = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_BKG_TASK_ENABLE));
BOOL idle = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_INACTIVE));
BOOL installed = !IsNonInstallMode();
BOOL wtsEnabled = (hWtsLib != NULL) ? TRUE : FALSE;
EnableWindow (GetDlgItem (hwndDlg, IDC_CLOSE_BKG_TASK_WHEN_NOVOL), back && installed);
EnableWindow (GetDlgItem (hwndDlg, IDT_LOGON), installed);
@@ -2196,6 +2251,7 @@ static void PreferencesDlgEnableButtons (HWND hwndDlg)
EnableWindow (GetDlgItem (hwndDlg, IDT_AUTO_DISMOUNT_ON), back);
EnableWindow (GetDlgItem (hwndDlg, IDT_MINUTES), back);
EnableWindow (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_LOGOFF), back);
EnableWindow (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_SESSION_LOCKED), back && wtsEnabled);
EnableWindow (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_POWERSAVING), back);
EnableWindow (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_SCREENSAVER), back);
EnableWindow (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_INACTIVE), back);
@@ -2266,6 +2322,9 @@ BOOL CALLBACK PreferencesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
SendMessage (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_LOGOFF), BM_SETCHECK,
bDismountOnLogOff ? BST_CHECKED:BST_UNCHECKED, 0);
SendMessage (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_SESSION_LOCKED), BM_SETCHECK,
bDismountOnSessionLocked ? BST_CHECKED:BST_UNCHECKED, 0);
SendMessage (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_POWERSAVING), BM_SETCHECK,
bDismountOnPowerSaving ? BST_CHECKED:BST_UNCHECKED, 0);
@@ -2295,25 +2354,28 @@ BOOL CALLBACK PreferencesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
// Forced dismount disabled warning
if (lw == IDC_PREF_DISMOUNT_INACTIVE
|| lw == IDC_PREF_DISMOUNT_LOGOFF
|| lw == IDC_PREF_DISMOUNT_SESSION_LOCKED
|| lw == IDC_PREF_DISMOUNT_POWERSAVING
|| lw == IDC_PREF_DISMOUNT_SCREENSAVER
|| lw == IDC_PREF_FORCE_AUTO_DISMOUNT)
{
BOOL i = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_INACTIVE));
BOOL l = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_LOGOFF));
BOOL sl = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_SESSION_LOCKED));
BOOL p = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_POWERSAVING));
BOOL s = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_SCREENSAVER));
BOOL q = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_FORCE_AUTO_DISMOUNT));
if (!q)
{
if (lw == IDC_PREF_FORCE_AUTO_DISMOUNT && (i || l || p || s))
if (lw == IDC_PREF_FORCE_AUTO_DISMOUNT && (i || l || sl || p || s))
{
if (AskWarnNoYes ("CONFIRM_NO_FORCED_AUTODISMOUNT") == IDNO)
SetCheckBox (hwndDlg, IDC_PREF_FORCE_AUTO_DISMOUNT, TRUE);
}
else if ((lw == IDC_PREF_DISMOUNT_INACTIVE && i
|| lw == IDC_PREF_DISMOUNT_LOGOFF && l
|| lw == IDC_PREF_DISMOUNT_SESSION_LOCKED && sl
|| lw == IDC_PREF_DISMOUNT_POWERSAVING && p
|| lw == IDC_PREF_DISMOUNT_SCREENSAVER && s))
Warning ("WARN_PREF_AUTO_DISMOUNT");
@@ -2345,6 +2407,7 @@ BOOL CALLBACK PreferencesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
bEnableBkgTask = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_BKG_TASK_ENABLE));
bCloseBkgTaskWhenNoVolumes = IsNonInstallMode() ? bCloseBkgTaskWhenNoVolumes : IsButtonChecked (GetDlgItem (hwndDlg, IDC_CLOSE_BKG_TASK_WHEN_NOVOL));
bDismountOnLogOff = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_LOGOFF));
bDismountOnSessionLocked = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_SESSION_LOCKED));
bDismountOnPowerSaving = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_POWERSAVING));
bDismountOnScreenSaver = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_DISMOUNT_SCREENSAVER));
bForceAutoDismount = IsButtonChecked (GetDlgItem (hwndDlg, IDC_PREF_FORCE_AUTO_DISMOUNT));
@@ -5000,6 +5063,8 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
}
if (TaskBarIconMutex != NULL)
RegisterWtsNotification(hwndDlg);
DoPostInstallTasks ();
ResetCurrentDirectory ();
}
@@ -5030,6 +5095,25 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
OpenPageHelp (hwndDlg, 0);
return 1;
case WM_WTSSESSION_CHANGE:
if (TaskBarIconMutex != NULL)
{
if (bDismountOnSessionLocked && (WTS_SESSION_LOCK == wParam))
{
// Auto-dismount when session is locked
DWORD dwResult;
if (bWipeCacheOnAutoDismount)
{
DeviceIoControl (hDriver, TC_IOCTL_WIPE_PASSWORD_CACHE, NULL, 0, NULL, 0, &dwResult, NULL);
SecurityToken::CloseAllSessions();
}
DismountAll (hwndDlg, bForceAutoDismount, TRUE, UNMOUNT_MAX_AUTO_RETRIES, UNMOUNT_AUTO_RETRY_DELAY);
}
}
return 0;
case WM_ENDSESSION:
if (TaskBarIconMutex != NULL)
{
@@ -5045,6 +5129,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
TaskBarIconRemove (hwndDlg);
UnregisterWtsNotification(hwndDlg);
}
EndMainDlg (hwndDlg);
localcleanup ();
@@ -5255,6 +5340,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
&& GetDriverRefCount () < 2)
{
TaskBarIconRemove (hwndDlg);
UnregisterWtsNotification(hwndDlg);
EndMainDlg (hwndDlg);
}
}
@@ -5374,6 +5460,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
EnumWindows (CloseTCWindowsEnum, 0);
TaskBarIconRemove (hwndDlg);
UnregisterWtsNotification(hwndDlg);
SendMessage (hwndDlg, WM_COMMAND, sel, 0);
}
}
@@ -5394,6 +5481,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
case TC_APPMSG_CLOSE_BKG_TASK:
if (TaskBarIconMutex != NULL)
TaskBarIconRemove (hwndDlg);
UnregisterWtsNotification(hwndDlg);
return 1;
@@ -6129,10 +6217,12 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if (bEnableBkgTask)
{
TaskBarIconAdd (hwndDlg);
RegisterWtsNotification(hwndDlg);
}
else
{
TaskBarIconRemove (hwndDlg);
UnregisterWtsNotification(hwndDlg);
if (MainWindowHidden)
EndMainDlg (hwndDlg);
}
@@ -7376,6 +7466,7 @@ static void HandleHotKey (HWND hwndDlg, WPARAM wParam)
MessageBeep (0xFFFFFFFF);
}
TaskBarIconRemove (hwndDlg);
UnregisterWtsNotification(hwndDlg);
EndMainDlg (hwndDlg);
break;
+4 -2
View File
@@ -59,9 +59,9 @@ BEGIN
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,140,75,188,10
CONTROL "User logs off",IDC_PREF_DISMOUNT_LOGOFF,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,81,104,114,11
CONTROL "Entering power saving mode",IDC_PREF_DISMOUNT_POWERSAVING,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,197,109,130,11
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,197,115,130,11
CONTROL "Screen saver is launched",IDC_PREF_DISMOUNT_SCREENSAVER,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,81,115,114,10
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,81,116,114,10
CONTROL "Auto-dismount volume after no data has been read/written to it for",IDC_PREF_DISMOUNT_INACTIVE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,128,246,11
EDITTEXT IDC_PREF_DISMOUNT_INACTIVE_TIME,258,127,27,12,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
@@ -90,6 +90,8 @@ BEGIN
LTEXT "Dismount all when:",IDT_AUTO_DISMOUNT_ON,9,110,71,17
GROUPBOX "Password Cache",IDT_PW_CACHE_OPTIONS,4,216,328,39
GROUPBOX "Actions to perform upon logon to Windows",IDT_LOGON,4,63,328,28
CONTROL "User session locked",IDC_PREF_DISMOUNT_SESSION_LOCKED,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,197,105,130,11
END
IDD_VOLUME_PROPERTIES DIALOGEX 60, 30, 284, 186
+2 -1
View File
@@ -159,6 +159,7 @@
#define IDC_FAV_VOL_OPTIONS_GROUP_BOX 1134
#define IDC_FAVORITES_HELP_LINK 1135
#define IDC_FAV_VOL_OPTIONS_GLOBAL_SETTINGS_BOX 1136
#define IDC_PREF_DISMOUNT_SESSION_LOCKED 1137
#define IDM_HELP 40001
#define IDM_ABOUT 40002
#define IDM_UNMOUNT_VOLUME 40003
@@ -230,7 +231,7 @@
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 118
#define _APS_NEXT_COMMAND_VALUE 40064
#define _APS_NEXT_CONTROL_VALUE 1137
#define _APS_NEXT_CONTROL_VALUE 1138
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
+14
View File
@@ -187,6 +187,20 @@ compile using the following commands :
After making sure pkg-config is available, download and install OSXFuse from
https://osxfuse.github.io/ (MacFUSE compatibility layer must selected)
The script build_veracrypt_macosx.sh available under "src/Build" performs the
full build of VeraCrypt including the creation of the installer pkg. It expects
to find the wxWidgets 3.0.2 sources at the same level as where you put
VeraCrypt sources (e.i. if "src" path is "/Users/joe/Projects/VeraCrypt/src"
then wxWidgets should be at "/Users/joe/Projects/wxWidgets-wxWidgets-3.0.2")
The build process uses Code Signing certificates whose ID is specified in
src/Main/Main.make (lines 167 & 169). You'll have to modify these lines to put
the ID of your Code Signing certificates or comment them if you don't have one.
Because of incompatibility issues with OSXFUSE, the SDK 10.9 generates a
VeraCrypt binary that has issues communicating with the OSXFUSE kernel extension.
Thus, we recommend to use the SDK 10.8 or earlier for building VeraCrypt.
III. FreeBSD and OpenSolaris
Binary file not shown.
+1 -1
View File
@@ -1247,7 +1247,7 @@ BOOL DoShortcutsInstall (HWND hwndDlg, char *szDestDir, BOOL bProgGroup, BOOL bD
f = fopen (szTmp2, "w");
if (f)
{
fprintf (f, "[InternetShortcut]\nURL=%s\n", TC_HOMEPAGE);
fprintf (f, "[InternetShortcut]\nURL=%s\n", TC_APPLINK);
CheckFileStreamWriteErrors (f, szTmp2);
fclose (f);
+2 -2
View File
@@ -1178,11 +1178,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
bPromptReleaseNotes = FALSE;
/*if (bPromptTutorial
if (bPromptTutorial
&& AskYesNo ("AFTER_INSTALL_TUTORIAL") == IDYES)
{
Applink ("beginnerstutorial", TRUE, "");
}*/
}
bPromptTutorial = FALSE;
}