S3 C++: Replace the remaing c code[WIP] Fixes #11
Currently so far:
- s3_make_date(): Refactored out
I don't have much knowledge of the s3 c code but this could be a replacement for the c code in C++/Qt removing the need for direct openssl use: https://wiki.qt.io/HMAC-SHA1
I don't have much knowledge of the s3 c code but this could be a replacement for the c code in C++/Qt removing the need for direct openssl use: https://wiki.qt.io/HMAC-SHA1
Sorry for taking so long to reply; I hadn't noticed I'd left this question hanging. That's a nice find, but as it happens the openssl linkage will be needed for other things, so I'd prefer to stick with openssl throughout. However the usage in s3_hmac_sign() can be achieved with just a single openssl call, so it would be good to simplify it. See for example its use here.
It should be possible to simplify the MD5 code similarly: https://www.openssl.org/docs/man1.1.1/man3/MD5.html
Is the md5 function used somewhere?
Is the md5 function used somewhere?
The only instance I could see was in s3_put(), which isn't used yet (and I think probably won't be needed in the future), so feel free to drop both if you also think they're not needed.
You still have [WIP] in the title, but this is good enough -- and substantial enough -- to merge in its current form. Did you have other changes in mind? If you did, it might make sense to put them in a follow-up PR, if you prefer?
I'd replace the s3 buckets struct if you don't mind and merge this afterwards. Then hole code of the s3 folder is no longer needed.