ObjOpenSSL  Check-in [41f9946113]

Overview
Comment:Adjust to recent ObjFW changes.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 41f994611308cd423a926f7499b7982564d2894927559119648a47986d7ab1e2
User & Date: js on 2012-10-27 18:23:30
Other Links: manifest | tags
Context
2012-11-08
13:19
Use the thread object's address as thread id. check-in: 3062d2861f user: js tags: trunk
2012-10-27
18:23
Adjust to recent ObjFW changes. check-in: 41f9946113 user: js tags: trunk
2012-09-20
00:14
Adjust to latest ObjFW changes. check-in: 87c3eab6d6 user: js tags: trunk
Changes

Modified src/X509Certificate.m from [9437851e4c] to [9922d7f262].

32
33
34
35
36
37
38


39
40
41
42
43
44
45
#import <ObjFW/OFDictionary.h>
#import <ObjFW/OFFile.h>
#import <ObjFW/OFInitializationFailedException.h>
#import <ObjFW/OFInvalidEncodingException.h>
#import <ObjFW/OFList.h>
#import <ObjFW/OFMutableDictionary.h>
#import <ObjFW/OFString.h>



@implementation X509Certificate
- initWithFile: (OFString*)file
{
	self = [self init];

	@try {







>
>







32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#import <ObjFW/OFDictionary.h>
#import <ObjFW/OFFile.h>
#import <ObjFW/OFInitializationFailedException.h>
#import <ObjFW/OFInvalidEncodingException.h>
#import <ObjFW/OFList.h>
#import <ObjFW/OFMutableDictionary.h>
#import <ObjFW/OFString.h>

#import <ObjFW/macros.h>

@implementation X509Certificate
- initWithFile: (OFString*)file
{
	self = [self init];

	@try {
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356

	if (![asserted hasPrefix: @"*."])
		return NO;

	asserted = [asserted substringWithRange:
	    of_range(2, [asserted length] - 2)];

	firstDot = [domain indexOfFirstOccurrenceOfString: @"."];
	if (firstDot == OF_INVALID_INDEX)
		return NO;

	domain = [domain substringWithRange:
	    of_range(firstDot + 1, [domain length] - firstDot - 1)];

	if (![asserted caseInsensitiveCompare: domain])
		return YES;







|
|







343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358

	if (![asserted hasPrefix: @"*."])
		return NO;

	asserted = [asserted substringWithRange:
	    of_range(2, [asserted length] - 2)];

	firstDot = [domain rangeOfString: @"."].location;
	if (firstDot == OF_NOT_FOUND)
		return NO;

	domain = [domain substringWithRange:
	    of_range(firstDot + 1, [domain length] - firstDot - 1)];

	if (![asserted caseInsensitiveCompare: domain])
		return YES;