Skip to content

Commit

Permalink
remove some platform specific build items
Browse files Browse the repository at this point in the history
  • Loading branch information
sbSteveK committed Sep 23, 2024
1 parent 6beed13 commit 2ad7f1d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 25 deletions.
2 changes: 2 additions & 0 deletions include/aws/io/private/dispatch_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* SPDX-License-Identifier: Apache-2.0.
*/

#include <dispatch/dispatch.h>

struct dispatch_scheduling_state {
// Let's us skip processing an iteration task if one is already in the middle
// of executing
Expand Down
13 changes: 0 additions & 13 deletions include/aws/io/private/pki_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ AWS_IO_API const char *aws_determine_default_pki_dir(void);
AWS_IO_API const char *aws_determine_default_pki_ca_file(void);

#ifdef AWS_OS_APPLE
// DEBUG WIP Open up this API to iOS and return platform not supported errors
# if !defined(AWS_OS_IOS)
/**
* Imports a PEM armored PKCS#7 public/private key pair
* into identity for use with SecurityFramework.
Expand All @@ -44,7 +42,6 @@ int aws_import_public_and_private_keys_to_identity(
const struct aws_byte_cursor *private_key,
CFArrayRef *identity,
const struct aws_string *keychain_path);
# endif /* !AWS_OS_IOS */

/**
* Imports a PEM armored PKCS#7 public/private key pair
Expand Down Expand Up @@ -90,16 +87,6 @@ int aws_import_trusted_certificates(
const struct aws_byte_cursor *certificates_blob,
CFArrayRef *certs);

/**
* Releases identity (the output of the aws_import_* functions).
*/
void aws_release_identity(CFArrayRef identity);

/**
* releases the output of aws_import_trusted_certificates.
*/
void aws_release_certificates(CFArrayRef certs);

#endif /* AWS_OS_APPLE */

#ifdef _WIN32
Expand Down
12 changes: 3 additions & 9 deletions include/aws/io/tls_channel_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ struct aws_tls_connection_options {
*/
struct aws_tls_key_operation;

#ifdef __APPLE__

/**
* A struct containing parameters used during import of Certificate and Private Key into a
* data protection keychain using Apple's SecItem API.
Expand All @@ -168,8 +166,6 @@ struct aws_secitem_options {
struct aws_string *key_label;
};

#endif /* __APPLE__ */

struct aws_tls_ctx_options {
struct aws_allocator *allocator;

Expand Down Expand Up @@ -238,20 +234,18 @@ struct aws_tls_ctx_options {
*/
struct aws_byte_buf pkcs12_password;

/**
/**
* When adding items to the keychain, SecItem allows the setting of attributes
* that control various options and settings related to access of the items. This
* struct contains the various attributes we currently support.
*/
struct aws_secitem_options *secitem_options;

# if !defined(AWS_OS_IOS)
/**
* On Apple OS you can also use a custom keychain instead of
* the default keychain of the account.
* On MacOS you can also use a custom keychain instead of
* the default keychain of the account. This is NOT supported on iOS.
*/
struct aws_string *keychain_path;
# endif /* !AWS_OS_IOS */

#endif /* __APPLE__ */

Expand Down
3 changes: 0 additions & 3 deletions source/tls_channel_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ void aws_tls_ctx_options_clean_up(struct aws_tls_ctx_options *options) {
aws_string_destroy(options->secitem_options->cert_label);
aws_string_destroy(options->secitem_options->key_label);
aws_mem_release(options->allocator, options->secitem_options);

# if !defined(AWS_OS_IOS)
aws_string_destroy(options->keychain_path);
# endif /* !AWS_OS_IOS */

#endif /* __APPLE__ */

Expand Down

0 comments on commit 2ad7f1d

Please sign in to comment.