summaryrefslogtreecommitdiff
path: root/cpp/slice/IceSSL/Exception.ice
blob: ecc38057f30f603ce8a6493331e06faf518fe6a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
// **********************************************************************
//
// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

#ifndef ICE_SSL_EXCEPTION_ICE
#define ICE_SSL_EXCEPTION_ICE

module IceSSL
{

/**
 *
 * This exception represents the base of all security related exceptions
 * in &Ice;. It is a local exception because, usually, a problem with security
 * precludes a proper secure connection over which to transmit exceptions.
 * In addition, many exceptions would contain information that is of no use
 * to external clients/servers.
 *
 **/
local exception SslException
{
    /**
     *
     * Contains pertinent information from the security system to help
     * explain the nature of the exception in greater detail. In some
     * instances, it contains information from the underlying security
     * implementation and/or debugging trace.
     *
     **/
    string message;
};

/**
 *
 * This exception indicates that an attempt was made to load the
 * configuration for a <literal>Context</literal>, but the
 * property specifying the indicated <literal>Context</literal>'s 
 * SSL configuration file was not set. Check the values for the
 * appropriate property, either <literal>IceSSL.Client.Config</literal>
 * or <literal>IceSSL.Server.Config</literal>.
 *
 **/
local exception ConfigurationLoadingException extends SslException
{
};

/**
 *
 * This exception indicates that a problem occurred while parsing the
 * SSL configuration file, or while attempting to locate the configuration
 * file. This exception could indicate a
 * problem with the <literal>IceSSL.Client.Config</literal>,
 * <literal>IceSSL.Server.Config</literal>,
 * <literal>IceSSL.Client.CertPath</literal> or
 * <literal>IceSSL.Server.CertPath</literal> properties for your
 * [Ice::Communicator].
 *
 **/
local exception ConfigParseException extends SslException
{
};

/**
 *
 * This exception generally indicates that a problem occurred
 * that caused the shutdown of an SSL connection.
 *
 **/
local exception ShutdownException extends SslException
{
};

/**
 *
 * Indicates that a problem occurred that violates the SSL
 * protocol, causing the connection to be shutdown.
 *
 **/
local exception ProtocolException extends ShutdownException
{
};

/**
 *
 * Indicates a problem occurred during the certificate
 * verification phase of the SSL handshake. This is currently only
 * thrown by server connections.
 *
 **/
local exception CertificateVerificationException extends ShutdownException
{
};

/**
 *
 * A root exception class for all exceptions related to public key
 * certificates.
 *
 **/
local exception CertificateException extends SslException
{
};

/**
 *
 * Indicates that a problem occurred while signing certificates during
 * temporary RSA certificate generation.
 *
 **/
local exception CertificateSigningException extends CertificateException
{
};

/**
 *
 * Indicates that the signature verification of a newly signed temporary
 * RSA certificate has failed.
 *
 **/
local exception CertificateSignatureException extends CertificateException
{
};

/**
 *
 * Indicates that IceSSL was unable to parse the provided public key
 * certificate into a form usable by the underlying SSL implementation.
 *
 **/
local exception CertificateParseException extends CertificateException
{
};

/**
 *
 * A root exception class for all exceptions related to private keys.
 *
 **/
local exception PrivateKeyException extends SslException
{
};

/**
 *
 * Indicates that IceSSL was unable to parse the provided private key
 * into a form usable by the underlying SSL implementation.
 *
 **/
local exception PrivateKeyParseException extends PrivateKeyException
{
};

/**
 *
 * This exception indicates that the provided CertificateVerifier was
 * not derived from the proper base class, and thus, does not provide
 * the appropriate interface.
 *
 */
local exception CertificateVerifierTypeException extends SslException
{
};

/**
 *
 * A problem was encountered while setting up the
 * <literal>Context</literal>.  This can include problems related
 * to loading certificates and keys or calling methods on a
 * <literal>Context</literal> that has not been initialized as of yet.
 *
 **/
local exception ContextException extends SslException
{
};

/**
 *
 * Indicates that a problem occurred while initializing the context structure
 * of the underlying SSL implementation.
 *
 **/
local exception ContextInitializationException extends ContextException
{
};

/**
 *
 * This exception is raised when an attempt is made to make use of a
 * <literal>Context</literal> that has not been configured yet.
 *
 **/
local exception ContextNotConfiguredException extends ContextException
{
};

/**
 *
 * An attempt was made to call a method that references a
 * [IceSSL::ContextType] that is not supported for that operation.
 *
 **/
local exception UnsupportedContextException extends ContextException
{
};

/**
 *
 * Indicates that a problem occurred while loading a certificate
 * into a <literal>Context</literal> from either a memory buffer
 * or from a file.
 *
 **/
local exception CertificateLoadException extends ContextException
{
};

/**
 *
 * Indicates that a problem occurred while loading a private key
 * into a <literal>Context</literal> from either a memory buffer
 * or from a file.
 *
 **/
local exception PrivateKeyLoadException extends ContextException
{
};

/**
 *
 * When loading a public and private key pair into a
 * <literal>Context</literal>, the load succeeded, but the private
 * key and public key (certificate) did not match.
 *
 **/
local exception CertificateKeyMatchException extends ContextException
{
};

/**
 *
 * An attempt to add a certificate to the <literal>Context</literal>'s
 * trusted certifificate store has failed.
 *
 **/
local exception TrustedCertificateAddException extends ContextException
{
};

};

#endif