123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431 |
- .class public final Lokhttp3/Handshake;
- .super Ljava/lang/Object;
- .source ""
- # instance fields
- .field private final cipherSuite:Lokhttp3/CipherSuite;
- .field private final localCertificates:Ljava/util/List;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Ljava/util/List<",
- "Ljava/security/cert/Certificate;",
- ">;"
- }
- .end annotation
- .end field
- .field private final peerCertificates:Ljava/util/List;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Ljava/util/List<",
- "Ljava/security/cert/Certificate;",
- ">;"
- }
- .end annotation
- .end field
- .field private final tlsVersion:Lokhttp3/TlsVersion;
- # direct methods
- .method private constructor <init>(Lokhttp3/TlsVersion;Lokhttp3/CipherSuite;Ljava/util/List;Ljava/util/List;)V
- .locals 0
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Lokhttp3/TlsVersion;",
- "Lokhttp3/CipherSuite;",
- "Ljava/util/List<",
- "Ljava/security/cert/Certificate;",
- ">;",
- "Ljava/util/List<",
- "Ljava/security/cert/Certificate;",
- ">;)V"
- }
- .end annotation
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- iput-object p1, p0, Lokhttp3/Handshake;->tlsVersion:Lokhttp3/TlsVersion;
- iput-object p2, p0, Lokhttp3/Handshake;->cipherSuite:Lokhttp3/CipherSuite;
- iput-object p3, p0, Lokhttp3/Handshake;->peerCertificates:Ljava/util/List;
- iput-object p4, p0, Lokhttp3/Handshake;->localCertificates:Ljava/util/List;
- return-void
- .end method
- .method public static get(Ljavax/net/ssl/SSLSession;)Lokhttp3/Handshake;
- .locals 4
- invoke-interface {p0}, Ljavax/net/ssl/SSLSession;->getCipherSuite()Ljava/lang/String;
- move-result-object v0
- if-eqz v0, :cond_3
- invoke-static {v0}, Lokhttp3/CipherSuite;->forJavaName(Ljava/lang/String;)Lokhttp3/CipherSuite;
- move-result-object v0
- invoke-interface {p0}, Ljavax/net/ssl/SSLSession;->getProtocol()Ljava/lang/String;
- move-result-object v1
- if-eqz v1, :cond_2
- invoke-static {v1}, Lokhttp3/TlsVersion;->forJavaName(Ljava/lang/String;)Lokhttp3/TlsVersion;
- move-result-object v1
- :try_start_0
- invoke-interface {p0}, Ljavax/net/ssl/SSLSession;->getPeerCertificates()[Ljava/security/cert/Certificate;
- move-result-object v2
- :try_end_0
- .catch Ljavax/net/ssl/SSLPeerUnverifiedException; {:try_start_0 .. :try_end_0} :catch_0
- goto :goto_0
- :catch_0
- const/4 v2, 0x0
- :goto_0
- if-eqz v2, :cond_0
- invoke-static {v2}, Lokhttp3/internal/Util;->immutableList([Ljava/lang/Object;)Ljava/util/List;
- move-result-object v2
- goto :goto_1
- :cond_0
- invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List;
- move-result-object v2
- :goto_1
- invoke-interface {p0}, Ljavax/net/ssl/SSLSession;->getLocalCertificates()[Ljava/security/cert/Certificate;
- move-result-object p0
- if-eqz p0, :cond_1
- invoke-static {p0}, Lokhttp3/internal/Util;->immutableList([Ljava/lang/Object;)Ljava/util/List;
- move-result-object p0
- goto :goto_2
- :cond_1
- invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List;
- move-result-object p0
- :goto_2
- new-instance v3, Lokhttp3/Handshake;
- invoke-direct {v3, v1, v0, v2, p0}, Lokhttp3/Handshake;-><init>(Lokhttp3/TlsVersion;Lokhttp3/CipherSuite;Ljava/util/List;Ljava/util/List;)V
- return-object v3
- :cond_2
- new-instance p0, Ljava/lang/IllegalStateException;
- const-string v0, "tlsVersion == null"
- invoke-direct {p0, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- throw p0
- :cond_3
- new-instance p0, Ljava/lang/IllegalStateException;
- const-string v0, "cipherSuite == null"
- invoke-direct {p0, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- throw p0
- .end method
- .method public static 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
- if-eqz p0, :cond_1
- if-eqz p1, :cond_0
- new-instance v0, Lokhttp3/Handshake;
- invoke-static {p2}, Lokhttp3/internal/Util;->immutableList(Ljava/util/List;)Ljava/util/List;
- move-result-object p2
- invoke-static {p3}, Lokhttp3/internal/Util;->immutableList(Ljava/util/List;)Ljava/util/List;
- move-result-object p3
- invoke-direct {v0, p0, p1, p2, p3}, Lokhttp3/Handshake;-><init>(Lokhttp3/TlsVersion;Lokhttp3/CipherSuite;Ljava/util/List;Ljava/util/List;)V
- return-object v0
- :cond_0
- new-instance p0, Ljava/lang/NullPointerException;
- const-string p1, "cipherSuite == null"
- invoke-direct {p0, p1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
- throw p0
- :cond_1
- new-instance p0, Ljava/lang/NullPointerException;
- const-string p1, "tlsVersion == null"
- invoke-direct {p0, p1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
- throw p0
- .end method
- # virtual methods
- .method public cipherSuite()Lokhttp3/CipherSuite;
- .locals 1
- iget-object v0, p0, Lokhttp3/Handshake;->cipherSuite:Lokhttp3/CipherSuite;
- return-object v0
- .end method
- .method public equals(Ljava/lang/Object;)Z
- .locals 3
- instance-of v0, p1, Lokhttp3/Handshake;
- const/4 v1, 0x0
- if-nez v0, :cond_0
- return v1
- :cond_0
- check-cast p1, Lokhttp3/Handshake;
- iget-object v0, p0, Lokhttp3/Handshake;->tlsVersion:Lokhttp3/TlsVersion;
- iget-object v2, p1, Lokhttp3/Handshake;->tlsVersion:Lokhttp3/TlsVersion;
- invoke-virtual {v0, v2}, Ljava/lang/Enum;->equals(Ljava/lang/Object;)Z
- move-result v0
- if-eqz v0, :cond_1
- iget-object v0, p0, Lokhttp3/Handshake;->cipherSuite:Lokhttp3/CipherSuite;
- iget-object v2, p1, Lokhttp3/Handshake;->cipherSuite:Lokhttp3/CipherSuite;
- invoke-virtual {v0, v2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
- move-result v0
- if-eqz v0, :cond_1
- iget-object v0, p0, Lokhttp3/Handshake;->peerCertificates:Ljava/util/List;
- iget-object v2, p1, Lokhttp3/Handshake;->peerCertificates:Ljava/util/List;
- invoke-interface {v0, v2}, Ljava/util/List;->equals(Ljava/lang/Object;)Z
- move-result v0
- if-eqz v0, :cond_1
- iget-object v0, p0, Lokhttp3/Handshake;->localCertificates:Ljava/util/List;
- iget-object p1, p1, Lokhttp3/Handshake;->localCertificates:Ljava/util/List;
- invoke-interface {v0, p1}, Ljava/util/List;->equals(Ljava/lang/Object;)Z
- move-result p1
- if-eqz p1, :cond_1
- const/4 v1, 0x1
- :cond_1
- return v1
- .end method
- .method public hashCode()I
- .locals 2
- iget-object v0, p0, Lokhttp3/Handshake;->tlsVersion:Lokhttp3/TlsVersion;
- invoke-virtual {v0}, Ljava/lang/Enum;->hashCode()I
- move-result v0
- const/16 v1, 0x20f
- add-int/2addr v1, v0
- mul-int/lit8 v1, v1, 0x1f
- iget-object v0, p0, Lokhttp3/Handshake;->cipherSuite:Lokhttp3/CipherSuite;
- invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I
- move-result v0
- add-int/2addr v1, v0
- mul-int/lit8 v1, v1, 0x1f
- iget-object v0, p0, Lokhttp3/Handshake;->peerCertificates:Ljava/util/List;
- invoke-interface {v0}, Ljava/util/List;->hashCode()I
- move-result v0
- add-int/2addr v1, v0
- mul-int/lit8 v1, v1, 0x1f
- iget-object v0, p0, Lokhttp3/Handshake;->localCertificates:Ljava/util/List;
- invoke-interface {v0}, Ljava/util/List;->hashCode()I
- move-result v0
- add-int/2addr v1, v0
- return v1
- .end method
- .method public localCertificates()Ljava/util/List;
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "()",
- "Ljava/util/List<",
- "Ljava/security/cert/Certificate;",
- ">;"
- }
- .end annotation
- iget-object v0, p0, Lokhttp3/Handshake;->localCertificates:Ljava/util/List;
- return-object v0
- .end method
- .method public localPrincipal()Ljava/security/Principal;
- .locals 2
- iget-object v0, p0, Lokhttp3/Handshake;->localCertificates:Ljava/util/List;
- invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
- move-result v0
- if-nez v0, :cond_0
- iget-object v0, p0, Lokhttp3/Handshake;->localCertificates:Ljava/util/List;
- const/4 v1, 0x0
- invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object v0
- check-cast v0, Ljava/security/cert/X509Certificate;
- invoke-virtual {v0}, Ljava/security/cert/X509Certificate;->getSubjectX500Principal()Ljavax/security/auth/x500/X500Principal;
- move-result-object v0
- goto :goto_0
- :cond_0
- const/4 v0, 0x0
- :goto_0
- return-object v0
- .end method
- .method public peerCertificates()Ljava/util/List;
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "()",
- "Ljava/util/List<",
- "Ljava/security/cert/Certificate;",
- ">;"
- }
- .end annotation
- iget-object v0, p0, Lokhttp3/Handshake;->peerCertificates:Ljava/util/List;
- return-object v0
- .end method
- .method public peerPrincipal()Ljava/security/Principal;
- .locals 2
- iget-object v0, p0, Lokhttp3/Handshake;->peerCertificates:Ljava/util/List;
- invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
- move-result v0
- if-nez v0, :cond_0
- iget-object v0, p0, Lokhttp3/Handshake;->peerCertificates:Ljava/util/List;
- const/4 v1, 0x0
- invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object v0
- check-cast v0, Ljava/security/cert/X509Certificate;
- invoke-virtual {v0}, Ljava/security/cert/X509Certificate;->getSubjectX500Principal()Ljavax/security/auth/x500/X500Principal;
- move-result-object v0
- goto :goto_0
- :cond_0
- const/4 v0, 0x0
- :goto_0
- return-object v0
- .end method
- .method public tlsVersion()Lokhttp3/TlsVersion;
- .locals 1
- iget-object v0, p0, Lokhttp3/Handshake;->tlsVersion:Lokhttp3/TlsVersion;
- return-object v0
- .end method
|