X-Git-Url: http://developer.intra2net.com/git/?a=blobdiff_plain;f=src%2Fcrypto.cpp;h=2aeb614896de0f67ed907b3a0e4464e73c85e782;hb=4cefaf511d9ed79ad13ab59c46bd0ddc60e758f6;hp=d08f5d6a709ef6fedc11669e7dc4bda27979eee6;hpb=e613cd718ebc029df11f4b43b55e65c95451a04a;p=libi2ncommon diff --git a/src/crypto.cpp b/src/crypto.cpp index d08f5d6..2aeb614 100644 --- a/src/crypto.cpp +++ b/src/crypto.cpp @@ -168,9 +168,10 @@ string I2n::hash_file(string filename, algorithm algo) } } + fclose(file); + if (!EVP_DigestFinal_ex(ctx.get(), ret.get(), &olen)) { - fclose(file); throw runtime_error(ERROR_MESSAGE); }