harbour-contrac icon indicating copy to clipboard operation
harbour-contrac copied to clipboard

S3 C++: Replace the remaing c code[WIP] Fixes #11

Open Thaodan opened this issue 5 years ago • 7 comments

Currently so far:

  • s3_make_date(): Refactored out

Thaodan avatar Jun 24 '20 13:06 Thaodan

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

Thaodan avatar Jul 15 '20 21:07 Thaodan

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.

llewelld avatar Jul 30 '20 19:07 llewelld

It should be possible to simplify the MD5 code similarly: https://www.openssl.org/docs/man1.1.1/man3/MD5.html

llewelld avatar Jul 30 '20 19:07 llewelld

Is the md5 function used somewhere?

Thaodan avatar Aug 02 '20 20:08 Thaodan

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.

llewelld avatar Aug 02 '20 20:08 llewelld

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?

llewelld avatar Aug 08 '20 14:08 llewelld

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.

Thaodan avatar Aug 08 '20 14:08 Thaodan