- // Initialize the database handler. The two `nulls` do not specify the database name or a `CursorFactory`. The `0` specifies the database version, but that is ignored and set instead using a constant in `DomainsDatabaseHelper`.
- DomainsDatabaseHelper domainsDatabaseHelper = new DomainsDatabaseHelper(getContext(), null, null, 0);
-
- // Update the pinned SSL certificate for this domain.
- domainsDatabaseHelper.updateCertificate(MainWebViewActivity.domainSettingsDatabaseId, currentSslIssuedToCNameString, currentSslIssuedToONameString, currentSslIssuedToUNameString, currentSslIssuedByCNameString, currentSslIssuedByONameString,
- currentSslIssuedByUNameString, currentSslStartDateLong, currentSslEndDateLong);
-
- // Update the pinned SSL certificate global variables to match the information that is now in the database.
- MainWebViewActivity.pinnedDomainSslIssuedToCNameString = currentSslIssuedToCNameString;
- MainWebViewActivity.pinnedDomainSslIssuedToONameString = currentSslIssuedToONameString;
- MainWebViewActivity.pinnedDomainSslIssuedToUNameString = currentSslIssuedToUNameString;
- MainWebViewActivity.pinnedDomainSslIssuedByCNameString = currentSslIssuedByCNameString;
- MainWebViewActivity.pinnedDomainSslIssuedByONameString = currentSslIssuedByONameString;
- MainWebViewActivity.pinnedDomainSslIssuedByUNameString = currentSslIssuedByUNameString;
- MainWebViewActivity.pinnedDomainSslStartDate = currentSslStartDate;
- MainWebViewActivity.pinnedDomainSslEndDate = currentSslEndDate;