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

Expose SyncConfiguration.TrustedCAPath #1423

Merged
merged 7 commits into from Jun 7, 2017
Merged

Expose SyncConfiguration.TrustedCAPath #1423

merged 7 commits into from Jun 7, 2017

Conversation

nirinchev
Copy link
Member

@nirinchev nirinchev commented May 31, 2017

Description

Fixes #1422

Also fixes a case when client_validate_ssl wasn't respected when opening a realm with GetInstanceAsync.

TODO

  • Changelog entry
  • Tests (if applicable)
  • Update PCL (if applicable)

if (!string.IsNullOrEmpty(TrustedCAPath) &&
!File.Exists(TrustedCAPath))
{
throw new RealmFileNotFoundException($"File not found: {TrustedCAPath}");
Copy link
Contributor

Choose a reason for hiding this comment

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

Is that the proper exception here? (In fact, I am not even sure why we have an exception by that name?)

Copy link
Member Author

Choose a reason for hiding this comment

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

Well... the file's not there, the exception contains "FileNotFound", so I went with it :P Perhaps we can throw the system's FileNotFoundException?

Copy link
Contributor

Choose a reason for hiding this comment

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

Right. Well, I can't think of any reason not to use the system one, unless we for some reason want all exceptions thrown by our SDK to be Realm*-exceptions. But that just seems silly to me. As does prefixing them with Realm in general, unless they are related to something in a realm, not just in the SDK.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree - we throw a bunch of system exceptions anyway. I'll update it here, but will leave the rest of the codebase for another time ;)

@nirinchev nirinchev merged commit 4c446c6 into master Jun 7, 2017
@nirinchev nirinchev deleted the ni/ssl-root-ca branch June 7, 2017 11:04
@nirinchev nirinchev removed the S:Review label Jun 7, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for specifying trusted root CA
2 participants