AndroidPlatform$AndroidCertificateChainCleaner.smali 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. .class final Lokhttp3/internal/platform/AndroidPlatform$AndroidCertificateChainCleaner;
  2. .super Lokhttp3/internal/tls/CertificateChainCleaner;
  3. .source ""
  4. # annotations
  5. .annotation system Ldalvik/annotation/EnclosingClass;
  6. value = Lokhttp3/internal/platform/AndroidPlatform;
  7. .end annotation
  8. .annotation system Ldalvik/annotation/InnerClass;
  9. accessFlags = 0x18
  10. name = "AndroidCertificateChainCleaner"
  11. .end annotation
  12. # instance fields
  13. .field private final checkServerTrusted:Ljava/lang/reflect/Method;
  14. .field private final x509TrustManagerExtensions:Ljava/lang/Object;
  15. # direct methods
  16. .method constructor <init>(Ljava/lang/Object;Ljava/lang/reflect/Method;)V
  17. .locals 0
  18. invoke-direct {p0}, Lokhttp3/internal/tls/CertificateChainCleaner;-><init>()V
  19. iput-object p1, p0, Lokhttp3/internal/platform/AndroidPlatform$AndroidCertificateChainCleaner;->x509TrustManagerExtensions:Ljava/lang/Object;
  20. iput-object p2, p0, Lokhttp3/internal/platform/AndroidPlatform$AndroidCertificateChainCleaner;->checkServerTrusted:Ljava/lang/reflect/Method;
  21. return-void
  22. .end method
  23. # virtual methods
  24. .method public clean(Ljava/util/List;Ljava/lang/String;)Ljava/util/List;
  25. .locals 4
  26. .annotation system Ldalvik/annotation/Signature;
  27. value = {
  28. "(",
  29. "Ljava/util/List<",
  30. "Ljava/security/cert/Certificate;",
  31. ">;",
  32. "Ljava/lang/String;",
  33. ")",
  34. "Ljava/util/List<",
  35. "Ljava/security/cert/Certificate;",
  36. ">;"
  37. }
  38. .end annotation
  39. .annotation system Ldalvik/annotation/Throws;
  40. value = {
  41. Ljavax/net/ssl/SSLPeerUnverifiedException;
  42. }
  43. .end annotation
  44. :try_start_0
  45. invoke-interface {p1}, Ljava/util/List;->size()I
  46. move-result v0
  47. new-array v0, v0, [Ljava/security/cert/X509Certificate;
  48. invoke-interface {p1, v0}, Ljava/util/List;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
  49. move-result-object p1
  50. check-cast p1, [Ljava/security/cert/X509Certificate;
  51. iget-object v0, p0, Lokhttp3/internal/platform/AndroidPlatform$AndroidCertificateChainCleaner;->checkServerTrusted:Ljava/lang/reflect/Method;
  52. iget-object v1, p0, Lokhttp3/internal/platform/AndroidPlatform$AndroidCertificateChainCleaner;->x509TrustManagerExtensions:Ljava/lang/Object;
  53. const/4 v2, 0x3
  54. new-array v2, v2, [Ljava/lang/Object;
  55. const/4 v3, 0x0
  56. aput-object p1, v2, v3
  57. const/4 p1, 0x1
  58. const-string v3, "RSA"
  59. aput-object v3, v2, p1
  60. const/4 p1, 0x2
  61. aput-object p2, v2, p1
  62. invoke-virtual {v0, v1, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
  63. move-result-object p1
  64. check-cast p1, Ljava/util/List;
  65. :try_end_0
  66. .catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_1
  67. .catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0
  68. return-object p1
  69. :catch_0
  70. move-exception p1
  71. new-instance p2, Ljava/lang/AssertionError;
  72. invoke-direct {p2, p1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
  73. throw p2
  74. :catch_1
  75. move-exception p1
  76. new-instance p2, Ljavax/net/ssl/SSLPeerUnverifiedException;
  77. invoke-virtual {p1}, Ljava/lang/reflect/InvocationTargetException;->getMessage()Ljava/lang/String;
  78. move-result-object v0
  79. invoke-direct {p2, v0}, Ljavax/net/ssl/SSLPeerUnverifiedException;-><init>(Ljava/lang/String;)V
  80. invoke-virtual {p2, p1}, Ljavax/net/ssl/SSLPeerUnverifiedException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
  81. throw p2
  82. .end method
  83. .method public equals(Ljava/lang/Object;)Z
  84. .locals 0
  85. instance-of p1, p1, Lokhttp3/internal/platform/AndroidPlatform$AndroidCertificateChainCleaner;
  86. return p1
  87. .end method
  88. .method public hashCode()I
  89. .locals 1
  90. const/4 v0, 0x0
  91. return v0
  92. .end method