Skip to content

Commit

Permalink
Deprecated default SSL behavior on favor of "system" name. (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
kober32 authored Sep 24, 2024
1 parent bee9a24 commit 835df14
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion library/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
# and limitations under the License.
#

VERSION_NAME=1.4.0-SNAPSHOT
VERSION_NAME=1.4.1-SNAPSHOT
GROUP_ID=com.wultra.android.powerauth
ARTIFACT_ID=powerauth-networking
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,25 @@ import okhttp3.OkHttpClient

/**
* Strategy for validating SSL certificates.
* For concrete implementation, use static methods [default], [noValidation] & [sslPinning]
* For concrete implementation, use static methods [system], [noValidation] & [sslPinning]
*/
abstract class SSLValidationStrategy {

companion object {
/**
* Default (system) certificate validation
* Default (system) certificate validation.
*/
@JvmStatic
fun default(): SSLValidationStrategy = DefaultSSLValidationStrategy()
fun system(): SSLValidationStrategy = DefaultSSLValidationStrategy()

/**
* Default (system) certificate validation.
*
* Deprecated.
*/
@JvmStatic
@Deprecated("Use 'system' instead", ReplaceWith("SSLValidationStrategy.system()"))
fun default() = system()

/**
* Disables validation of SSL certificate. Use this strategy for HTTP endpoints
Expand Down

0 comments on commit 835df14

Please sign in to comment.