Lines 243-249
__archive_md5init(archive_md5_ctx *ctx)
Link Here
|
243 |
{ |
243 |
{ |
244 |
if ((*ctx = EVP_MD_CTX_new()) == NULL) |
244 |
if ((*ctx = EVP_MD_CTX_new()) == NULL) |
245 |
return (ARCHIVE_FAILED); |
245 |
return (ARCHIVE_FAILED); |
246 |
EVP_DigestInit(*ctx, EVP_md5()); |
246 |
if (!EVP_DigestInit(*ctx, EVP_md5())) |
|
|
247 |
return (ARCHIVE_FAILED); |
247 |
return (ARCHIVE_OK); |
248 |
return (ARCHIVE_OK); |
248 |
} |
249 |
} |
249 |
|
250 |
|
Lines 434-440
__archive_ripemd160init(archive_rmd160_ctx *ctx)
Link Here
|
434 |
{ |
435 |
{ |
435 |
if ((*ctx = EVP_MD_CTX_new()) == NULL) |
436 |
if ((*ctx = EVP_MD_CTX_new()) == NULL) |
436 |
return (ARCHIVE_FAILED); |
437 |
return (ARCHIVE_FAILED); |
437 |
EVP_DigestInit(*ctx, EVP_ripemd160()); |
438 |
if (!EVP_DigestInit(*ctx, EVP_ripemd160())) |
|
|
439 |
return (ARCHIVE_FAILED); |
438 |
return (ARCHIVE_OK); |
440 |
return (ARCHIVE_OK); |
439 |
} |
441 |
} |
440 |
|
442 |
|
Lines 624-630
__archive_sha1init(archive_sha1_ctx *ctx)
Link Here
|
624 |
{ |
626 |
{ |
625 |
if ((*ctx = EVP_MD_CTX_new()) == NULL) |
627 |
if ((*ctx = EVP_MD_CTX_new()) == NULL) |
626 |
return (ARCHIVE_FAILED); |
628 |
return (ARCHIVE_FAILED); |
627 |
EVP_DigestInit(*ctx, EVP_sha1()); |
629 |
if (!EVP_DigestInit(*ctx, EVP_sha1())) |
|
|
630 |
return (ARCHIVE_FAILED); |
628 |
return (ARCHIVE_OK); |
631 |
return (ARCHIVE_OK); |
629 |
} |
632 |
} |
630 |
|
633 |
|
Lines 887-893
__archive_sha256init(archive_sha256_ctx *ctx)
Link Here
|
887 |
{ |
890 |
{ |
888 |
if ((*ctx = EVP_MD_CTX_new()) == NULL) |
891 |
if ((*ctx = EVP_MD_CTX_new()) == NULL) |
889 |
return (ARCHIVE_FAILED); |
892 |
return (ARCHIVE_FAILED); |
890 |
EVP_DigestInit(*ctx, EVP_sha256()); |
893 |
if (!EVP_DigestInit(*ctx, EVP_sha256())) |
|
|
894 |
return (ARCHIVE_FAILED); |
891 |
return (ARCHIVE_OK); |
895 |
return (ARCHIVE_OK); |
892 |
} |
896 |
} |
893 |
|
897 |
|
Lines 1122-1128
__archive_sha384init(archive_sha384_ctx *ctx)
Link Here
|
1122 |
{ |
1126 |
{ |
1123 |
if ((*ctx = EVP_MD_CTX_new()) == NULL) |
1127 |
if ((*ctx = EVP_MD_CTX_new()) == NULL) |
1124 |
return (ARCHIVE_FAILED); |
1128 |
return (ARCHIVE_FAILED); |
1125 |
EVP_DigestInit(*ctx, EVP_sha384()); |
1129 |
if (!EVP_DigestInit(*ctx, EVP_sha384())) |
|
|
1130 |
return (ARCHIVE_FAILED); |
1126 |
return (ARCHIVE_OK); |
1131 |
return (ARCHIVE_OK); |
1127 |
} |
1132 |
} |
1128 |
|
1133 |
|
Lines 1381-1387
__archive_sha512init(archive_sha512_ctx *ctx)
Link Here
|
1381 |
{ |
1386 |
{ |
1382 |
if ((*ctx = EVP_MD_CTX_new()) == NULL) |
1387 |
if ((*ctx = EVP_MD_CTX_new()) == NULL) |
1383 |
return (ARCHIVE_FAILED); |
1388 |
return (ARCHIVE_FAILED); |
1384 |
EVP_DigestInit(*ctx, EVP_sha512()); |
1389 |
if (!EVP_DigestInit(*ctx, EVP_sha512())) |
|
|
1390 |
return (ARCHIVE_FAILED); |
1385 |
return (ARCHIVE_OK); |
1391 |
return (ARCHIVE_OK); |
1386 |
} |
1392 |
} |
1387 |
|
1393 |
|