MYDEREncoder.m
changeset 24 6856e071d25a
parent 20 df9da0f6b358
     1.1 --- a/MYDEREncoder.m	Fri Jun 05 08:57:18 2009 -0700
     1.2 +++ b/MYDEREncoder.m	Tue Jun 09 23:58:03 2009 -0700
     1.3 @@ -228,7 +228,6 @@
     1.4  
     1.5  - (void) _encodeDate: (NSDate*)date {
     1.6      NSString *dateStr = [MYBERGeneralizedTimeFormatter() stringFromDate: date];
     1.7 -    Log(@"Encoded %@ as '%@'",date,dateStr);//TEMP
     1.8      [self _writeTag: 24 class: 0 constructed: NO data: [dateStr dataUsingEncoding: NSASCIIStringEncoding]];
     1.9  }
    1.10  
    1.11 @@ -363,7 +362,7 @@
    1.12  
    1.13  TestCase(EncodeCert) {
    1.14      NSError *error = nil;
    1.15 -    NSData *cert = [NSData dataWithContentsOfFile: @"../../Tests/selfsigned.cer"];  //TEMP
    1.16 +    NSData *cert = [NSData dataWithContentsOfFile: @"../../Tests/selfsigned.cer"];
    1.17      id certObjects = MYBERParse(cert,&error);
    1.18      CAssertNil(error);
    1.19      Log(@"Decoded as:\n%@", [MYASN1Object dump: certObjects]);
    1.20 @@ -377,3 +376,27 @@
    1.21      [encoded writeToFile: @"../../Tests/selfsigned_reencoded.cer" atomically: YES];
    1.22      CAssertEqual(encoded,cert);
    1.23  }
    1.24 +
    1.25 +
    1.26 +
    1.27 +/*
    1.28 + Copyright (c) 2009, Jens Alfke <jens@mooseyard.com>. All rights reserved.
    1.29 + 
    1.30 + Redistribution and use in source and binary forms, with or without modification, are permitted
    1.31 + provided that the following conditions are met:
    1.32 + 
    1.33 + * Redistributions of source code must retain the above copyright notice, this list of conditions
    1.34 + and the following disclaimer.
    1.35 + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
    1.36 + and the following disclaimer in the documentation and/or other materials provided with the
    1.37 + distribution.
    1.38 + 
    1.39 + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
    1.40 + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
    1.41 + FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRI-
    1.42 + BUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    1.43 + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
    1.44 +  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    1.45 + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 
    1.46 + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    1.47 + */