Skip to content

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