what-the-bank/sources/okhttp3/repackaged/TlsVersion.java

72 lines
1.7 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package okhttp3.repackaged;
/* loaded from: classes6.dex */
public enum TlsVersion {
TLS_1_2("TLSv1.2"),
TLS_1_1("TLSv1.1"),
TLS_1_0("TLSv1"),
SSL_3_0("SSLv3");
final String javaName;
TlsVersion(String str) {
this.javaName = str;
}
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
public static TlsVersion forJavaName(String str) {
char c;
str.hashCode();
switch (str.hashCode()) {
case -503070503:
if (str.equals("TLSv1.1")) {
c = 0;
break;
}
c = 65535;
break;
case -503070502:
if (str.equals("TLSv1.2")) {
c = 1;
break;
}
c = 65535;
break;
case 79201641:
if (str.equals("SSLv3")) {
c = 2;
break;
}
c = 65535;
break;
case 79923350:
if (str.equals("TLSv1")) {
c = 3;
break;
}
c = 65535;
break;
default:
c = 65535;
break;
}
if (c == 0) {
return TLS_1_1;
}
if (c == 1) {
return TLS_1_2;
}
if (c == 2) {
return SSL_3_0;
}
if (c == 3) {
return TLS_1_0;
}
throw new IllegalArgumentException("Unexpected TLS version: ".concat(String.valueOf(str)));
}
public final String javaName() {
return this.javaName;
}
}