]> git.saurik.com Git - apple/security.git/blobdiff - OSX/sec/Security/Regressions/secitem/si-90-emcs.m
Security-59754.80.3.tar.gz
[apple/security.git] / OSX / sec / Security / Regressions / secitem / si-90-emcs.m
index 771973f68fdc358605cd430e89dc7e8899f1003b..76d488841a61e482fa0b246dba89d77df75193ea 100644 (file)
@@ -11,22 +11,19 @@ static void tests(void)
 
     @autoreleasepool {
         NSDictionary *idmsData = SecEMCSCreateNewiDMSKey(NULL, NULL, @"1234", NULL, NULL);
-        [idmsData autorelease];
         ok(idmsData);
 
         NSData *emcsKey = SecEMCSCreateDerivedEMCSKey(idmsData, @"1234", NULL);
-        [emcsKey autorelease];
         ok(emcsKey, "emcs key");
+        if (!emcsKey) @throw @"emacsKey missing";
 
         /*
          * change password
          */
 
         NSDictionary *newIdmsData = SecEMCSCreateNewiDMSKey(NULL, emcsKey, @"4321", NULL, NULL);
-        [newIdmsData autorelease];
 
         NSData *newEmcsKey = SecEMCSCreateDerivedEMCSKey(newIdmsData, @"4321", NULL);
-        [newEmcsKey autorelease];
         ok(newEmcsKey, "new emcs key");
 
         ok([newEmcsKey isEqualToData:emcsKey], "key same");
@@ -45,8 +42,6 @@ static void tests(void)
 
         ok([data isEqualToData:[NSData dataWithBytes:"\xa4\x42\x8b\xb0\xb8\x20\xdb\xfa\x58\x84\xab\xe3\x52\x93\xeb\x10" length:16]], "same");
 
-        [data release];
-
         data = SecEMCSCreateDerivedEMCSKey(fakeIdmsData, @"4321", NULL);
         ok(!data, "KFD2");
     }