ObjOpenSSL  Check-in [8d227ad030]

Overview
Comment:Adjust to ObjFW changes
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8d227ad0304b63791d19c8be8a836bdc348ef25c0d37ce65e70ad02ef72a362f
User & Date: js on 2020-12-07 00:35:19
Other Links: manifest | tags
Context
2021-04-03
19:48
Update buildsys check-in: 3f1ad168e1 user: js tags: trunk
2020-12-07
00:35
Adjust to ObjFW changes check-in: 8d227ad030 user: js tags: trunk
2020-10-03
09:58
Update buildsys and use rpath for ObjFW check-in: 86da8ecd4c user: js tags: trunk
Changes

Modified src/X509Certificate.m from [a5faa63283] to [48c2a42784].

412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
}


- (X509OID *)X509_stringFromASN1Object: (ASN1_OBJECT *)object
{
	X509OID *ret;
	int length, bufferLength = 256;
	char *buffer = [self allocMemoryWithSize: bufferLength];

	@try {
		while ((length = OBJ_obj2txt(buffer, bufferLength, object,
		    1)) > bufferLength) {
			bufferLength = length;
			buffer = [self resizeMemory: buffer
					       size: bufferLength];
		}

		ret = [[[X509OID alloc]
		    initWithUTF8String: buffer] autorelease];
	} @finally {
		[self freeMemory: buffer];
	}

	return ret;
}

- (OFString *)X509_stringFromASN1String: (ASN1_STRING *)str
{







|





<
|





|







412
413
414
415
416
417
418
419
420
421
422
423
424

425
426
427
428
429
430
431
432
433
434
435
436
437
438
}


- (X509OID *)X509_stringFromASN1Object: (ASN1_OBJECT *)object
{
	X509OID *ret;
	int length, bufferLength = 256;
	char *buffer = of_alloc(1, bufferLength);

	@try {
		while ((length = OBJ_obj2txt(buffer, bufferLength, object,
		    1)) > bufferLength) {
			bufferLength = length;

			buffer = of_realloc(buffer, 1, bufferLength);
		}

		ret = [[[X509OID alloc]
		    initWithUTF8String: buffer] autorelease];
	} @finally {
		free(buffer);
	}

	return ret;
}

- (OFString *)X509_stringFromASN1String: (ASN1_STRING *)str
{
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512

	if ([object isKindOfClass: [OFString class]])
		return [_string isEqual: object];

	return false;
}

- (uint32_t)hash
{
	return _string.hash;
}

- copy
{
	return [self retain];
}
@end







|









495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511

	if ([object isKindOfClass: [OFString class]])
		return [_string isEqual: object];

	return false;
}

- (unsigned long)hash
{
	return _string.hash;
}

- copy
{
	return [self retain];
}
@end