37 Commits
Author SHA1 Message Date
Justin Boswell 2f8d2ee756 Made PHP extension compile with openssl by default (#41)
* Made PHP extension compile with openssl

* Use catchsegv to dump a callstack

* Updated to use aws_crt_crypto_share()

* Much faster builds by making cmake parallel if supported

* Make sure all CRT threads shutdown prior to cleanup

* USE_OPENSSL should be the path to openssldir

* Updated to aws-crt-ffi v0.2.4
2021-08-30 13:36:54 -07:00
Justin Boswell 0af673491a Removed FFI support (#45)
* Removed FFI support

* run_tests and ci-test.sh should never have differed. Fixing now

* run_tests can now update composer
2021-08-17 19:06:14 -07:00
Justin Boswell fb4814c4e1 re-applied changes to makefile that were SOMEHOW lost 2021-08-17 22:56:53 +00:00
Justin Boswell e5ffe9d63d Added validation for signing/signing config (#43)
* Imported aws-crt-ffi/validation

* Exposed Signing::testVerifySigV4ASigning

* Updated to aws-crt-ffi v0.2.3
2021-08-03 19:12:28 +00:00
Justin Boswell 8d76d4fac3 Added logging support from aws-crt-ffi (#42)
* Added logging support from aws-crt-ffi

* Updated to aws-crt-ffi v0.2.1
2021-08-03 09:25:52 -07:00
Justin Boswell 92724b8d51 Implemented SigV4A (#40)
* Implemented should_sign_header callback

* Added SigV4A to SigningAlgorithm

* Added SigV4A test

* Added debugging info to README

* Fixed memory leak from argument vectors

* Fixed memory leak of stream read buffers

* Added support for callables as option values

* Added should_sign_header support and test

* Fixed ELG type bug exposed by aws-crt-ffi change

* Updated to aws-crt-ffi v0.2.0
2021-07-28 12:54:37 -07:00
Justin Boswell 3f77a01fbf Updated to aws-crt-ffi v0.1.6, updated http API (#39)
* Updated to aws-crt-ffi v0.1.6, updated http API

* clang-format
2021-07-08 12:57:07 -04:00
Justin Boswell 1feba3eb6a Updated aws-crt-ffi to v0.1.5 to get CRC32/CRC32C (#32) 2021-06-18 15:46:52 -07:00
Justin BoswellandItamar Levy-Or ebfb91f562 Crc32 (#31)
* broken

* crc tests

* ffi changes

* large buffer test

* ffi cmake fix

* formatting

* laws-checksums config.m4

* broken

* crc tests

* ffi changes

* large buffer test

* ffi cmake fix

* formatting

* laws-checksums config.m4

* Fixed aws-crt-ffi after rebase of main

* Regenerated awscrt_arginfo.h

* merge fix

* Fixed arginfo

* try forcing memory limit higher

* mem_limit set

* newline

Co-authored-by: Itamar Levy-Or <[email protected]>
2021-06-18 18:04:56 -04:00
Justin Boswell 078df4825c Windows build (#29)
* Added build instruction updates for Windows to README

* Added composer to requirements
2021-06-17 09:21:00 -07:00
Justin Boswell f6f9a6b349 Restored FFI to working order (#28)
* Restored FFI to working order

* Disabled incompatible tests, fixed string conversion

* Use extension_loaded instead of checking PHP version

* Added better checks for FFI

* Do not build FFI deps if no FFI is present
2021-06-16 11:26:31 -07:00
Justin Boswell d2546e616d Only shim expectException if necessary (#27)
* Only shim expectException if necessary

* Added missing entries to gitignore
2021-06-08 09:56:32 -07:00
Justin Boswell 7d47316a7d Implemented async callbacks to PHP regardless of thread model, Sigv4 signing (#24)
* Updated to get latest aws-crt-ffi

* Added implementation for signing_result

* Added main thread queue and callback queueing to signing process

* Updated to get support for date on signing_config_aws

* added date support to SigningConfigAWS, fixed up reference issues on http message signing

* Broke C code into separate files, moved common stuff to php_aws_crt.h

* Use a unity build to make PHP do the right thing with our lib

* Updated aws-crt-ffi to v0.1.3 to get sigv4 changes

* Added CRT::isAvailable for safe runtime detection of CRT

* Fixed up test resource safety, added tests to prove it

* Added CI jobs for every version of PHP on linux (#26)
2021-06-08 00:34:42 +00:00
Justin Boswell a99fdeb9d3 Added bindings for Signable, SigningConfig, Signing (#23)
* Added bindings for Signable, SigningConfig, Signing

* Fixed PHP5.6 argument vector madness

* Added SigningConfigAWS implementation and lifetime tests

* Updated .gitignore

* Added impl for Signing::signRequestAws(), laid out sigv4 test
2021-05-18 14:06:26 -07:00
Justin Boswell beda2f5376 Updated aws-crt-ffi to v0.1.2 (#22) 2021-05-05 14:02:13 -07:00
Justin Boswell 7e925c92fb Cleanup pass based on prior PRs (#21)
* Updates to stub generation

* More idiomatic fixes from PHP team

* Moved tests from src/tests -> tests, got rid of extension-only tests

* fixed up test paths, regenerated arginfo
2021-05-05 13:37:47 -07:00
Justin Boswell 531330e1b2 Idiomatic fixes from previous PRs (#20)
* Various idiomatic feedback from PHP team

* Additional fixes after debugging tests
2021-03-25 15:13:23 -04:00
Justin Boswell 9c9422c21f HTTP message API (#19)
* HTTP message API

* Added MacOS CI

* Grabbed fixes for mac from aws-crt-ffi
2021-03-25 13:14:07 -04:00
Justin Boswell 974fe3d74a Input Stream bindings (#18)
* Initial aws_input_stream <-> php_stream implementation

* Added comments about useful references

* updated aws-crt-ffi to get latest aws-lc, faster builds

* Fixed inconsistency between PHP5/7 versions of php_stream_from_zval
2021-03-19 13:29:14 -07:00
Justin Boswell 73ecd3bc8a AWS Credentials support, StaticCredentials Provider (#17)
* added credentials API, disabled FFI backend for now

* Added CredentialsTest

* Added support for specifying CMAKE_BUILD_TYPE on the command line

* Added support for AwsCredentials and StaticCredentialsProvider
2021-03-17 13:59:05 -04:00
Justin Boswell 9171857448 Updated CRT library, test process, EventLoopGroup API updates (#16)
* Updated to latest aws-crt-ffi, updated EventLoopGroup/options init

* Removed test-ci target, just use test for everything now

* Added event_loop_group API to CRT/stubs

* Removed headers (all generated) from format-check

* Added the ability to force extension vs FFI

* make test will now trigger composer run test/phpunit, and force tests with both FFI and extension

* Updated builder version, removed redundant php7 test run

* Removed type annotations that anger php5, limited backends on php5
2021-03-12 11:47:55 -08:00
Justin Boswell 8bd13c710e Added EventLoopGroup API to native extension (#15) 2021-03-04 08:46:13 -05:00
Justin Boswell 7d76b6f3d9 Updated aws-crt-ffi to v0.1.0 (#14)
* Updated aws-crt-ffi to v0.1.0

* make/config changes

* Updated aws-crt-ffi to v0.1.1
2021-03-03 15:37:32 -08:00
Justin Boswell 5eaaa70cf1 Added aws_error* functions to native extension (#12)
* Added aws_crt_error_str and test, removed awscrt_version test function

* Added aws_crt_error_name

* Added aws_crt_error_debug_str

* Use PHP's own tools to generate arginfo

* Only re-generate arginfo on php7+

* Added a definition for ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX for php5

* Ignore generated files for clang-format
2021-02-24 10:16:32 -08:00
Justin Boswell 778eafcf05 Initial skeleton to make extension support CRT FFI API (#11)
* Fixed build issues with static CRT, separated ffi target

* Fixed makefile for test-ffi target
2021-02-22 15:55:15 -08:00
Justin Boswell c30c1486fe Organized modules, added indirection for FFI vs extension loading (#10)
* mv src -> ext, lib -> src to be more in line with PHP module expectations

* Fixed dependency for ffi test

* Fixed path in format-check to C source

* CRT will now try the extension first, then FFI
2021-02-16 10:31:42 -08:00
Justin Boswell aee57a929d Added test-ffi target, use it in CI (#9)
* Added test-ffi target, use it in CI

* Added clang-format config, fixed RETURN_STRING API mismatch

* Skip installing php and packages on the PHP docker images

* Removed al2 job that was never going to work, and compiler tests

* Fixed basic test for extension loading

* Cleaned up lib structure, fixed tests

* use test-ci target to conditionally test in GitHub

* Use v0.8.1 of builder
2021-02-15 09:47:32 -08:00
Justin Boswell 7b5ccfd55a Unit tests and I/O bindings (#8)
* Added composer config, added IO/error tests using phpunit

* Added ApiGen doc comments

* Added test to ensure last_error is not set from loading up the CRT
2021-02-09 10:26:41 -08:00
Justin Boswell 3fed547551 Imported CRT FFI lib (#7)
* Added php7 library skeleton

* Re-worked Makefile.frag to use paths correctly

* Added gitignore for lib

* clang-format

* Remove symlinked api.h

* Copy api.h into lib/ as part of build
2021-01-29 13:44:55 -08:00
Justin Boswell c6fac2d99f Added recursive clone instructions 2021-01-27 11:27:30 -08:00
Justin Boswell ab9a841a71 Updated readme with build instructions 2021-01-27 11:13:30 -08:00
Justin Boswell 0b1b368a8f Imported aws-crt-ffi as submodule (#6)
* Removed direct submodules

* Added aws-crt-ffi as submodule

*  updated makefile to build aws-crt-ffi
2021-01-22 09:35:39 -08:00
Justin Boswell f090511213 Initial Tests & CI (#5)
* Added awscrt_version() and test for it

* Added builder.json for CI

* Added github actions

* Added format-check.sh

* Force php5.6 on ubuntu

* Updated submodules
2021-01-13 13:33:30 -08:00
Justin Boswell 20309ea977 added phpize to readme build steps 2021-01-12 22:43:42 +00:00
Justin Boswell af799ffab3 Updated README (#4) 2020-11-17 15:11:34 -08:00
Justin Boswell 2934fc63fe Added CRT submodules, updated autoconf (#3)
* Added CRT submodules

* Added automake config

* Use Makefile.frag
2020-10-27 14:26:35 -07:00
Justin Boswell ee1448f560 Initial skeleton of extension (#2)
* Added .gitignore

* Added initial attempt at autoconf config

* Skeleton C source
2020-10-22 13:55:27 -07:00