Buy commercial curl support from
WolfSSL. We help you work out your issues, debug your libcurl
applications, use the API, port to new platforms, add new features and more.
With a team lead by the curl founder himself.
libcurl and s3/minio
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: R C via curl-library <curl-library_at_lists.haxx.se>
Date: Tue, 26 Mar 2024 11:36:07 -0600
Hello,
I am trying to find out how to write something, using libcurl, to do
some io with a minio object store (s3 compatible)
I did go a bit through the examples page (some I have used as een
example for other projects), but could really find what I was looking
for. I did find a script that uses curl (the command) that seems to work
this is a code fragment, for what I try to write into C.
# Static Vars
DATE=$(date -R --utc)
CONTENT_TYPE='application/zstd'
SIG_STRING="GET\n\n${CONTENT_TYPE}\n${DATE}\n${MINIO_PATH}"
SIGNATURE=`echo -en ${SIG_STRING} | openssl sha1 -hmac ${PASSWORD}
-binary | base64`
PROTOCOL="https"
curl --insecure \
-o "${OUT_FILE}" \
-H "Host: $URL" \
-H "Date: ${DATE}" \
-H "Content-Type: ${CONTENT_TYPE}" \
-H "Authorization: AWS ${USERNAME}:${SIGNATURE}" \
${PROTOCOL}://$URL${MINIO_PATH}
I saw an example called httpcustomheader, which came closest to what I'm
looking for I think.
thanks,
Ron
Date: Tue, 26 Mar 2024 11:36:07 -0600
Hello,
I am trying to find out how to write something, using libcurl, to do
some io with a minio object store (s3 compatible)
I did go a bit through the examples page (some I have used as een
example for other projects), but could really find what I was looking
for. I did find a script that uses curl (the command) that seems to work
this is a code fragment, for what I try to write into C.
# Static Vars
DATE=$(date -R --utc)
CONTENT_TYPE='application/zstd'
SIG_STRING="GET\n\n${CONTENT_TYPE}\n${DATE}\n${MINIO_PATH}"
SIGNATURE=`echo -en ${SIG_STRING} | openssl sha1 -hmac ${PASSWORD}
-binary | base64`
PROTOCOL="https"
curl --insecure \
-o "${OUT_FILE}" \
-H "Host: $URL" \
-H "Date: ${DATE}" \
-H "Content-Type: ${CONTENT_TYPE}" \
-H "Authorization: AWS ${USERNAME}:${SIGNATURE}" \
${PROTOCOL}://$URL${MINIO_PATH}
I saw an example called httpcustomheader, which came closest to what I'm
looking for I think.
thanks,
Ron
-- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2024-03-26