@@ -22,11 +22,11 @@ #import "OFString.h" #import "OFInvalidArgumentException.h" @implementation OFASN1UTF8String -@synthesize stringValue = _stringValue; +@synthesize UTF8StringValue = _UTF8StringValue; - (instancetype)initWithTagClass: (of_asn1_tag_class_t)tagClass tagNumber: (of_asn1_tag_number_t)tagNumber constructed: (bool)constructed DEREncodedContents: (OFData *)DEREncodedContents @@ -40,11 +40,11 @@ if (_tagClass != OF_ASN1_TAG_CLASS_UNIVERSAL || _tagNumber != OF_ASN1_TAG_NUMBER_UTF8_STRING || _constructed) @throw [OFInvalidArgumentException exception]; - _stringValue = [[OFString alloc] + _UTF8StringValue = [[OFString alloc] initWithUTF8String: [_DEREncodedContents items] length: [_DEREncodedContents count]]; } @catch (id e) { [self release]; @throw e; @@ -53,10 +53,15 @@ return self; } - (void)dealloc { - [_stringValue release]; + [_UTF8StringValue release]; [super dealloc]; } + +- (OFString *)stringValue +{ + return [self UTF8StringValue]; +} @end