/* Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) and all other portions of this file are Copyright (c) 2013-2015 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. */ #ifndef TC_HEADER_Common_Exception #define TC_HEADER_Common_Exception #include "Platform/PlatformBase.h" #include "Dlgcode.h" #include "Language.h" #include namespace VeraCrypt { struct Exception { virtual void Show (HWND parent) const = 0; }; struct SystemException : public Exception { SystemException (const char *srcPos) : ErrorCode (GetLastError()), SrcPos (srcPos) { } void Show (HWND parent) const { SetLastError (ErrorCode); handleWin32Error (parent, SrcPos); } DWORD ErrorCode; const char *SrcPos; }; struct ErrorException : public Exception { ErrorException (char *langId, const char *srcPos) : SrcPos (srcPos), ErrLangId (langId) { } ErrorException (const wstring &errMsg, const char *srcPos) : SrcPos (srcPos), ErrLangId(NULL), ErrMsg (errMsg) { } void Show (HWND parent) const { if (ErrMsg.empty()) ::ErrorDirect (AppendSrcPos (GetString (ErrLangId? ErrLangId : ""), SrcPos).c_str (), parent); else ::ErrorDirect (AppendSrcPos (ErrMsg.c_str(), SrcPos).c_str (), parent); } const char *SrcPos; char *ErrLangId; wstring ErrMsg; }; struct ParameterIncorrect : public Exception { ParameterIncorrect (const char *srcPos) : SrcPos (srcPos) { } void Show (HWND parent) const { string msgBody = "Parameter incorrect.\n\n\n(If you report a bug in connection with this, please include the following technical information in the bug report:\n" + string (SrcPos) + ")"; MessageBox (parent, msgBody.c_str(), "VeraCrypt", MB_ICONERROR | MB_SETFOREGROUND); } const char *SrcPos; }; struct RandInitFailed : public Exception { RandInitFailed (const char *srcPos, DWORD dwLastError) : SrcPos (srcPos), LastError (dwLastError) { } void Show (HWND parent) const { char szErrCode[16]; StringCbPrintf (szErrCode, sizeof(szErrCode), "0x%.8X", LastError); string msgBody = "The Random Generator initialization failed.\n\n\n(If you report a bug in connection with this, please include the following technical information in the bug report:\n" + string (SrcPos) + "\nLast Error = " + string (szErrCode) + ")"; MessageBox (parent, msgBody.c_str(), "VeraCrypt", MB_ICONERROR | MB_SETFOREGROUND); } const char *SrcPos; DWORD LastError; }; struct CryptoApiFailed : public Exception { CryptoApiFailed (const char *srcPos, DWORD dwLastError) : SrcPos (srcPos), LastError (dwLastError) { } void Show (HWND parent) const { char szErrCode[16]; StringCbPrintf (szErrCode, sizeof(szErrCode), "0x%.8X", LastError); string msgBody = "Windows Crypto API failed.\n\n\n(If you report a bug in connection with this, please include the following technical information in the bug report:\n" + string (SrcPos) + "\nLast Error = " + string (szErrCode) + ")"; MessageBox (parent, msgBody.c_str(), "VeraCrypt", MB_ICONERROR | MB_SETFOREGROUND); } const char *SrcPos; DWORD LastError; }; struct TimeOut : public Exception { TimeOut (const char *srcPos) : SrcPos (srcPos) { } void Show (HWND parent) const { ErrorDirect (AppendSrcPos (L"Timeout", SrcPos).c_str (), parent); } const char *SrcPos; }; struct UserAbort : public Exception { UserAbort (const char *srcPos) { } void Show (HWND parent) const { } }; } #define throw_sys_if(condition) do { if (condition) throw SystemException( SRC_POS ); } while (false) #endif // TC_HEADER_Common_Exception enumbers'>
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" lang="ru">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>VeraCrypt - Бесплатное надёжное шифрование дисков с открытым исходным кодом</title>
<meta name="description" content="VeraCrypt это бесплатное программное обеспечение для шифрования дисков с открытым исходным кодом для Windows, Mac OS X (macOS) и Linux. В случае, если злоумышленник вынуждает вас раскрыть пароль, VeraCrypt обеспечивает правдоподобное отрицание наличия шифрования. В отличие от пофайлового шифрования, VeraCrypt шифрует данные в реальном времени (на лету), автоматически, прозрачно, требует очень мало памяти и не использует временные незашифрованные файлы."/>
<meta name="keywords" content="encryption, security, шифрование, безопасность"/>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>

<div>
<a href="Documentation.html"><img src="VeraCrypt128x128.png" alt="VeraCrypt"/></a>
</div>

<div id="menu">
	<ul>
	  <li><a href="Home.html">Начало</a></li>
	  <li><a href="/code/">Исходный код</a></li>
	  <li><a href="Downloads.html">Загрузить</a></li>
	  <li><a class="active" href="Documentation.html">Документация</a></li>
	  <li><a href="Donation.html">Поддержать разработку</a></li>
	  <li><a href="https://sourceforge.net/p/veracrypt/discussion/" target="_blank">Форум</a></li>
	</ul>
</div>

<div>
<p>
<a href="Documentation.html">Документация</a>
<img src="arrow_right.gif" alt=">>" style="margin-top: 5px">
<a href="Security%20Requirements%20and%20Precautions.html">Требования безопасности и меры предосторожности</a>
<img src="arrow_right.gif" alt=">>" style="margin-top: 5px">
<a href="Additional%20Security%20Requirements%20and%20Precautions.html">Дополнительные требования безопасности и меры предосторожности</a>
</p></div>

<div class="wikidoc">
<div>
<h1>Дополнительные требования безопасности и меры предосторожности</h1>
<p>Помимо всего, что описано в главе <a href="Security%20Requirements%20and%20Precautions.html"><em>Требования безопасности и меры предосторожности</em></a>,
вы обязаны помнить и соблюдать требования безопасности, меры предосторожности и ограничения, изложенные в следующих главах и разделах:</p>
<ul>
<li><a href="How%20to%20Back%20Up%20Securely.html"><em><strong>О безопасном резервном копировании</strong></em></a>
</li><li><a href="Issues%20and%20Ограничения.html"><em><strong>Ограничения</strong></em></a>
</li><li><a href="Security%20Model.html"><em><strong>Модель безопасности</strong></em></a>
</li><li><a href="Security%20Requirements%20for%20Hidden%20Volumes.html"><em><strong>Требования безопасности и меры предосторожности, касающиеся скрытых томов</strong></em></a>
</li><li><a href="Plausible%20Deniability.html"><em><strong>Правдоподобное отрицание наличия шифрования</strong></em></a>
</li></ul>
<p>См. также: <a href="Digital%20Signatures.html">
<em>Цифровые подписи</em></a></p>
</div>
</div><div class="ClearBoth"></div></body></html>