.class public final Lokhttp3/Handshake$Companion; .super Ljava/lang/Object; .source "Handshake.kt" # annotations .annotation system Ldalvik/annotation/EnclosingClass; value = Lokhttp3/Handshake; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x19 name = "Companion" .end annotation .annotation system Ldalvik/annotation/SourceDebugExtension; value = "SMAP\nHandshake.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Handshake.kt\nokhttp3/Handshake$Companion\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,200:1\n1#2:201\n*E\n" .end annotation .annotation runtime Lkotlin/Metadata; bv = { 0x1, 0x0, 0x3 } d1 = { "\u0000:\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0010\u0011\n\u0002\u0008\u0002\u0008\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\u0008\u0002\u00a2\u0006\u0002\u0010\u0002J\u0015\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0006H\u0007\u00a2\u0006\u0002\u0008\u0007J4\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0008\u001a\u00020\t2\u0006\u0010\n\u001a\u00020\u000b2\u000c\u0010\u000c\u001a\u0008\u0012\u0004\u0012\u00020\u000e0\r2\u000c\u0010\u000f\u001a\u0008\u0012\u0004\u0012\u00020\u000e0\rH\u0007J\u0011\u0010\u0010\u001a\u00020\u0004*\u00020\u0006H\u0007\u00a2\u0006\u0002\u0008\u0003J!\u0010\u0011\u001a\u0008\u0012\u0004\u0012\u00020\u000e0\r*\u000c\u0012\u0006\u0008\u0001\u0012\u00020\u000e\u0018\u00010\u0012H\u0002\u00a2\u0006\u0002\u0010\u0013\u00a8\u0006\u0014" } d2 = { "Lokhttp3/Handshake$Companion;", "", "()V", "get", "Lokhttp3/Handshake;", "sslSession", "Ljavax/net/ssl/SSLSession;", "-deprecated_get", "tlsVersion", "Lokhttp3/TlsVersion;", "cipherSuite", "Lokhttp3/CipherSuite;", "peerCertificates", "", "Ljava/security/cert/Certificate;", "localCertificates", "handshake", "toImmutableList", "", "([Ljava/security/cert/Certificate;)Ljava/util/List;", "okhttp" } k = 0x1 mv = { 0x1, 0x4, 0x0 } .end annotation # direct methods .method private constructor ()V .locals 0 .line 143 invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method .method public synthetic constructor (Lkotlin/jvm/internal/DefaultConstructorMarker;)V .locals 0 .line 143 invoke-direct {p0}, Lokhttp3/Handshake$Companion;->()V return-void .end method .method private final toImmutableList([Ljava/security/cert/Certificate;)Ljava/util/List; .locals 0 .annotation system Ldalvik/annotation/Signature; value = { "([", "Ljava/security/cert/Certificate;", ")", "Ljava/util/List<", "Ljava/security/cert/Certificate;", ">;" } .end annotation if-eqz p1, :cond_0 .line 172 array-length p0, p1 invoke-static {p1, p0}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object; move-result-object p0 check-cast p0, [Ljava/security/cert/Certificate; invoke-static {p0}, Lokhttp3/internal/Util;->immutableListOf([Ljava/lang/Object;)Ljava/util/List; move-result-object p0 goto :goto_0 .line 174 :cond_0 invoke-static {}, Lkotlin/collections/CollectionsKt;->emptyList()Ljava/util/List; move-result-object p0 :goto_0 return-object p0 .end method # virtual methods .method public final -deprecated_get(Ljavax/net/ssl/SSLSession;)Lokhttp3/Handshake; .locals 1 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .annotation runtime Lkotlin/Deprecated; level = .enum Lkotlin/DeprecationLevel;->ERROR:Lkotlin/DeprecationLevel; message = "moved to extension function" replaceWith = .subannotation Lkotlin/ReplaceWith; expression = "sslSession.handshake()" imports = {} .end subannotation .end annotation const-string v0, "sslSession" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 184 move-object v0, p0 check-cast v0, Lokhttp3/Handshake$Companion; invoke-virtual {p0, p1}, Lokhttp3/Handshake$Companion;->get(Ljavax/net/ssl/SSLSession;)Lokhttp3/Handshake; move-result-object p0 return-object p0 .end method .method public final get(Ljavax/net/ssl/SSLSession;)Lokhttp3/Handshake; .locals 5 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .annotation runtime Lkotlin/jvm/JvmStatic; .end annotation const-string v0, "$this$handshake" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 148 invoke-interface {p1}, Ljavax/net/ssl/SSLSession;->getCipherSuite()Ljava/lang/String; move-result-object v0 if-eqz v0, :cond_5 .line 149 invoke-virtual {v0}, Ljava/lang/String;->hashCode()I move-result v1 const v2, 0x3cc2e15a if-eq v1, v2, :cond_1 const v2, 0x480aabeb # 141999.67f if-eq v1, v2, :cond_0 goto :goto_0 :cond_0 const-string v1, "SSL_NULL_WITH_NULL_NULL" .line 150 invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v1 if-nez v1, :cond_4 goto :goto_0 :cond_1 const-string v1, "TLS_NULL_WITH_NULL_NULL" invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v1 if-nez v1, :cond_4 .line 153 :goto_0 sget-object v1, Lokhttp3/CipherSuite;->Companion:Lokhttp3/CipherSuite$Companion; invoke-virtual {v1, v0}, Lokhttp3/CipherSuite$Companion;->forJavaName(Ljava/lang/String;)Lokhttp3/CipherSuite; move-result-object v0 .line 156 invoke-interface {p1}, Ljavax/net/ssl/SSLSession;->getProtocol()Ljava/lang/String; move-result-object v1 if-eqz v1, :cond_3 const-string v2, "NONE" .line 157 invoke-static {v2, v1}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result v2 if-nez v2, :cond_2 .line 158 sget-object v2, Lokhttp3/TlsVersion;->Companion:Lokhttp3/TlsVersion$Companion; invoke-virtual {v2, v1}, Lokhttp3/TlsVersion$Companion;->forJavaName(Ljava/lang/String;)Lokhttp3/TlsVersion; move-result-object v1 .line 161 :try_start_0 move-object v2, p0 check-cast v2, Lokhttp3/Handshake$Companion; invoke-interface {p1}, Ljavax/net/ssl/SSLSession;->getPeerCertificates()[Ljava/security/cert/Certificate; move-result-object v2 invoke-direct {p0, v2}, Lokhttp3/Handshake$Companion;->toImmutableList([Ljava/security/cert/Certificate;)Ljava/util/List; move-result-object v2 :try_end_0 .catch Ljavax/net/ssl/SSLPeerUnverifiedException; {:try_start_0 .. :try_end_0} :catch_0 goto :goto_1 .line 163 :catch_0 invoke-static {}, Lkotlin/collections/CollectionsKt;->emptyList()Ljava/util/List; move-result-object v2 .line 166 :goto_1 new-instance v3, Lokhttp3/Handshake; .line 167 move-object v4, p0 check-cast v4, Lokhttp3/Handshake$Companion; invoke-interface {p1}, Ljavax/net/ssl/SSLSession;->getLocalCertificates()[Ljava/security/cert/Certificate; move-result-object p1 invoke-direct {p0, p1}, Lokhttp3/Handshake$Companion;->toImmutableList([Ljava/security/cert/Certificate;)Ljava/util/List; move-result-object p0 new-instance p1, Lokhttp3/Handshake$Companion$handshake$1; invoke-direct {p1, v2}, Lokhttp3/Handshake$Companion$handshake$1;->(Ljava/util/List;)V check-cast p1, Lkotlin/jvm/functions/Function0; .line 166 invoke-direct {v3, v1, v0, p0, p1}, Lokhttp3/Handshake;->(Lokhttp3/TlsVersion;Lokhttp3/CipherSuite;Ljava/util/List;Lkotlin/jvm/functions/Function0;)V return-object v3 .line 157 :cond_2 new-instance p0, Ljava/io/IOException; const-string p1, "tlsVersion == NONE" invoke-direct {p0, p1}, Ljava/io/IOException;->(Ljava/lang/String;)V check-cast p0, Ljava/lang/Throwable; throw p0 .line 156 :cond_3 new-instance p0, Ljava/lang/IllegalStateException; const-string p1, "tlsVersion == null" invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String; move-result-object p1 invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V check-cast p0, Ljava/lang/Throwable; throw p0 .line 151 :cond_4 new-instance p0, Ljava/io/IOException; new-instance p1, Ljava/lang/StringBuilder; const-string v1, "cipherSuite == " invoke-direct {p1, v1}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p1 invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 invoke-direct {p0, p1}, Ljava/io/IOException;->(Ljava/lang/String;)V check-cast p0, Ljava/lang/Throwable; throw p0 .line 148 :cond_5 new-instance p0, Ljava/lang/IllegalStateException; const-string p1, "cipherSuite == null" invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String; move-result-object p1 invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V check-cast p0, Ljava/lang/Throwable; throw p0 .end method .method public final get(Lokhttp3/TlsVersion;Lokhttp3/CipherSuite;Ljava/util/List;Ljava/util/List;)Lokhttp3/Handshake; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lokhttp3/TlsVersion;", "Lokhttp3/CipherSuite;", "Ljava/util/List<", "+", "Ljava/security/cert/Certificate;", ">;", "Ljava/util/List<", "+", "Ljava/security/cert/Certificate;", ">;)", "Lokhttp3/Handshake;" } .end annotation .annotation runtime Lkotlin/jvm/JvmStatic; .end annotation const-string p0, "tlsVersion" invoke-static {p1, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string p0, "cipherSuite" invoke-static {p2, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string p0, "peerCertificates" invoke-static {p3, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string p0, "localCertificates" invoke-static {p4, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 193 invoke-static {p3}, Lokhttp3/internal/Util;->toImmutableList(Ljava/util/List;)Ljava/util/List; move-result-object p0 .line 194 new-instance p3, Lokhttp3/Handshake; invoke-static {p4}, Lokhttp3/internal/Util;->toImmutableList(Ljava/util/List;)Ljava/util/List; move-result-object p4 new-instance v0, Lokhttp3/Handshake$Companion$get$1; invoke-direct {v0, p0}, Lokhttp3/Handshake$Companion$get$1;->(Ljava/util/List;)V check-cast v0, Lkotlin/jvm/functions/Function0; invoke-direct {p3, p1, p2, p4, v0}, Lokhttp3/Handshake;->(Lokhttp3/TlsVersion;Lokhttp3/CipherSuite;Ljava/util/List;Lkotlin/jvm/functions/Function0;)V return-object p3 .end method