Index: src/OFASN1Boolean.m ================================================================== --- src/OFASN1Boolean.m +++ src/OFASN1Boolean.m @@ -17,10 +17,11 @@ #include "config.h" #import "OFASN1Boolean.h" #import "OFData.h" +#import "OFString.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" @implementation OFASN1Boolean @@ -57,6 +58,13 @@ @throw e; } return self; } + +- (OFString *)description +{ + return (_booleanValue + ? @"" + : @""); +} @end Index: src/OFASN1IA5String.m ================================================================== --- src/OFASN1IA5String.m +++ src/OFASN1IA5String.m @@ -63,6 +63,12 @@ - (OFString *)stringValue { return [self IA5StringValue]; } + +- (OFString *)description +{ + return [OFString stringWithFormat: @"", + _IA5StringValue]; +} @end Index: src/OFASN1Integer.m ================================================================== --- src/OFASN1Integer.m +++ src/OFASN1Integer.m @@ -17,10 +17,11 @@ #include "config.h" #import "OFASN1Integer.h" #import "OFData.h" +#import "OFString.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfRangeException.h" @@ -71,6 +72,12 @@ @throw e; } return self; } + +- (OFString *)description +{ + return [OFString stringWithFormat: @"", + _integerValue]; +} @end Index: src/OFASN1Null.m ================================================================== --- src/OFASN1Null.m +++ src/OFASN1Null.m @@ -17,10 +17,11 @@ #include "config.h" #import "OFASN1Null.h" #import "OFData.h" +#import "OFString.h" #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" @implementation OFASN1Null @@ -46,6 +47,11 @@ @throw e; } return self; } + +- (OFString *)description +{ + return @""; +} @end Index: src/OFASN1OctetString.m ================================================================== --- src/OFASN1OctetString.m +++ src/OFASN1OctetString.m @@ -17,10 +17,11 @@ #include "config.h" #import "OFASN1OctetString.h" #import "OFData.h" +#import "OFString.h" #import "OFInvalidArgumentException.h" @implementation OFASN1OctetString - (instancetype)initWithTagClass: (of_asn1_tag_class_t)tagClass @@ -48,6 +49,12 @@ - (OFData *)octetStringValue { return _DEREncodedContents; } + +- (OFString *)description +{ + return [OFString stringWithFormat: @"", + _DEREncodedContents]; +} @end Index: src/OFASN1UTF8String.m ================================================================== --- src/OFASN1UTF8String.m +++ src/OFASN1UTF8String.m @@ -62,6 +62,12 @@ - (OFString *)stringValue { return [self UTF8StringValue]; } + +- (OFString *)description +{ + return [OFString stringWithFormat: @"", + _UTF8StringValue]; +} @end Index: src/OFASN1Value.m ================================================================== --- src/OFASN1Value.m +++ src/OFASN1Value.m @@ -17,10 +17,11 @@ #include "config.h" #import "OFASN1Value.h" #import "OFData.h" +#import "OFString.h" #import "OFInvalidFormatException.h" @implementation OFASN1Value @synthesize tagClass = _tagClass, tagNumber = _tagNumber; @@ -113,6 +114,19 @@ - (id)copy { return [self retain]; } + +- (OFString *)description +{ + return [OFString stringWithFormat: + @"", + _tagClass, _tagNumber, _constructed, + [_DEREncodedContents description]]; +} @end