Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
5c1c4d7
Support older libcurl versions
ellert May 28, 2016
2f9a24c
Fix OSX build error due to uint64_t format string incompatibility
sivachandran Jun 30, 2016
806d01d
fix test script to remove leftover test file; fix exit status of test…
Jul 6, 2016
da1f0fb
got v4 auth working on Mac OS
Sep 29, 2016
1b714e0
adapted v4 signature construction for Linux
Sep 29, 2016
34d11b2
add auth. region to relevant API calls
Sep 30, 2016
e67a3f6
add openssl libs to makefile, fix test code on Linux
Sep 30, 2016
0aedf1f
support the generate_query_string operation with the new authorizatio…
Sep 30, 2016
226bc75
fix query parameter handling in canonicalization; fix echoing in test…
Sep 30, 2016
584bf48
remove obsolete hash functions, update library major version due to A…
Sep 30, 2016
e466cc7
fix expected output for ACL with new identifier format
Oct 2, 2016
c3ed9e5
missed some whitespace in previous commit
Oct 2, 2016
20785ed
fix uninitialized memory issue
Oct 3, 2016
02f519d
increase length of auth. header to account for requests with many amz…
Oct 3, 2016
0feed6b
clean up test code
Oct 4, 2016
68d30d6
remove temporary test drivers from makefiles
Oct 4, 2016
61f6565
fix the logic that determines the hostname to use in HTTP headers
Oct 10, 2016
da6b030
headers: do not append empty Transfer-Encoding header
Oct 27, 2016
449c4a4
headers: do not append empty Transfer-Encoding header
Oct 27, 2016
731a009
Merge pull request #47 from RealImage/osx-build-error-fix
bji Nov 3, 2016
c73b7eb
Merge pull request #43 from ellert/oldnice
bji Nov 3, 2016
ab2ee4d
Merge pull request #48 from estadtherr/fix_test_script
bji Nov 3, 2016
ebd0789
Merge pull request #51 from andreikop/signed-headers-fix
bji Nov 3, 2016
a052a00
Revert prior change, which appears to have broken S3 authentication.
bji Nov 4, 2016
7458769
fix S3_destroy_request_context() to correctly abort curl_multi context
bingmann Nov 8, 2016
8a3b971
Merge branch 'master' into aws_auth_v4_pr
Nov 8, 2016
1814918
Isolate xml parsing fix
bester Dec 6, 2016
86cbc59
Merge pull request #50 from estadtherr/aws_auth_v4_pr
bji Dec 14, 2016
dc82436
Added comment describing osx makefile workaround.
bji Dec 14, 2016
987f525
Merge pull request #52 from thrill/master
bji Dec 14, 2016
06a4683
Merge pull request #53 from globus/origin-prefix-xml-listing
bji Dec 14, 2016
bb96e59
Minor whitespace fix to satisfy my OCD.
bji Dec 14, 2016
e5ff0c7
Request timeout for _create_bucket and _put_object
Dec 14, 2016
c4acef8
Request timeout for _get_object and _head_object
sergeydobrodey Jan 11, 2017
da639f3
remove trailing whitespace from some files
Feb 3, 2017
a168d1f
timeout: report timeout error if request timed out
Feb 3, 2017
552a45a
set request timeout for all functions
Feb 3, 2017
09c7862
version: set version 4.0 because request timeout has been added
Feb 3, 2017
c097c82
Fix comment for request timeout
Feb 6, 2017
208bcba
Merge pull request #54 from andreikop/timeout
bji Feb 6, 2017
24825a8
lifecycle: implement lifecycle support
Feb 8, 2017
aa5b5fd
lifecycle: fix naming
Feb 8, 2017
2abe669
lifecycle: update version and TODO
Feb 8, 2017
28d3968
Merge pull request #55 from andreikop/lifecycle
bji Feb 9, 2017
a99865a
Match http headers by case insensitive.
likema Mar 10, 2017
79a423e
Merge pull request #57 from likema/feature/ignore-http-headers-case
bji Mar 10, 2017
89de6d6
Fix building error in Ubuntu 12.04
likema Mar 9, 2017
12ad1b3
Fix strip error when cross compiling.
likema Mar 10, 2017
3d2f18e
Minor fix for building on macOS Sierra
mutantkeyboard Apr 4, 2017
cd5aa49
Merge pull request #60 from mutantkeyboard/master
bji Apr 6, 2017
5fbb16e
create bucket: ignore response body
Apr 7, 2017
84781bf
Added additional cheph specific error codes
May 11, 2017
946cf75
Merge pull request #2 from samkevich/master
andreikop May 11, 2017
1db09f5
Fix signature error when requesting with sub resource. Original change
bji May 24, 2017
0983d25
Merge pull request #58 from likema/feature/unused-value-error
bji May 24, 2017
ca194c6
Merge pull request #59 from likema/feature/cross-strip-error
bji May 24, 2017
bd4920b
Fix urlencode error according to AWS S3 documents.
likema May 23, 2017
728137b
Rename sort_and_urlencode_query_string to sort_query_string.
likema May 26, 2017
e7860b9
Merge pull request #62 from likema/feature/urlencode-error
bji May 26, 2017
adaaecc
remove -Wunused-parameter
May 31, 2017
19e6bd1
Merge pull request #61 from andreikop/master
bji May 31, 2017
ce36482
Fix crash in Windows by init and deinit libxml2 parser.
likema Mar 15, 2017
fd8b149
Merge pull request #63 from likema/feature/libxml2-init
bji Jun 1, 2017
da7cb76
Merge remote-tracking branch 'upstream/master'
sergeydobrodey Oct 2, 2017
05deb10
fixes https://github.com/bji/libs3/issues/21
sergeydobrodey Oct 2, 2017
e6ebeb7
extension to support curl_multi_socket_action operation
alexeip0 Oct 18, 2017
34340ec
add bucket-owner-full-control
Jul 3, 2018
f9c5fb8
Increase maximum object size
meinemitternacht Aug 21, 2018
6913723
Fix growbuffer_append
meinemitternacht Aug 21, 2018
de486a5
Merge pull request #68 from sergeydobrodey/master
bji Aug 21, 2018
ce6115b
Merge pull request #69 from alexeip0/feature/curl_multi_socket_action
bji Aug 21, 2018
a4d873f
Merge pull request #83 from joke-lee/add-bucket-owner-full-control
bji Aug 21, 2018
7676aa9
Increase MULTIPART_CHUNK_SIZE
meinemitternacht Sep 10, 2018
795ba3f
fix bug on S3_initiate_multipart
konfan Sep 27, 2018
537bb7b
Added GPLv2 as alternate license terms, and specified that the software
bji Oct 4, 2018
7f2fb1b
build: support curl >= 7.62
jengelh Nov 16, 2018
4f2db1e
Fix a bunch of code that I accepted via pull requests previously that…
bji Nov 29, 2018
784f639
Merge pull request #87 from jengelh/master
bji Nov 29, 2018
23a95ae
Merge pull request #86 from konfan/master
bji Nov 29, 2018
f7c1c48
Memory leak
martinprikryl Dec 3, 2018
111dc30
Merge pull request #89 from martinprikryl/patch-1
bji Dec 3, 2018
287e4be
Merge pull request #85 from meinemitternacht/meinemitternacht-patch-1
bji Apr 9, 2019
98f667b
Also build static version of binary.
bji Apr 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
339 changes: 339 additions & 0 deletions COPYING-GPLv2

Large diffs are not rendered by default.

File renamed without changes.
47 changes: 32 additions & 15 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# GNUmakefile
#
#
# Copyright 2008 Bryan Ischo <bryan@ischo.com>
#
#
# This file is part of libs3.
#
#
# libs3 is free software: you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, version 3 of the License.
# Software Foundation, version 3 or above of the License. You can also
# redistribute and/or modify it under the terms of the GNU General Public
# License, version 2 or above of the License.
#
# In addition, as a special exception, the copyright holders give
# permission to link the code of this library and its programs with the
Expand All @@ -20,6 +22,10 @@
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with libs3, in a file named COPYING. If not, see
# <http://www.gnu.org/licenses/>.
#
# You should also have received a copy of the GNU General Public License
# version 2 along with libs3, in a file named COPYING-GPLv2. If not, see
# <http://www.gnu.org/licenses/>.

# I tried to use the autoconf/automake/autolocal/etc (i.e. autohell) tools
# but I just couldn't stomach them. Since this is a Makefile for POSIX
Expand All @@ -38,8 +44,8 @@
# --------------------------------------------------------------------------
# Set libs3 version number, unless it is already set.

LIBS3_VER_MAJOR ?= 2
LIBS3_VER_MINOR ?= 0
LIBS3_VER_MAJOR ?= 4
LIBS3_VER_MINOR ?= 1
LIBS3_VER := $(LIBS3_VER_MAJOR).$(LIBS3_VER_MINOR)


Expand Down Expand Up @@ -119,6 +125,9 @@ ifndef LIBXML2_CFLAGS
LIBXML2_CFLAGS := $(shell xml2-config --cflags)
endif

ifndef OPENSSL_LIBS
OPENSSL_LIBS := -lssl -lcrypto
endif

# --------------------------------------------------------------------------
# These CFLAGS assume a GNU compiler. For other compilers, write a script
Expand All @@ -133,7 +142,7 @@ ifndef CFLAGS
endif
endif

CFLAGS += -Wall -Werror -Wshadow -Wextra -Iinc \
CFLAGS += -Wall -Wshadow -Wextra -Iinc \
$(CURL_CFLAGS) $(LIBXML2_CFLAGS) \
-DLIBS3_VER_MAJOR=\"$(LIBS3_VER_MAJOR)\" \
-DLIBS3_VER_MINOR=\"$(LIBS3_VER_MINOR)\" \
Expand All @@ -142,7 +151,10 @@ CFLAGS += -Wall -Werror -Wshadow -Wextra -Iinc \
-D_ISOC99_SOURCE \
-D_POSIX_C_SOURCE=200112L

LDFLAGS = $(CURL_LIBS) $(LIBXML2_LIBS) -lpthread
LDFLAGS = $(CURL_LIBS) $(LIBXML2_LIBS) $(OPENSSL_LIBS) -lpthread

STRIP ?= strip
INSTALL := install --strip-program=$(STRIP)


# --------------------------------------------------------------------------
Expand All @@ -156,7 +168,7 @@ all: exported test
# Exported targets are the library and driver program

.PHONY: exported
exported: libs3 s3 headers
exported: libs3 s3 s3-static headers


# --------------------------------------------------------------------------
Expand All @@ -165,11 +177,11 @@ exported: libs3 s3 headers
.PHONY: install
install: exported
$(QUIET_ECHO) $(DESTDIR)/bin/s3: Installing executable
$(VERBOSE_SHOW) install -Dps -m u+rwx,go+rx $(BUILD)/bin/s3 \
$(VERBOSE_SHOW) $(INSTALL) -Dps -m u+rwx,go+rx $(BUILD)/bin/s3 \
$(DESTDIR)/bin/s3
$(QUIET_ECHO) \
$(LIBDIR)/libs3.so.$(LIBS3_VER): Installing shared library
$(VERBOSE_SHOW) install -Dps -m u+rw,go+r \
$(VERBOSE_SHOW) $(INSTALL) -Dps -m u+rw,go+r \
$(BUILD)/lib/libs3.so.$(LIBS3_VER_MAJOR) \
$(LIBDIR)/libs3.so.$(LIBS3_VER)
$(QUIET_ECHO) \
Expand All @@ -179,10 +191,10 @@ install: exported
$(QUIET_ECHO) $(LIBDIR)/libs3.so: Linking shared library
$(VERBOSE_SHOW) ln -sf libs3.so.$(LIBS3_VER_MAJOR) $(LIBDIR)/libs3.so
$(QUIET_ECHO) $(LIBDIR)/libs3.a: Installing static library
$(VERBOSE_SHOW) install -Dp -m u+rw,go+r $(BUILD)/lib/libs3.a \
$(VERBOSE_SHOW) $(INSTALL) -Dp -m u+rw,go+r $(BUILD)/lib/libs3.a \
$(LIBDIR)/libs3.a
$(QUIET_ECHO) $(DESTDIR)/include/libs3.h: Installing header
$(VERBOSE_SHOW) install -Dp -m u+rw,go+r $(BUILD)/include/libs3.h \
$(VERBOSE_SHOW) $(INSTALL) -Dp -m u+rw,go+r $(BUILD)/include/libs3.h \
$(DESTDIR)/include/libs3.h


Expand Down Expand Up @@ -218,7 +230,7 @@ $(BUILD)/obj/%.do: src/%.c
@ $(CC) $(CFLAGS) -M -MG -MQ $@ -DCOMPILINGDEPENDENCIES \
-o $(BUILD)/dep/$(<:%.c=%.dd) -c $<
@ mkdir -p $(dir $@)
$(VERBOSE_SHOW) $(CC) $(CFLAGS) -fpic -fPIC -o $@ -c $<
$(VERBOSE_SHOW) $(CC) $(CFLAGS) -fpic -fPIC -o $@ -c $<


# --------------------------------------------------------------------------
Expand All @@ -230,7 +242,7 @@ LIBS3_STATIC = $(BUILD)/lib/libs3.a
.PHONY: libs3
libs3: $(LIBS3_SHARED) $(LIBS3_STATIC)

LIBS3_SOURCES := acl.c bucket.c error_parser.c general.c \
LIBS3_SOURCES := bucket.c bucket_metadata.c error_parser.c general.c \
object.c request.c request_context.c \
response_headers_handler.c service_access_logging.c \
service.c simplexml.c util.c multipart.c
Expand All @@ -252,12 +264,17 @@ $(LIBS3_STATIC): $(LIBS3_SOURCES:%.c=$(BUILD)/obj/%.o)

.PHONY: s3
s3: $(BUILD)/bin/s3
s3-static: $(BUILD)/bin/s3-static

$(BUILD)/bin/s3: $(BUILD)/obj/s3.o $(LIBS3_SHARED)
$(QUIET_ECHO) $@: Building executable
@ mkdir -p $(dir $@)
$(VERBOSE_SHOW) $(CC) -o $@ $^ $(LDFLAGS)

$(BUILD)/bin/s3-static: $(BUILD)/obj/s3.o $(LIBS3_STATIC)
$(QUIET_ECHO) $@: Building static executable
@ mkdir -p $(dir $@)
$(VERBOSE_SHOW) $(CC) -o $@ $^ $(LDFLAGS)

# --------------------------------------------------------------------------
# libs3 header targets
Expand Down
20 changes: 12 additions & 8 deletions GNUmakefile.mingw
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# GNUmakefile.mingw
#
# Copyright 2008 Bryan Ischo <bryan@ischo.com>
#
#
# This file is part of libs3.
#
#
# libs3 is free software: you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, version 3 of the License.
# Software Foundation, version 3 or above of the License. You can also
# redistribute and/or modify it under the terms of the GNU General Public
# License, version 2 or above of the License.
#
# In addition, as a special exception, the copyright holders give
# permission to link the code of this library and its programs with the
Expand All @@ -20,6 +20,10 @@
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with libs3, in a file named COPYING. If not, see
# <http://www.gnu.org/licenses/>.
#
# You should also have received a copy of the GNU General Public License
# version 2 along with libs3, in a file named COPYING-GPLv2. If not, see
# <http://www.gnu.org/licenses/>.

# I tried to use the autoconf/automake/autolocal/etc (i.e. autohell) tools
# but I just couldn't stomach them. Since this is a Makefile for POSIX
Expand All @@ -38,8 +42,8 @@
# --------------------------------------------------------------------------
# Set libs3 version number, unless it is already set.

LIBS3_VER_MAJOR ?= 2
LIBS3_VER_MINOR ?= 0
LIBS3_VER_MAJOR ?= 4
LIBS3_VER_MINOR ?= 1
LIBS3_VER := $(LIBS3_VER_MAJOR).$(LIBS3_VER_MINOR)


Expand Down Expand Up @@ -212,7 +216,7 @@ LIBS3_STATIC = $(BUILD)/lib/libs3.a
.PHONY: libs3
libs3: $(LIBS3_SHARED) $(BUILD)/lib/libs3.a

LIBS3_SOURCES := src/acl.c src/bucket.c src/error_parser.c src/general.c \
LIBS3_SOURCES := src/bucket.c src/bucket_metadata.c src/error_parser.c src/general.c \
src/object.c src/request.c src/request_context.c \
src/response_headers_handler.c src/service_access_logging.c \
src/service.c src/simplexml.c src/util.c src/multipart.c \
Expand Down
33 changes: 22 additions & 11 deletions GNUmakefile.osx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# GNUmakefile.osx
#
# Copyright 2008 Bryan Ischo <bryan@ischo.com>
#
#
# This file is part of libs3.
#
#
# libs3 is free software: you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, version 3 of the License.
# Software Foundation, version 3 or above of the License. You can also
# redistribute and/or modify it under the terms of the GNU General Public
# License, version 2 or above of the License.
#
# In addition, as a special exception, the copyright holders give
# permission to link the code of this library and its programs with the
Expand All @@ -20,6 +20,10 @@
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with libs3, in a file named COPYING. If not, see
# <http://www.gnu.org/licenses/>.
#
# You should also have received a copy of the GNU General Public License
# version 2 along with libs3, in a file named COPYING-GPLv2. If not, see
# <http://www.gnu.org/licenses/>.

# I tried to use the autoconf/automake/autolocal/etc (i.e. autohell) tools
# but I just couldn't stomach them. Since this is a Makefile for POSIX
Expand All @@ -38,8 +42,8 @@
# --------------------------------------------------------------------------
# Set libs3 version number, unless it is already set.

LIBS3_VER_MAJOR ?= 2
LIBS3_VER_MINOR ?= 0
LIBS3_VER_MAJOR ?= 4
LIBS3_VER_MINOR ?= 1
LIBS3_VER := $(LIBS3_VER_MAJOR).$(LIBS3_VER_MINOR)


Expand Down Expand Up @@ -102,6 +106,9 @@ endif

ifndef LIBXML2_LIBS
LIBXML2_LIBS := $(shell xml2-config --libs)
# Work around missing libsystem_symptoms.dylib in Xcode 8; see
# http://stackoverflow.com/questions/39536144/libsystem-symptoms-dylib-missing-in-xcode-8
LIBXML2_LIBS := $(filter-out -L$(shell xcrun --show-sdk-path)/usr/lib, $(LIBXML2_LIBS))
endif

ifndef LIBXML2_CFLAGS
Expand All @@ -122,7 +129,12 @@ ifndef CFLAGS
endif
endif

CFLAGS += -Wall -Werror -Wshadow -Wextra -Iinc \
# --------------------------------------------------------------------------
# -Werror breaks the build on the macOS Sierra rendering build unusable
# so we use -Wunused-parameter flag instead that will only issue a warning
# with the newest clang compiler

CFLAGS += -Wall -Wunused-parameter -Wshadow -Wextra -Iinc \
$(CURL_CFLAGS) $(LIBXML2_CFLAGS) \
-DLIBS3_VER_MAJOR=\"$(LIBS3_VER_MAJOR)\" \
-DLIBS3_VER_MINOR=\"$(LIBS3_VER_MINOR)\" \
Expand Down Expand Up @@ -208,7 +220,7 @@ $(BUILD)/obj/%.do: src/%.c
@ gcc $(CFLAGS) -M -MG -MQ $@ -DCOMPILINGDEPENDENCIES \
-o $(BUILD)/dep/$(<:%.c=%.dd) -c $<
@ mkdir -p $(dir $@)
$(VERBOSE_SHOW) gcc $(CFLAGS) -fpic -fPIC -o $@ -c $<
$(VERBOSE_SHOW) gcc $(CFLAGS) -fpic -fPIC -o $@ -c $<


# --------------------------------------------------------------------------
Expand All @@ -220,7 +232,7 @@ LIBS3_STATIC = $(BUILD)/lib/libs3.a
.PHONY: libs3
libs3: $(LIBS3_SHARED) $(LIBS3_SHARED_MAJOR) $(BUILD)/lib/libs3.a

LIBS3_SOURCES := src/acl.c src/bucket.c src/error_parser.c src/general.c \
LIBS3_SOURCES := src/bucket.c src/bucket_metadata.c src/error_parser.c src/general.c \
src/object.c src/request.c src/request_context.c \
src/response_headers_handler.c src/service_access_logging.c \
src/service.c src/simplexml.c src/util.c src/multipart.c
Expand Down Expand Up @@ -274,7 +286,6 @@ $(BUILD)/bin/testsimplexml: $(BUILD)/obj/testsimplexml.o $(LIBS3_STATIC)
@ mkdir -p $(dir $@)
$(VERBOSE_SHOW) gcc -o $@ $^ $(LIBXML2_LIBS)


# --------------------------------------------------------------------------
# Clean target

Expand Down
12 changes: 10 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ Copyright 2008 Bryan Ischo <bryan@ischo.com>

libs3 is free software: you can redistribute it and/or modify it under the
terms of the GNU Lesser General Public License as published by the Free
Software Foundation, version 3 of the License.
Software Foundation, version 3 or above of the License.

You can also redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation,
version 2 or above of the License.

In addition, as a special exception, the copyright holders give
permission to link the code of this library and its programs with the
Expand All @@ -14,5 +18,9 @@ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.

You should have received a copy of the GNU Lesser General Public License
version 3 along with libs3, in a file named COPYING. If not, see
version 3 along with libs3, in a file named COPYING-LGPLv3. If not, see
<http://www.gnu.org/licenses/>.

You should also have received a copy of the GNU General Public License
version 2 along with libs3, in a file named COPYING-GPLv2. If not, see
<http://www.gnu.org/licenses/>.
5 changes: 0 additions & 5 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ This is Amazon's "user" management API; not part of S3 although IAM users can be
- POST /?delete -- 4 hours


=== Object Expiration Support ===

- Handle the /?lifecycle property: 8 hours


=== MFA Authentication ===

(part of Bucket Policy)
Expand Down
12 changes: 9 additions & 3 deletions inc/error_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
* error_parser.h
*
* Copyright 2008 Bryan Ischo <bryan@ischo.com>
*
*
* This file is part of libs3.
*
*
* libs3 is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, version 3 of the License.
* Software Foundation, version 3 or above of the License. You can also
* redistribute and/or modify it under the terms of the GNU General Public
* License, version 2 or above of the License.
*
* In addition, as a special exception, the copyright holders give
* permission to link the code of this library and its programs with the
Expand All @@ -22,6 +24,10 @@
* version 3 along with libs3, in a file named COPYING. If not, see
* <http://www.gnu.org/licenses/>.
*
* You should also have received a copy of the GNU General Public License
* version 2 along with libs3, in a file named COPYING-GPLv2. If not, see
* <http://www.gnu.org/licenses/>.
*
************************************************************************** **/

#ifndef ERROR_PARSER_H
Expand Down
Loading