mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-09-22 14:29:02 +00:00
Fix MD5 when using gnutls with nettle
This matches the non-nettle definition of s3fs_md5_fd.
This commit is contained in:
parent
041b4ec05c
commit
9a55c9fd9f
@ -194,6 +194,14 @@ unsigned char* s3fs_md5_fd(int fd, off_t start, off_t size)
|
|||||||
off_t bytes;
|
off_t bytes;
|
||||||
unsigned char* result;
|
unsigned char* result;
|
||||||
|
|
||||||
|
if(-1 == size){
|
||||||
|
struct stat st;
|
||||||
|
if(-1 == fstat(fd, &st)){
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
size = st.st_size;
|
||||||
|
}
|
||||||
|
|
||||||
md5_init(&ctx_md5);
|
md5_init(&ctx_md5);
|
||||||
|
|
||||||
for(off_t total = 0; total < size; total += bytes){
|
for(off_t total = 0; total < size; total += bytes){
|
||||||
|
Loading…
Reference in New Issue
Block a user