include::../description.adoc[]

== Noncompliant Code Example

``++javax.net.ssl.SSLContext++`` library:

----
val sc: SSLContext = SSLContext.getInstance("TLSv1.1") // Noncompliant
----

https://square.github.io/okhttp/[okhttp] library:

----
val spec: ConnectionSpec = ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
                .tlsVersions(TlsVersion.TLS_1_1)  // Noncompliant
                .build()
----

== Compliant Solution

``++javax.net.ssl.SSLContext++`` library:

----
val sc: SSLContext = SSLContext.getInstance("TLSv1.2") // Compliant
----

https://square.github.io/okhttp/[okhttp] library:

----
val spec: ConnectionSpec = ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
                .tlsVersions(TlsVersion.TLS_1_2)  // Compliant
                .build()
----

include::../see.adoc[]

ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

include::../message.adoc[]

include::../highlighting.adoc[]

'''
== Comments And Links
(visible only on this page)

include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]
