ObjFW
Toggle main menu visibility
Loading...
Searching...
No Matches
OFTLSHandshakeFailedException.h
1
/*
2
* Copyright (c) 2008-2026 Jonathan Schleifer <js@nil.im>
3
*
4
* All rights reserved.
5
*
6
* This program is free software: you can redistribute it and/or modify it
7
* under the terms of the GNU Lesser General Public License version 3.0 only,
8
* as published by the Free Software Foundation.
9
*
10
* This program is distributed in the hope that it will be useful, but WITHOUT
11
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13
* version 3.0 for more details.
14
*
15
* You should have received a copy of the GNU Lesser General Public License
16
* version 3.0 along with this program. If not, see
17
* <https://www.gnu.org/licenses/>.
18
*/
19
20
#import "
OFException.h
"
21
22
#ifndef OF_HAVE_SOCKETS
23
# error No sockets available!
24
#endif
25
26
#import "
OFTLSStream.h
"
27
28
OF_ASSUME_NONNULL_BEGIN
29
30
#ifdef __cplusplus
31
extern
"C"
{
32
#endif
33
extern
int
_OFTLSHandshakeFailedException_reference OF_VISIBILITY_INTERNAL;
34
#ifdef __cplusplus
35
}
36
#endif
37
44
@interface
OFTLSHandshakeFailedException
:
OFException
45
{
46
OFTLSStream
*_stream;
47
OFString
*_Nullable _host;
48
OFTLSStreamErrorCode
_errorCode;
49
OF_RESERVE_IVARS(
OFTLSHandshakeFailedException
, 4)
50
}
51
55
@property
(readonly, nonatomic)
OFTLSStream
*
stream
;
56
60
@property
OF_NULLABLE_PROPERTY (readonly, nonatomic)
OFString
*
host
;
61
65
@property
(readonly, nonatomic)
OFTLSStreamErrorCode
errorCode
;
66
75
+ (instancetype)exceptionWithStream: (
OFTLSStream
*)stream
76
host: (nullable
OFString
*)host
77
errorCode: (
OFTLSStreamErrorCode
)errorCode;
78
79
+ (instancetype)
exception
OF_UNAVAILABLE;
80
89
- (instancetype)initWithStream: (
OFTLSStream
*)stream
90
host: (nullable
OFString
*)host
91
errorCode: (
OFTLSStreamErrorCode
)errorCode
92
OF_DESIGNATED_INITIALIZER;
93
94
- (instancetype)
init
OF_UNAVAILABLE;
95
@end
96
97
OF_ASSUME_NONNULL_END
OFException.h
OFTLSStream.h
OFTLSStreamErrorCode
OFTLSStreamErrorCode
An enum representing an error of an OFTLSStream.
Definition
OFTLSStream.h:34
OFException
The base class for all exceptions in ObjFW.
Definition
OFException.h:157
+[OFException exception]
instancetype exception()
Creates a new, autoreleased exception.
Definition
OFException.m:283
-[OFObject init]
instancetype init()
Initializes an already allocated object.
Definition
OFObject.m:671
OFString
A class for handling strings.
Definition
OFString.h:144
OFTLSHandshakeFailedException
An exception indicating that a TLS handshake.
Definition
OFTLSHandshakeFailedException.h:45
OFTLSHandshakeFailedException::stream
OFTLSStream * stream
The TLS stream which failed the handshake.
Definition
OFTLSHandshakeFailedException.h:55
OFTLSHandshakeFailedException::errorCode
OFTLSStreamErrorCode errorCode
The error code from the TLS stream.
Definition
OFTLSHandshakeFailedException.h:65
OFTLSHandshakeFailedException::host
OFString * host
The host for the handshake.
Definition
OFTLSHandshakeFailedException.h:60
OFTLSStream
A class that provides Transport Layer Security on top of a stream.
Definition
OFTLSStream.h:102
src
exceptions
OFTLSHandshakeFailedException.h
Generated by
1.17.0