Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:garloff:OTC
libs3
md5-openssl3.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File md5-openssl3.diff of Package libs3
Index: libs3/src/bucket_metadata.c =================================================================== --- libs3.orig/src/bucket_metadata.c +++ libs3/src/bucket_metadata.c @@ -479,18 +479,20 @@ void S3_get_lifecycle(const S3BucketCont #ifndef __APPLE__ // Calculate MD5 and encode it as base64 void generate_content_md5(const char* data, int size, char* retBuffer, int retBufferSize) { - MD5_CTX mdContext; + const EVP_MD* md = EVP_md5(); + EVP_MD_CTX* md_context = EVP_MD_CTX_new(); BIO *bio, *b64; BUF_MEM *bufferPtr; + unsigned int md_len; char md5Buffer[MD5_DIGEST_LENGTH]; - MD5_Init(&mdContext); - MD5_Update(&mdContext, data, size); - MD5_Final((unsigned char*)md5Buffer, &mdContext); - + EVP_DigestInit_ex2(md_context, md, NULL); + EVP_DigestUpdate(md_context, data, size); + EVP_DigestFinal_ex(md_context, (unsigned char *)md5Buffer, &md_len); + EVP_MD_CTX_free(md_context); b64 = BIO_new(BIO_f_base64()); bio = BIO_new(BIO_s_mem()); bio = BIO_push(b64, bio);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor