Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Greengrass local auth demo #1831

Merged
merged 10 commits into from
Nov 22, 2022
Merged

Greengrass local auth demo #1831

merged 10 commits into from
Nov 22, 2022

Conversation

archigup
Copy link
Member

This PR adds a demo for connecting a device to a Greengrass core using the new feature that allows using custom CAs.

For more info on the feature, see:
https://docs.aws.amazon.com/greengrass/v2/developerguide/greengrass-release-2022-11-15.html

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@archigup archigup requested a review from a team as a code owner November 21, 2022 23:10
Comment on lines +526 to +537
sslStatus = ( int32_t ) SSL_set_tlsext_host_name(
pSsl, pOpensslCredentials->sniHostName );

if( sslStatus != 1 )
{
LogError( ( "Failed to set server name %s for SNI.",
pOpensslCredentials->sniHostName ) );
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that we had to split platform/posix/transport/src/openssl_posix.c into this file to get around the unit tests preventing modifications that would allow the separate hostname standards. After this PR is merged, the openssl_posix.c unit tests should be removed or modified to allow openssl_posix.c to support both hostname standards.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have plans to remove those; once those are removed, we can merge my other PR on this repo, and then the extra copy will no longer be needed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After this demo is merged, I can rebase/fixup the other PR which will de-duplicate them

@archigup archigup force-pushed the greengrass_byoca branch 2 times, most recently from d0691e1 to 8bf52f7 Compare November 21, 2022 23:47
paulbartell
paulbartell previously approved these changes Nov 22, 2022
kstribrnAmzn
kstribrnAmzn previously approved these changes Nov 22, 2022
* in eventCallback to reflect the status of the SUBACK sent by the broker. */
if( ( returnStatus == EXIT_SUCCESS ) && ( globalSubAckStatus == MQTTSubAckFailure ) )
{
LogInfo( ( "Server rejected subscription request." ) );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Should this be WARN level?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, probably; it was Info, since other demos have it info

platform/posix/CMakeLists.txt Show resolved Hide resolved
@kstribrnAmzn kstribrnAmzn merged commit b534183 into aws:main Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants