* More work on iPhone compatibility.
* Restored the signature-verification code to MYCertInfo, which I'd removed earlier. I now need it to verify self-signed certs, since the Security framework won't do it for me.
* Merged MYCertificate-iPhone.m into MYCertificate.m since there's more shared code now.
5 // Created by Jens Alfke on 5/28/09.
6 // Copyright 2009 Jens Alfke. All rights reserved.
9 #import <Foundation/Foundation.h>
12 /* A generic ASN.1 data value. The BER parser instantiates these to represent parsed values that
13 it doesn't know how to represent otherwise.
14 This is mostly used internally by MYParsedCertificate. */
15 @interface MYASN1Object : NSObject
25 - (id) initWithTag: (uint32_t)tag
26 ofClass: (uint8_t)tagClass
27 constructed: (BOOL)constructed
28 value: (NSData*)value;
29 - (id) initWithTag: (uint32_t)tag
30 ofClass: (uint8_t)tagClass
31 components: (NSArray*)components;
33 @property (readonly) uint32_t tag;
34 @property (readonly) uint8_t tagClass;
35 @property (readonly) BOOL constructed;
36 @property (readonly) NSData *value;
37 @property (readonly) NSArray *components;
39 + (NSString*) dump: (id)object;
44 /* An ASN.1 "big" (arbitrary-length) integer.
45 The value contains the bytes of the integer, in big-endian order.
46 This is mostly used internally by MYParsedCertificate. */
47 @interface MYASN1BigInteger : MYASN1Object
48 - (id) initWithSignedData: (NSData*)signedData;
49 - (id) initWithUnsignedData: (NSData*) unsignedData;
50 @property (readonly) NSData *signedData, *unsignedData;
54 /* An ordered string of bits, as used in ASN.1.
55 This differs from NSData in that it need not occupy a whole number of bytes;
56 that is, the number of bits need not be a multiple of 8.
57 This is mostly used internally by MYParsedCertificate. */
58 @interface MYBitString : NSObject
65 - (id)initWithBits: (NSData*)bits count: (NSUInteger)bitCount;
66 + (MYBitString*) bitStringWithData: (NSData*)bits;
68 @property (readonly, nonatomic) NSData *bits;
69 @property (readonly, nonatomic) NSUInteger bitCount;