ObjOpenSSL  Diff

Differences From Artifact [ecdf1a6c2b]:

To Artifact [6953168ee9]:


159
160
161
162
163
164
165
166

167
168
169
170
171
172
173
159
160
161
162
163
164
165

166
167
168
169
170
171
172
173







-
+








			generalName = sk_GENERAL_NAME_value(values, j);

			switch(generalName->type) {
			case GEN_OTHERNAME:;
				OTHERNAME *otherName = generalName->d.otherName;
				OFMutableDictionary *types;
				OFString *key;
				X509OID *key;

				types = [ret objectForKey: @"otherName"];
				if (types == nil) {
					types =
					    [OFMutableDictionary dictionary];
					[ret setObject: types
						forKey: @"otherName"];
357
358
359
360
361
362
363

364

365
366
367
368
369
370
371
357
358
359
360
361
362
363
364

365
366
367
368
369
370
371
372







+
-
+







- (OFDictionary*)X509_dictionaryFromX509Name: (X509_NAME*)name
{
	OFMutableDictionary *dict = [OFMutableDictionary dictionary];
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	int i, count = X509_NAME_entry_count(name);

	for (i = 0; i < count; i++) {
		X509OID *key;
		OFString *key, *value;
		OFString *value;
		X509_NAME_ENTRY *entry = X509_NAME_get_entry(name, i);
		ASN1_OBJECT *obj = X509_NAME_ENTRY_get_object(entry);
		ASN1_STRING *str = X509_NAME_ENTRY_get_data(entry);
		key = [self X509_stringFromASN1Object: obj];

		if ([dict objectForKey: key] == nil)
			[dict setObject: [OFList list]
380
381
382
383
384
385
386
387

388
389

390
391
392
393
394
395
396
381
382
383
384
385
386
387

388
389

390
391
392
393
394
395
396
397







-
+

-
+







	[pool release];

	[dict makeImmutable];
	return dict;
}


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

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