Skip to content

Commit

Permalink
Use default context rather than creating a new one
Browse files Browse the repository at this point in the history
  • Loading branch information
nirinchev committed Nov 14, 2023
1 parent 581ceae commit ee35381
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Dfvp7OOGAN6dEOM4+qR9sdjoSYKEBpsr6GtPAQw4dy753ec5
-----END CERTIFICATE-----''';

try {
final context = SecurityContext(withTrustedRoots: true);
final context = SecurityContext.defaultContext;
context.setTrustedCertificatesBytes(const AsciiEncoder().convert(isrgRootX1CertPEM));
return HttpClient(context: context);
} on TlsException catch (e) {
Expand Down

0 comments on commit ee35381

Please sign in to comment.