ObjOpenSSL  Diff

Differences From Artifact [55bf9206f9]:

To Artifact [f22e54e351]:


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
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







-
-
+

-
+
-


-
+











-
-
+

-
+







#include <stdlib.h>

#import "SSLInvalidCertificateException.h"

#import <ObjFW/macros.h>

@implementation SSLInvalidCertificateException
+ exceptionWithClass: (Class)class
	      reason: (OFString*)reason
+ exceptionWithReason: (OFString*)reason
{
	return [[[self alloc] initWithClass: class
	return [[[self alloc] initWithReason: reason] autorelease];
				     reason: reason] autorelease];
}

- initWithClass: (Class)class
- init
{
	@try {
		[self doesNotRecognizeSelector: _cmd];
	} @catch (id e) {
		[self release];
		@throw e;
	}

	abort();
}

- initWithClass: (Class)class
	 reason: (OFString*)reason
- initWithReason: (OFString*)reason
{
	self = [super initWithClass: class];
	self = [super init];

	@try {
		_reason = [reason copy];
	} @catch (id e) {
		[self release];
		@throw e;
	}
68
69
70
71
72
73
74
75

76
77
78
79
80
81
82
83
65
66
67
68
69
70
71

72

73
74
75
76
77
78
79







-
+
-








	[super dealloc];
}

- (OFString*)description
{
	return [OFString stringWithFormat:
	    @"Invalid certificate in class %@! Reason: %@", [self inClass],
	    @"Invalid certificate! Reason: %@", _reason];
	    _reason];
}

- (OFString*)reason
{
	OF_GETTER(_reason, false)
}
@end