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
#include <stdlib.h>

#import "SSLInvalidCertificateException.h"

#import <ObjFW/macros.h>

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

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

	abort();
}

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

	@try {
		_reason = [reason copy];
	} @catch (id e) {
		[self release];
		@throw e;
	}







<
|

|
<


|











<
|

|







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

+ exceptionWithReason: (OFString*)reason
{
	return [[[self alloc] initWithReason: reason] autorelease];

}

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

	abort();
}


- initWithReason: (OFString*)reason
{
	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

	[super dealloc];
}

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

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







|
<







65
66
67
68
69
70
71
72

73
74
75
76
77
78
79

	[super dealloc];
}

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

}

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