lsflib/src/md5sum.c
changeset 136 d82f65e902d0
parent 121 fef2ccfa7b12
child 158 2cddd4d26139
equal deleted inserted replaced
135:f837cf975e95 136:d82f65e902d0
    21 
    21 
    22     OpenSSL_add_all_digests ();
    22     OpenSSL_add_all_digests ();
    23 
    23 
    24     if ((f = fopen (fname, "rb")) == NULL) {
    24     if ((f = fopen (fname, "rb")) == NULL) {
    25         perror ("FOPEN");
    25         perror ("FOPEN");
    26         value = malloc (1);
    26         return NULL;
    27         value = 0;
       
    28         return value;
       
    29     }
    27     }
    30 
    28 
    31     if ((md = EVP_get_digestbyname ("md5")) == NULL) {
    29     if ((md = EVP_get_digestbyname ("md5")) == NULL) {
    32         value = malloc (1);
    30         return NULL;
    33         value = 0;
       
    34         return value;
       
    35     }
    31     }
    36 
    32 
    37     EVP_MD_CTX_init (&mdctx);
    33     EVP_MD_CTX_init (&mdctx);
    38     EVP_DigestInit_ex (&mdctx, md, NULL);
    34     EVP_DigestInit_ex (&mdctx, md, NULL);
    39 
    35