]> git.saurik.com Git - apple/security.git/blob - SecureTransport/privateInc/sslalert.h
Security-28.tar.gz
[apple/security.git] / SecureTransport / privateInc / sslalert.h
1 /*
2 * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved.
3 *
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
8 * using this file.
9 *
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
16 */
17
18
19 /* *********************************************************************
20 File: sslalert.h
21
22 SSLRef 3.0 Final -- 11/19/96
23
24 Copyright (c)1996 by Netscape Communications Corp.
25
26 By retrieving this software you are bound by the licensing terms
27 disclosed in the file "LICENSE.txt". Please read it, and if you don't
28 accept the terms, delete this software.
29
30 SSLRef 3.0 was developed by Netscape Communications Corp. of Mountain
31 View, California <http://home.netscape.com/> and Consensus Development
32 Corporation of Berkeley, California <http://www.consensus.com/>.
33
34 *********************************************************************
35
36 File: sslalert.h Alert layer functions and values
37
38 Prototypes for functions in sslalert.c and alert layer equates.
39
40 ****************************************************************** */
41
42 #ifndef _SSLALERT_H_
43 #define _SSLALERT_H_ 1
44
45 #ifndef _SECURE_TRANSPORT_H_
46 #include "SecureTransport.h"
47 #endif
48
49 #ifndef _SSL_PRIV_H_
50 #include "sslPriv.h"
51 #endif
52
53 #ifndef _SSLREC_H_
54 #include "sslrec.h"
55 #endif
56
57 typedef enum
58 { alert_warning = 1,
59 alert_fatal = 2
60 } AlertLevel;
61
62 typedef enum
63 { alert_close_notify = 0,
64 alert_unexpected_message = 10,
65 alert_bad_record_mac = 20,
66 alert_decompression_failure = 30,
67 alert_handshake_failure = 40,
68 alert_no_certificate = 41,
69 alert_bad_certificate = 42,
70 alert_unsupported_certificate = 43,
71 alert_certificate_revoked = 44,
72 alert_certificate_expired = 45,
73 alert_certificate_unknown = 46,
74 alert_illegal_parameter = 47
75 } AlertDescription;
76
77 SSLErr SSLProcessAlert(SSLRecord rec, SSLContext *ctx);
78 SSLErr SSLSendAlert(AlertLevel level, AlertDescription desc, SSLContext *ctx);
79 SSLErr SSLEncodeAlert(SSLRecord *rec, AlertLevel level, AlertDescription desc, SSLContext *ctx);
80 SSLErr SSLFatalSessionAlert(AlertDescription desc, SSLContext *ctx);
81
82 #endif /* _SSLALERT_H_ */