Skip to content

Allow providing default a SecurityContext object during initialization #74

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

Merged
merged 6 commits into from
Feb 7, 2019

Conversation

chrbayer
Copy link
Contributor

@chrbayer chrbayer commented Feb 7, 2019

Such a customize SecurityContext object allows the providing certificates for the https communication and thus allows the usage of a server which uses self-signed certificates.

This fixes issue #71.

    ByteData certificateAsBytes = await rootBundle.load('assets/example-ca.crt');
    List<int> certificates = certificateAsBytes.buffer.asUint8List();
    final SecurityContext customSecurityContext =
        SecurityContext(withTrustedRoots: true)
          ..setTrustedCertificatesBytes(certificates);
    Parse().initialize('example-org-parse', 'https://example.org/parse',
        securityContext: customSecurityContext);

@phillwiggins phillwiggins merged commit 6ba0e8a into parse-community:develop Feb 7, 2019
fischerscode pushed a commit to fischerscode/Parse-SDK-Flutter that referenced this pull request Sep 5, 2020
Allow providing default a SecurityContext object during initialization
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.

2 participants