2
Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; version 2 of the License.
8
This program is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
GNU General Public License for more details.
13
You should have received a copy of the GNU General Public License
14
along with this program; see the file COPYING. If not, write to the
15
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
20
/* yaSSL error header defines error codes and an exception class
23
#ifndef yaSSL_ERROR_HPP
24
#define yaSSL_ERROR_HPP
34
// 10 - 47 from AlertDescription, 0 also close_notify
42
handshake_layer = 107,
50
certificate_error = 115,
51
privateKey_error = 116,
52
badVersion_error = 117,
54
decompress_error = 119,
55
pms_version_error = 120,
56
sanityCipher_error = 121
58
// !!!! add error message to .cpp !!!!
60
// 1000+ from TaoCrypt error.hpp
65
enum Library { yaSSL_Lib = 0, CryptoLib, SocketLib };
66
enum { MAX_ERROR_SZ = 80 };
68
void SetErrorString(YasslError, char*);
70
/* remove for now, if go back to exceptions use this wrapper
71
// Base class for all yaSSL exceptions
72
class Error : public mySTL::runtime_error {
76
explicit Error(const char* s = "", YasslError e = no_error,
77
Library l = yaSSL_Lib);
79
YasslError get_number() const;
80
Library get_lib() const;
87
#endif // yaSSL_ERROR_HPP