]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_keychain/libDER/Tests/parseTicket.c
Security-57740.1.18.tar.gz
[apple/security.git] / OSX / libsecurity_keychain / libDER / Tests / parseTicket.c
index a55cee53814c1babb7afeb07d6fc4efd9560477c..1d70734189659a818510d1e00ef9f1930cb95c8b 100644 (file)
@@ -257,29 +257,6 @@ dumpBytes( const char *title, const unsigned char *data, int len, int nonewline
     printf("\n");
 }
 
-static void
-readFile(char *filename, unsigned char **data, unsigned *len)
-{
-    int size = 0;
-    FILE *file = NULL;
-    if ((file = fopen(filename, "r")) == NULL) {
-        fprintf(stderr, "could not open file=%s", filename);
-        return;
-    }
-    fseek(file, 0, SEEK_END);
-    size = ftell(file);
-    *len = size;
-    *data = (unsigned char*)malloc(*len);
-    if (!*data) {
-        fprintf(stderr, "Out of memory");
-        fclose(file);
-        return;
-    }
-    rewind(file);
-    (void)fread(*data, size, 1, file);
-    fclose(file);
-}
-
 static void
 writeFile( char* filename, unsigned char* buf, int len )
 {