diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..090a1f02d --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea +.DS_Store diff --git a/aws-common-runtime/CMakeLists.txt b/aws-common-runtime/CMakeLists.txt index 83ec8b224..4ce629cf4 100644 --- a/aws-common-runtime/CMakeLists.txt +++ b/aws-common-runtime/CMakeLists.txt @@ -17,7 +17,7 @@ set(AWS_DEPS_DOWNLOAD_DIR "${AWS_DEPS_BUILD_DIR}/downloads" CACHE PATH "Dependen message("install dir ${AWS_DEPS_INSTALL_DIR}") set(AWS_C_COMMON_URL "https://github.com/awslabs/aws-c-common.git") -set(AWS_C_COMMON_SHA "v0.3.2") +set(AWS_C_COMMON_SHA "v0.3.4") include(BuildAwsCCommon) if (UNIX AND NOT APPLE) @@ -27,11 +27,11 @@ if (UNIX AND NOT APPLE) endif() set(AWS_C_IO_URL "https://github.com/awslabs/aws-c-io.git") -set(AWS_C_IO_SHA "v0.2.2") +set(AWS_C_IO_SHA "v0.2.3") include(BuildAwsCIO) set(AWS_C_MQTT_URL "https://github.com/awslabs/aws-c-mqtt.git") -set(AWS_C_MQTT_SHA "v0.2.1") +set(AWS_C_MQTT_SHA "v0.2.2") include(BuildAwsCMqtt) set(AWS_C_CAL_URL "https://github.com/awslabs/aws-c-cal.git") diff --git a/source/io/TlsOptions.cpp b/source/io/TlsOptions.cpp index c3e02639c..650caf344 100644 --- a/source/io/TlsOptions.cpp +++ b/source/io/TlsOptions.cpp @@ -27,25 +27,28 @@ namespace Aws TlsContextOptions TlsContextOptions::InitDefaultClient() noexcept { TlsContextOptions ctxOptions; - aws_tls_ctx_options_init_default_client(&ctxOptions.m_options); + aws_tls_ctx_options_init_default_client(&ctxOptions.m_options, g_allocator); return ctxOptions; } TlsContextOptions TlsContextOptions::InitClientWithMtls(const char *certPath, const char *pKeyPath) noexcept { TlsContextOptions ctxOptions; - aws_tls_ctx_options_init_client_mtls(&ctxOptions.m_options, certPath, pKeyPath); + aws_tls_ctx_options_init_client_mtls_from_path(&ctxOptions.m_options, g_allocator, certPath, pKeyPath); return ctxOptions; } - +#ifdef __APPLE__ TlsContextOptions TlsContextOptions::InitClientWithMtlsPkcs12( const char *pkcs12Path, const char *pkcs12Pwd) noexcept { TlsContextOptions ctxOptions; - aws_tls_ctx_options_init_client_mtls_pkcs12(&ctxOptions.m_options, pkcs12Path, pkcs12Pwd); + struct aws_byte_cursor password = aws_byte_cursor_from_c_str(pkcs12Pwd); + aws_tls_ctx_options_init_client_mtls_pkcs12_from_path( + &ctxOptions.m_options, g_allocator, pkcs12Path, &password); return ctxOptions; } +#endif bool TlsContextOptions::IsAlpnSupported() noexcept { return aws_tls_is_alpn_available(); } @@ -61,7 +64,7 @@ namespace Aws void TlsContextOptions::OverrideDefaultTrustStore(const char *caPath, const char *caFile) noexcept { - aws_tls_ctx_options_override_default_trust_store(&m_options, caPath, caFile); + aws_tls_ctx_options_override_default_trust_store_from_path(&m_options, caPath, caFile); } void InitTlsStaticState(Aws::Crt::Allocator *alloc) noexcept { aws_tls_init_static_state(alloc); }