/* compute MD5 or SHA1 hash */
if (digest) {
char md[CRYPTO_DIGEST_MAX_SIZE];
- size_t size;
+ uint32_t size;
size = sizeof(md);
return 1;
}
- if (crypto_digest_finalize(digest, &md, &size)) {
+ if (crypto_digest_finalize(digest, (uint8_t *)md, &size)) {
char *digest_buf;
const char *digest_name;
- digest_buf = (char *) malloc(BASE64_SIZE(size));
+ digest_buf = (char *)malloc(BASE64_SIZE(size));
digest_name = crypto_digest_name(digest);
- bin_to_base64(digest_buf, (char *) md, size);
+ bin_to_base64(digest_buf, BASE64_SIZE(size), md, size, true);
Dmsg3(400, "send inx=%d %s=%s\n", jcr->JobFiles, digest_name, digest_buf);
bnet_fsend(dir, "%d %d %s *%s-%d*", jcr->JobFiles, digest_stream, digest_buf,
digest_name, jcr->JobFiles);
if (ff_pkt->statp.st_size > 0 || ff_pkt->type == FT_RAW
|| ff_pkt->type == FT_FIFO) {
- if ((bopen(&bfd, ff_pkt->fname, O_RDONLY | O_BINARY, 0)) < 0) {
+ int noatime = ff_pkt->flags & FO_NOATIME ? O_NOATIME : 0;
+ if ((bopen(&bfd, ff_pkt->fname, O_RDONLY | O_BINARY | noatime, 0)) < 0) {
ff_pkt->ff_errno = errno;
berrno be;
be.set_errno(bfd.berrno);
}
if (digest && ff_pkt->flags & FO_HFSPLUS) {
- crypto_digest_update(digest, ff_pkt->hfsinfo.fndrinfo, 32);
+ crypto_digest_update(digest, (uint8_t *)ff_pkt->hfsinfo.fndrinfo, 32);
}
#endif
char buf[DEFAULT_NETWORK_BUFFER_SIZE];
int64_t n;
- while ((n=bread(bfd, &buf, sizeof(buf))) > 0) {
- crypto_digest_update(digest, &buf, n);
+ while ((n=bread(bfd, buf, sizeof(buf))) > 0) {
+ crypto_digest_update(digest, (uint8_t *)buf, n);
jcr->JobBytes += n;
jcr->ReadBytes += n;
}