Index: src/OFASN1BitString.h ================================================================== --- src/OFASN1BitString.h +++ src/OFASN1BitString.h @@ -43,30 +43,29 @@ /** * @brief Creates an ASN.1 BitString with the specified BitString value and * length. * - * @param bitStringValue The value of the BitString - * @param bitStringLength The length of the BitString in bits + * @param bitString The value of the BitString + * @param length The length of the BitString in bits * @return A new, autoreleased OFASN1BitString */ -+ (instancetype)bitStringWithBitStringValue: (OFData *)bitStringValue - bitStringLength: (size_t)bitStringLength; ++ (instancetype)bitStringWithBitString: (OFData *)bitString + length: (size_t)length; - (instancetype)init OF_UNAVAILABLE; /** * @brief Initializes an already allocated ASN.1 BitString with the specified * BitString value and length. * - * @param bitStringValue The value of the BitString - * @param bitStringLength The length of the BitString in bits + * @param bitString The value of the BitString + * @param length The length of the BitString in bits * @return An initialized OFASN1BitString */ -- (instancetype)initWithBitStringValue: (OFData *)bitStringValue - bitStringLength: (size_t)bitStringLength - OF_DESIGNATED_INITIALIZER; +- (instancetype)initWithBitString: (OFData *)bitString + length: (size_t)length OF_DESIGNATED_INITIALIZER; /** * @brief Initializes an already allocated ASN.1 BitString with the specified * arguments. * Index: src/OFASN1BitString.m ================================================================== --- src/OFASN1BitString.m +++ src/OFASN1BitString.m @@ -25,30 +25,28 @@ @implementation OFASN1BitString @synthesize bitStringValue = _bitStringValue; @synthesize bitStringLength = _bitStringLength; -+ (instancetype)bitStringWithBitStringValue: (OFData *)bitStringValue - bitStringLength: (size_t)bitStringLength ++ (instancetype)bitStringWithBitString: (OFData *)bitString + length: (size_t)length { - return [[[self alloc] - initWithBitStringValue: bitStringValue - bitStringLength: bitStringLength] autorelease]; + return [[[self alloc] initWithBitString: bitString + length: length] autorelease]; } -- (instancetype)initWithBitStringValue: (OFData *)bitStringValue - bitStringLength: (size_t)bitStringLength +- (instancetype)initWithBitString: (OFData *)bitString length: (size_t)length { self = [super init]; @try { - if (bitStringValue.count * bitStringValue.itemSize != - OF_ROUND_UP_POW2(8, bitStringLength) / 8) + if (bitString.count * bitString.itemSize != + OF_ROUND_UP_POW2(8, length) / 8) @throw [OFInvalidFormatException exception]; - _bitStringValue = [bitStringValue copy]; - _bitStringLength = bitStringLength; + _bitStringValue = [bitString copy]; + _bitStringLength = length; } @catch (id e) { [self release]; @throw e; } @@ -59,12 +57,12 @@ tagNumber: (of_asn1_tag_number_t)tagNumber constructed: (bool)constructed DEREncodedContents: (OFData *)DEREncodedContents { void *pool = objc_autoreleasePoolPush(); - OFData *bitStringValue; - size_t bitStringLength; + OFData *bitString; + size_t length; @try { unsigned char unusedBits; size_t count = DEREncodedContents.count; @@ -89,23 +87,22 @@ @throw [OFInvalidFormatException exception]; if (SIZE_MAX / 8 < count - 1) @throw [OFOutOfRangeException exception]; - bitStringLength = (count - 1) * 8; - bitStringValue = [DEREncodedContents subdataWithRange: + length = (count - 1) * 8; + bitString = [DEREncodedContents subdataWithRange: of_range(1, count - 1)]; if (unusedBits != 0) - bitStringLength -= unusedBits; + length -= unusedBits; } @catch (id e) { [self release]; @throw e; } - self = [self initWithBitStringValue: bitStringValue - bitStringLength: bitStringLength]; + self = [self initWithBitString: bitString length: length]; objc_autoreleasePoolPop(pool); return self; } @@ -122,11 +119,11 @@ [super dealloc]; } - (OFData *)ASN1DERRepresentation { - size_t bitStringValueCount = [_bitStringValue count]; + size_t bitStringValueCount = _bitStringValue.count; size_t roundedUpLength = OF_ROUND_UP_POW2(8, _bitStringLength); unsigned char unusedBits = roundedUpLength - _bitStringLength; unsigned char header[] = { OF_ASN1_TAG_NUMBER_BIT_STRING, bitStringValueCount + 1, @@ -139,11 +136,11 @@ @throw [OFInvalidFormatException exception]; data = [OFMutableData dataWithCapacity: sizeof(header) + bitStringValueCount]; [data addItems: header count: sizeof(header)]; - [data addItems: [_bitStringValue items] count: bitStringValueCount]; + [data addItems: _bitStringValue.items count: bitStringValueCount]; [data makeImmutable]; return data; } Index: src/OFASN1Boolean.h ================================================================== --- src/OFASN1Boolean.h +++ src/OFASN1Boolean.h @@ -23,37 +23,36 @@ * @brief An ASN.1 Boolean. */ OF_SUBCLASSING_RESTRICTED @interface OFASN1Boolean: OFObject { - bool _booleanValue; + bool _boolValue; } /** - * @brief The Boolean value. + * @brief The value of the Boolean. */ -@property (readonly, nonatomic) bool booleanValue; +@property (readonly, nonatomic) bool boolValue; /** * @brief Creates an ASN.1 Boolean with the specified Boolean value. * - * @param booleanValue The value of the Boolean + * @param bool_ The value of the Boolean * @return A new, autoreleased OFASN1Boolean */ -+ (instancetype)booleanWithBooleanValue: (bool)booleanValue; ++ (instancetype)booleanWithBool: (bool)bool_; - (instancetype)init OF_UNAVAILABLE; /** * @brief Initializes an already allocated ASN.1 Boolean with the specified * Boolean value. * - * @param booleanValue The value of the Boolean + * @param bool_ The value of the Boolean * @return An initialized OFASN1Boolean */ -- (instancetype)initWithBooleanValue: (bool)booleanValue - OF_DESIGNATED_INITIALIZER; +- (instancetype)initWithBool: (bool)bool_ OF_DESIGNATED_INITIALIZER; /** * @brief Initializes an already allocated ASN.1 Boolean with the specified * arguments. * Index: src/OFASN1Boolean.m ================================================================== --- src/OFASN1Boolean.m +++ src/OFASN1Boolean.m @@ -21,22 +21,22 @@ #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" @implementation OFASN1Boolean -@synthesize booleanValue = _booleanValue; +@synthesize boolValue = _boolValue; -+ (instancetype)booleanWithBooleanValue: (bool)booleanValue ++ (instancetype)booleanWithBool: (bool)bool_ { - return [[[self alloc] initWithBooleanValue: booleanValue] autorelease]; + return [[[self alloc] initWithBool: bool_] autorelease]; } -- (instancetype)initWithBooleanValue: (bool)booleanValue +- (instancetype)initWithBool: (bool)bool_ { self = [super init]; - _booleanValue = booleanValue; + _boolValue = bool_; return self; } - (instancetype)initWithTagClass: (of_asn1_tag_class_t)tagClass @@ -62,11 +62,11 @@ } @catch (id e) { [self release]; @throw e; } - return [self initWithBooleanValue: !!value]; + return [self initWithBool: !!value]; } - (instancetype)init { OF_INVALID_INIT_METHOD @@ -75,11 +75,11 @@ - (OFData *)ASN1DERRepresentation { char buffer[] = { OF_ASN1_TAG_NUMBER_BOOLEAN, 1, - (_booleanValue ? 0xFF : 0x00) + (_boolValue ? 0xFF : 0x00) }; return [OFData dataWithItems: buffer count: sizeof(buffer)]; } @@ -93,23 +93,23 @@ if (![object isKindOfClass: [OFASN1Boolean class]]) return false; boolean = object; - if (boolean->_booleanValue != _booleanValue) + if (boolean->_boolValue != _boolValue) return false; return true; } - (unsigned long)hash { - return _booleanValue; + return _boolValue; } - (OFString *)description { - return (_booleanValue + return (_boolValue ? @"" : @""); } @end Index: src/OFASN1IA5String.h ================================================================== --- src/OFASN1IA5String.h +++ src/OFASN1IA5String.h @@ -40,26 +40,25 @@ @property (readonly, nonatomic) OFString *stringValue; /** * @brief Creates an IA5String with the specified string value. * - * @param stringValue The string value of the IA5String + * @param string The string value of the IA5String * @return A new, autoreleased OFASN1IA5String */ -+ (instancetype)stringWithStringValue: (OFString *)stringValue; ++ (instancetype)stringWithString: (OFString *)string; - (instancetype)init OF_UNAVAILABLE; /** * @brief Initializes an already allocated IA5String with the specified string * value. * - * @param stringValue The string value of the IA5String + * @param string The string value of the IA5String * @return An initialized OFASN1IA5String */ -- (instancetype)initWithStringValue: (OFString *)stringValue - OF_DESIGNATED_INITIALIZER; +- (instancetype)initWithString: (OFString *)string OF_DESIGNATED_INITIALIZER; /** * @brief Initializes an already allocated ASN.1 IA5String with the specified * arguments. * Index: src/OFASN1IA5String.m ================================================================== --- src/OFASN1IA5String.m +++ src/OFASN1IA5String.m @@ -22,21 +22,21 @@ #import "OFInvalidArgumentException.h" @implementation OFASN1IA5String @synthesize IA5StringValue = _IA5StringValue; -+ (instancetype)stringWithStringValue: (OFString *)stringValue ++ (instancetype)stringWithString: (OFString *)string { - return [[[self alloc] initWithStringValue: stringValue] autorelease]; + return [[[self alloc] initWithString: string] autorelease]; } -- (instancetype)initWithStringValue: (OFString *)stringValue +- (instancetype)initWithString: (OFString *)string { self = [super init]; @try { - _IA5StringValue = [stringValue copy]; + _IA5StringValue = [string copy]; } @catch (id e) { [self release]; @throw e; } @@ -47,30 +47,30 @@ tagNumber: (of_asn1_tag_number_t)tagNumber constructed: (bool)constructed DEREncodedContents: (OFData *)DEREncodedContents { void *pool = objc_autoreleasePoolPush(); - OFString *IA5StringValue; + OFString *IA5String; @try { if (tagClass != OF_ASN1_TAG_CLASS_UNIVERSAL || tagNumber != OF_ASN1_TAG_NUMBER_IA5_STRING || constructed) @throw [OFInvalidArgumentException exception]; if (DEREncodedContents.itemSize != 1) @throw [OFInvalidArgumentException exception]; - IA5StringValue = [OFString + IA5String= [OFString stringWithCString: DEREncodedContents.items encoding: OF_STRING_ENCODING_ASCII length: DEREncodedContents.count]; } @catch (id e) { [self release]; @throw e; } - self = [self initWithStringValue: IA5StringValue]; + self = [self initWithString: IA5String]; objc_autoreleasePoolPop(pool); return self; } Index: src/OFASN1NumericString.h ================================================================== --- src/OFASN1NumericString.h +++ src/OFASN1NumericString.h @@ -40,26 +40,25 @@ @property (readonly, nonatomic) OFString *stringValue; /** * @brief Creates an NumericString with the specified string value. * - * @param stringValue The string value of the NumericString + * @param string The string value of the NumericString * @return A new, autoreleased OFASN1NumericString */ -+ (instancetype)stringWithStringValue: (OFString *)stringValue; ++ (instancetype)stringWithString: (OFString *)string; - (instancetype)init OF_UNAVAILABLE; /** * @brief Initializes an already allocated NumericString with the specified * string value. * - * @param stringValue The string value of the NumericString + * @param string The string value of the NumericString * @return An initialized OFASN1NumericString */ -- (instancetype)initWithStringValue: (OFString *)stringValue - OF_DESIGNATED_INITIALIZER; +- (instancetype)initWithString: (OFString *)string OF_DESIGNATED_INITIALIZER; /** * @brief Initializes an already allocated ASN.1 NumericString with the * specified arguments. * Index: src/OFASN1NumericString.m ================================================================== --- src/OFASN1NumericString.m +++ src/OFASN1NumericString.m @@ -23,29 +23,29 @@ #import "OFInvalidEncodingException.h" @implementation OFASN1NumericString @synthesize numericStringValue = _numericStringValue; -+ (instancetype)stringWithStringValue: (OFString *)stringValue ++ (instancetype)stringWithString: (OFString *)string { - return [[[self alloc] initWithStringValue: stringValue] autorelease]; + return [[[self alloc] initWithString: string] autorelease]; } -- (instancetype)initWithStringValue: (OFString *)stringValue +- (instancetype)initWithString: (OFString *)string { self = [super init]; @try { void *pool = objc_autoreleasePoolPush(); - const char *cString = stringValue.UTF8String; - size_t length = stringValue.UTF8StringLength; + const char *cString = string.UTF8String; + size_t length = string.UTF8StringLength; for (size_t i = 0; i < length; i++) if (!of_ascii_isdigit(cString[i]) && cString[i] != ' ') @throw [OFInvalidEncodingException exception]; - _numericStringValue = [stringValue copy]; + _numericStringValue = [string copy]; objc_autoreleasePoolPop(pool); } @catch (id e) { [self release]; @throw e; @@ -58,11 +58,11 @@ tagNumber: (of_asn1_tag_number_t)tagNumber constructed: (bool)constructed DEREncodedContents: (OFData *)DEREncodedContents { void *pool = objc_autoreleasePoolPush(); - OFString *numericStringValue; + OFString *numericString; @try { if (tagClass != OF_ASN1_TAG_CLASS_UNIVERSAL || tagNumber != OF_ASN1_TAG_NUMBER_NUMERIC_STRING || constructed) @@ -69,20 +69,20 @@ @throw [OFInvalidArgumentException exception]; if (DEREncodedContents.itemSize != 1) @throw [OFInvalidArgumentException exception]; - numericStringValue = [OFString + numericString = [OFString stringWithCString: DEREncodedContents.items encoding: OF_STRING_ENCODING_ASCII length: DEREncodedContents.count]; } @catch (id e) { [self release]; @throw e; } - self = [self initWithStringValue: numericStringValue]; + self = [self initWithString: numericString]; objc_autoreleasePoolPop(pool); return self; } Index: src/OFASN1OctetString.h ================================================================== --- src/OFASN1OctetString.h +++ src/OFASN1OctetString.h @@ -35,25 +35,25 @@ @property (readonly, nonatomic) OFData *octetStringValue; /** * @brief Creates an OctetString with the specified value. * - * @param octetStringValue The OctetString value + * @param octetString The OctetString value * @return A new, autoreleased OFASN1OctetString */ -+ (instancetype)octetStringWithOctetStringValue: (OFData *)octetStringValue; ++ (instancetype)octetStringWithOctetString: (OFData *)octetString; - (instancetype)init OF_UNAVAILABLE; /** * @brief Initializes an already allocated OctetString with the specified * value. * - * @param octetStringValue The OctetString value + * @param octetString The OctetString value * @return An initialized OFASN1OctetString */ -- (instancetype)initWithOctetStringValue: (OFData *)octetStringValue +- (instancetype)initWithOctetString: (OFData *)octetString OF_DESIGNATED_INITIALIZER; /** * @brief Initializes an already allocated ASN.1 OctetString with the specified * arguments. Index: src/OFASN1OctetString.m ================================================================== --- src/OFASN1OctetString.m +++ src/OFASN1OctetString.m @@ -22,22 +22,21 @@ #import "OFInvalidArgumentException.h" @implementation OFASN1OctetString @synthesize octetStringValue = _octetStringValue; -+ (instancetype)octetStringWithOctetStringValue: (OFData *)octetStringValue ++ (instancetype)octetStringWithOctetString: (OFData *)octetString { - return [[[self alloc] - initWithOctetStringValue: octetStringValue] autorelease]; + return [[[self alloc] initWithOctetString: octetString] autorelease]; } -- (instancetype)initWithOctetStringValue: (OFData *)octetStringValue +- (instancetype)initWithOctetString: (OFData *)octetString { self = [super init]; @try { - _octetStringValue = [octetStringValue copy]; + _octetStringValue = [octetString copy]; } @catch (id e) { [self release]; @throw e; } @@ -60,11 +59,11 @@ } @catch (id e) { [self release]; @throw e; } - return [self initWithOctetStringValue: DEREncodedContents]; + return [self initWithOctetString: DEREncodedContents]; } - (instancetype)init { OF_INVALID_INIT_METHOD Index: src/OFASN1PrintableString.h ================================================================== --- src/OFASN1PrintableString.h +++ src/OFASN1PrintableString.h @@ -40,26 +40,25 @@ @property (readonly, nonatomic) OFString *stringValue; /** * @brief Creates a PrintableString with the specified string value. * - * @param stringValue The string value of the PrintableString + * @param string The string value of the PrintableString * @return A new, autoreleased OFASN1PrintableString */ -+ (instancetype)stringWithStringValue: (OFString *)stringValue; ++ (instancetype)stringWithString: (OFString *)string; - (instancetype)init OF_UNAVAILABLE; /** * @brief Initializes an already allocated PrintableString with the specified * string value. * - * @param stringValue The string value of the PrintableString + * @param string The string value of the PrintableString * @return An initialized OFASN1PrintableString */ -- (instancetype)initWithStringValue: (OFString *)stringValue - OF_DESIGNATED_INITIALIZER; +- (instancetype)initWithString: (OFString *)string OF_DESIGNATED_INITIALIZER; /** * @brief Initializes an already allocated ASN.1 PrintableString with the * specified arguments. * Index: src/OFASN1PrintableString.m ================================================================== --- src/OFASN1PrintableString.m +++ src/OFASN1PrintableString.m @@ -23,23 +23,23 @@ #import "OFInvalidEncodingException.h" @implementation OFASN1PrintableString @synthesize printableStringValue = _printableStringValue; -+ (instancetype)stringWithStringValue: (OFString *)stringValue ++ (instancetype)stringWithString: (OFString *)string { - return [[[self alloc] initWithStringValue: stringValue] autorelease]; + return [[[self alloc] initWithString: string] autorelease]; } -- (instancetype)initWithStringValue: (OFString *)stringValue +- (instancetype)initWithString: (OFString *)string { self = [super init]; @try { void *pool = objc_autoreleasePoolPush(); - const char *cString = stringValue.UTF8String; - size_t length = stringValue.UTF8StringLength; + const char *cString = string.UTF8String; + size_t length = string.UTF8StringLength; for (size_t i = 0; i < length; i++) { if (of_ascii_isalnum(cString[i])) continue; @@ -60,11 +60,11 @@ default: @throw [OFInvalidEncodingException exception]; } } - _printableStringValue = [stringValue copy]; + _printableStringValue = [string copy]; objc_autoreleasePoolPop(pool); } @catch (id e) { [self release]; @throw e; @@ -77,11 +77,11 @@ tagNumber: (of_asn1_tag_number_t)tagNumber constructed: (bool)constructed DEREncodedContents: (OFData *)DEREncodedContents { void *pool = objc_autoreleasePoolPush(); - OFString *printableStringValue; + OFString *printableString; @try { if (tagClass != OF_ASN1_TAG_CLASS_UNIVERSAL || tagNumber != OF_ASN1_TAG_NUMBER_PRINTABLE_STRING || constructed) @@ -88,20 +88,20 @@ @throw [OFInvalidArgumentException exception]; if (DEREncodedContents.itemSize != 1) @throw [OFInvalidArgumentException exception]; - printableStringValue = [OFString + printableString = [OFString stringWithCString: DEREncodedContents.items encoding: OF_STRING_ENCODING_ASCII length: DEREncodedContents.count]; } @catch (id e) { [self release]; @throw e; } - self = [self initWithStringValue: printableStringValue]; + self = [self initWithString: printableString]; objc_autoreleasePoolPop(pool); return self; } Index: src/OFASN1UTF8String.h ================================================================== --- src/OFASN1UTF8String.h +++ src/OFASN1UTF8String.h @@ -40,26 +40,25 @@ @property (readonly, nonatomic) OFString *stringValue; /** * @brief Creates a UTF8String with the specified string value. * - * @param stringValue The string value of the UTF8String + * @param string The string value of the UTF8String * @return A new, autoreleased OFASN1UTF8String */ -+ (instancetype)stringWithStringValue: (OFString *)stringValue; ++ (instancetype)stringWithString: (OFString *)string; - (instancetype)init OF_UNAVAILABLE; /** * @brief Initializes an already allocated UTF8String with the specified * string value. * - * @param stringValue The string value of the UTF8String + * @param string The string value of the UTF8String * @return An initialized OFASN1UTF8String */ -- (instancetype)initWithStringValue: (OFString *)stringValue - OF_DESIGNATED_INITIALIZER; +- (instancetype)initWithString: (OFString *)string OF_DESIGNATED_INITIALIZER; /** * @brief Initializes an already allocated ASN.1 UTF8String with the specified * arguments. * Index: src/OFASN1UTF8String.m ================================================================== --- src/OFASN1UTF8String.m +++ src/OFASN1UTF8String.m @@ -22,21 +22,21 @@ #import "OFInvalidArgumentException.h" @implementation OFASN1UTF8String @synthesize UTF8StringValue = _UTF8StringValue; -+ (instancetype)stringWithStringValue: (OFString *)stringValue ++ (instancetype)stringWithString: (OFString *)string { - return [[[self alloc] initWithStringValue: stringValue] autorelease]; + return [[[self alloc] initWithString: string] autorelease]; } -- (instancetype)initWithStringValue: (OFString *)stringValue +- (instancetype)initWithString: (OFString *)string { self = [super init]; @try { - _UTF8StringValue = [stringValue copy]; + _UTF8StringValue = [string copy]; } @catch (id e) { [self release]; @throw e; } @@ -47,29 +47,29 @@ tagNumber: (of_asn1_tag_number_t)tagNumber constructed: (bool)constructed DEREncodedContents: (OFData *)DEREncodedContents { void *pool = objc_autoreleasePoolPush(); - OFString *UTF8StringValue; + OFString *UTF8String; @try { if (tagClass != OF_ASN1_TAG_CLASS_UNIVERSAL || tagNumber != OF_ASN1_TAG_NUMBER_UTF8_STRING || constructed) @throw [OFInvalidArgumentException exception]; if (DEREncodedContents.itemSize != 1) @throw [OFInvalidArgumentException exception]; - UTF8StringValue = [OFString + UTF8String = [OFString stringWithUTF8String: DEREncodedContents.items length: DEREncodedContents.count]; } @catch (id e) { [self release]; @throw e; } - self = [self initWithStringValue: UTF8StringValue]; + self = [self initWithString: UTF8String]; objc_autoreleasePoolPop(pool); return self; } Index: tests/OFASN1DERParsingTests.m ================================================================== --- tests/OFASN1DERParsingTests.m +++ tests/OFASN1DERParsingTests.m @@ -29,14 +29,13 @@ OFEnumerator *enumerator; /* Boolean */ TEST(@"Parsing of boolean", ![[[OFData dataWithItems: "\x01\x01\x00" - count: 3] objectByParsingASN1DER] - booleanValue] && + count: 3] objectByParsingASN1DER] boolValue] && [[[OFData dataWithItems: "\x01\x01\xFF" - count: 3] objectByParsingASN1DER] booleanValue]) + count: 3] objectByParsingASN1DER] boolValue]) EXPECT_EXCEPTION(@"Detection of invalid boolean #1", OFInvalidFormatException, [[OFData dataWithItems: "\x01\x01\x01" count: 3] objectByParsingASN1DER]) Index: tests/OFASN1DERRepresentationTests.m ================================================================== --- tests/OFASN1DERRepresentationTests.m +++ tests/OFASN1DERRepresentationTests.m @@ -26,37 +26,32 @@ OFData *data; module = @"OFASN1BitString"; TEST(@"-[ASN1DERRepresentation]", (data = [OFData dataWithItems: "\xFF\x00\xF8" count: 3]) && - [[[OFASN1BitString bitStringWithBitStringValue: data - bitStringLength: 21] + [[[OFASN1BitString bitStringWithBitString: data length: 21] ASN1DERRepresentation] isEqual: [OFData dataWithItems: "\x03\x04\x03\xFF\x00\xF8" count: 6]] && (data = [OFData dataWithItems: "abcdefäöü" count: 12]) && - [[[OFASN1BitString bitStringWithBitStringValue: data - bitStringLength: 12 * 8] + [[[OFASN1BitString bitStringWithBitString: data length: 12 * 8] ASN1DERRepresentation] isEqual: [OFData dataWithItems: "\x03\x0D\x00" "abcdefäöü" count: 15]] && (data = [OFData dataWithItems: "" count: 0]) && - [[[OFASN1BitString bitStringWithBitStringValue: data - bitStringLength: 0] + [[[OFASN1BitString bitStringWithBitString: data length: 0] ASN1DERRepresentation] isEqual: [OFData dataWithItems: "\x03\x01\x00" count: 3]]) module = @"OFASN1Boolean"; TEST(@"-[ASN1DERRepresentation]", - [[[OFASN1Boolean booleanWithBooleanValue: false] - ASN1DERRepresentation] isEqual: - [OFData dataWithItems: "\x01\x01\x00" count: 3]] && - [[[OFASN1Boolean booleanWithBooleanValue: true] - ASN1DERRepresentation] isEqual: - [OFData dataWithItems: "\x01\x01\xFF" count: 3]]) + [[[OFASN1Boolean booleanWithBool: false] ASN1DERRepresentation] + isEqual: [OFData dataWithItems: "\x01\x01\x00" count: 3]] && + [[[OFASN1Boolean booleanWithBool: true] ASN1DERRepresentation] + isEqual: [OFData dataWithItems: "\x01\x01\xFF" count: 3]]) module = @"OFNull"; TEST(@"-[OFASN1DERRepresentation]", [[[OFNull null] ASN1DERRepresentation] isEqual: [OFData dataWithItems: "\x05\x00" count: 2]]) objc_autoreleasePoolPop(pool); } @end