2 * Copyright (c) 2000-2001,2005-2007,2010-2012 Apple Inc. All Rights Reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
28 #ifndef _SSLALERTMESSAGE_H_
29 #define _SSLALERTMESSAGE_H_ 1
31 #ifndef _SECURE_TRANSPORT_H_
32 #include "SecureTransport.h"
36 #include "sslRecord.h"
43 { SSL_AlertLevelWarning
= 1,
44 SSL_AlertLevelFatal
= 2
48 { SSL_AlertCloseNotify
= 0,
49 SSL_AlertUnexpectedMsg
= 10,
50 SSL_AlertBadRecordMac
= 20,
51 SSL_AlertDecryptionFail_RESERVED
= 21, /* TLS */
52 SSL_AlertRecordOverflow
= 22, /* TLS */
53 SSL_AlertDecompressFail
= 30,
54 SSL_AlertHandshakeFail
= 40,
55 SSL_AlertNoCert_RESERVED
= 41,
56 SSL_AlertBadCert
= 42, /* SSLv3 only */
57 SSL_AlertUnsupportedCert
= 43,
58 SSL_AlertCertRevoked
= 44,
59 SSL_AlertCertExpired
= 45,
60 SSL_AlertCertUnknown
= 46,
61 SSL_AlertIllegalParam
= 47,
62 /* remainder are TLS addenda */
63 SSL_AlertUnknownCA
= 48,
64 SSL_AlertAccessDenied
= 49,
65 SSL_AlertDecodeError
= 50,
66 SSL_AlertDecryptError
= 51,
67 SSL_AlertExportRestriction_RESERVED
= 60,
68 SSL_AlertProtocolVersion
= 70,
69 SSL_AlertInsufficientSecurity
= 71,
70 SSL_AlertInternalError
= 80,
71 SSL_AlertUserCancelled
= 90,
72 SSL_AlertNoRenegotiation
= 100,
73 SSL_AlertUnsupportedExtension
= 110 /* TLS 1.2 */
76 OSStatus
SSLProcessAlert(
79 OSStatus
SSLSendAlert(
81 AlertDescription desc
,
83 OSStatus
SSLFatalSessionAlert(
84 AlertDescription desc
,
91 #endif /* _SSLALERTMESSAGE_H_ */