To use SSL certificates in your project, follow these steps:
- Place the required certificate files in the
assets/certificatesdirectory. - If using PKCS12 certificates, add the corresponding passwords in
assets/certificates/credentials.json. The JSON structure should use the file name as the key and the password as the value. - Run
flutter_genorbuild_runnerto generate the necessary code.
The SSL certificates are used to establish secure connections in your application. The system will automatically detect and load available certificates from the designated directory. If certificates require passwords, they will be retrieved from the credentials file.
Once the certificates are in place, they will be used to configure a secure environment for making network requests. The application will handle certificate validation and apply them to establish secure HTTP or WebSocket connections.
The implementation supports both mobile and web environments. The application will determine the appropriate configuration based on the runtime platform, ensuring that the correct security settings are applied.
- Ensure that certificates are up to date and correctly configured to prevent security vulnerabilities.
- Do not expose sensitive credential information in source control.
- Regularly review and update certificate files as needed to maintain security compliance.
By following these guidelines, you can ensure a secure and reliable implementation of SSL certificates in your application.