Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert S3 client C code into C++ #11

Open
llewelld opened this issue Jun 23, 2020 · 5 comments
Open

Convert S3 client C code into C++ #11

llewelld opened this issue Jun 23, 2020 · 5 comments

Comments

@llewelld
Copy link
Owner

The S3 client access code needs cleaning up and converting from C to C++.

@Thaodan
Copy link

Thaodan commented Jun 24, 2020

See #21

@Thaodan
Copy link

Thaodan commented Jun 24, 2020

This also could remove the libxml2 dependency.

@Thaodan
Copy link

Thaodan commented Jun 24, 2020

Methods that need to be replaced (in order of dependency):

  • s3_free(m_s3);
  • s3_hmac_sign()
  • s3_init()
  • s3_bucket_entries_free(entries);

Structs:

  • struct s3_bucket_entry_head *entries;
  • struct s3_bucket_entry_head

Used this to check for uses of s3c code:

cd src
for to_replace in \
    s3_bucket_entry \
        s3_init \
        s3_free \
        s3_string \
        s3_string_init \
        s3_string_curl_writefunc \
        s3_string_curl_readfunc\
        s3_string_free\
        s3_hmac_sign\
        s3_md5_sum\
        s3_get\
        s3_delete\
        s3_put\
        s3_bucket_entry_free \
        s3_bucket_entries_free\
        s3_bucket_entry_head
        do
    grep -H $to_replace -- *
done

@Thaodan
Copy link

Thaodan commented Jun 25, 2020

@Thaodan
Copy link

Thaodan commented Jun 28, 2020

This Wiki page gives the hint we could replace this with an Qt function replacing the need to work directly with OpenSSL code.

Thaodan added a commit to Thaodan/harbour-contrac that referenced this issue Aug 2, 2020
Instead of using s3_hmac_sign() which does everything on its own
resuse HMAC() from OpenSSL. This adds some casting that was done
previously inside s3_hmac_sign() to performOp().
In addition we no longer use the deprecated HMAC_Init(HMAC_CTX *ctx, const void *key, int key_len,
               const EVP_MD *md) (<1.1).

Removes the usage of:
+ s3_hmac_sign()

Contributes to llewelld#11
Thaodan added a commit to Thaodan/harbour-contrac that referenced this issue Aug 2, 2020
The S3 struct is no longer used since all c-style s3 methods are no
longer used.
Remove all code that related to it.

Removes the usage of:
+ s3_free()
+ s3_init()

Contributes to llewelld#11.
Thaodan added a commit to Thaodan/harbour-contrac that referenced this issue Aug 3, 2020
Instead of using s3_hmac_sign() which does everything on its own
resuse HMAC() from OpenSSL. This adds some casting that was done
previously inside s3_hmac_sign() to performOp().
In addition we no longer use the deprecated HMAC_Init(HMAC_CTX *ctx, const void *key, int key_len,
               const EVP_MD *md) (<1.1).

Removes the usage of:
+ s3_hmac_sign()

Contributes to llewelld#11
Thaodan added a commit to Thaodan/harbour-contrac that referenced this issue Aug 3, 2020
The S3 struct is no longer used since all c-style s3 methods are no
longer used.
Remove all code that related to it.

Removes the usage of:
+ s3_free()
+ s3_init()

Contributes to llewelld#11.
Thaodan added a commit to Thaodan/harbour-contrac that referenced this issue Aug 3, 2020
Instead of using s3_hmac_sign() which does everything on its own
resuse HMAC() from OpenSSL. This adds some casting that was done
previously inside s3_hmac_sign() to performOp().
In addition we no longer use the deprecated HMAC_Init(HMAC_CTX *ctx, const void *key, int key_len,
               const EVP_MD *md) (<1.1).

Removes the usage of:
+ s3_hmac_sign()

Contributes to llewelld#11
Thaodan added a commit to Thaodan/harbour-contrac that referenced this issue Aug 3, 2020
The S3 struct is no longer used since all c-style s3 methods are no
longer used.
Remove all code that related to it.

Removes the usage of:
+ s3_free()
+ s3_init()

Contributes to llewelld#11.
Thaodan added a commit to Thaodan/harbour-contrac that referenced this issue Aug 3, 2020
Instead of using s3_hmac_sign() which does everything on its own
resuse HMAC() from OpenSSL. This adds some casting that was done
previously inside s3_hmac_sign() to performOp().
In addition we no longer use the deprecated HMAC_Init(HMAC_CTX *ctx, const void *key, int key_len,
               const EVP_MD *md) (<1.1).

Removes the usage of:
+ s3_hmac_sign()

Contributes to llewelld#11
Thaodan added a commit to Thaodan/harbour-contrac that referenced this issue Aug 3, 2020
The S3 struct is no longer used since all c-style s3 methods are no
longer used.
Remove all code that related to it.

Removes the usage of:
+ s3_free()
+ s3_init()

Contributes to llewelld#11.
Thaodan added a commit to Thaodan/harbour-contrac that referenced this issue Aug 4, 2020
Instead of using s3_hmac_sign() which does everything on its own
resuse HMAC() from OpenSSL. This adds some casting that was done
previously inside s3_hmac_sign() to performOp().
In addition we no longer use the deprecated HMAC_Init(HMAC_CTX *ctx, const void *key, int key_len,
               const EVP_MD *md) (<1.1).

Removes the usage of:
+ s3_hmac_sign()

Contributes to llewelld#11
Thaodan added a commit to Thaodan/harbour-contrac that referenced this issue Aug 4, 2020
The S3 struct is no longer used since all c-style s3 methods are no
longer used.
Remove all code that related to it.

Removes the usage of:
+ s3_free()
+ s3_init()

Contributes to llewelld#11.
Thaodan added a commit to Thaodan/harbour-contrac that referenced this issue Aug 8, 2020
Instead of using s3_hmac_sign() which does everything on its own
resuse HMAC() from OpenSSL. This adds some casting that was done
previously inside s3_hmac_sign() to performOp().
In addition we no longer use the deprecated HMAC_Init(HMAC_CTX *ctx, const void *key, int key_len,
               const EVP_MD *md) (<1.1).

Removes the usage of:
+ s3_hmac_sign()

Contributes to llewelld#11
Thaodan added a commit to Thaodan/harbour-contrac that referenced this issue Aug 8, 2020
The S3 struct is no longer used since all c-style s3 methods are no
longer used.
Remove all code that related to it.

Removes the usage of:
+ s3_free()
+ s3_init()

Contributes to llewelld#11.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants