Skip to content

Commit

Permalink
apiDump
Browse files Browse the repository at this point in the history
  • Loading branch information
ean5533 committed May 14, 2024
1 parent d1f862e commit 37f5924
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
6 changes: 3 additions & 3 deletions mockwebserver-deprecated/api/mockwebserver.api
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public final class okhttp3/mockwebserver/MockWebServer : org/junit/rules/Externa
public final fun -deprecated_protocols ()Ljava/util/List;
public final fun -deprecated_protocols (Ljava/util/List;)V
public final fun -deprecated_requestCount ()I
public final fun -deprecated_serverSocketFactory (Ljavax/net/ServerSocketFactory;)V
public final fun -deprecated_serverSocketFactory (Lokhttp3/internal/socket/OkioServerSocketFactory;)V
public fun <init> ()V
public fun close ()V
public final fun enqueue (Lokhttp3/mockwebserver/MockResponse;)V
Expand All @@ -80,7 +80,7 @@ public final class okhttp3/mockwebserver/MockWebServer : org/junit/rules/Externa
public final fun getPort ()I
public final fun getProtocolNegotiationEnabled ()Z
public final fun getRequestCount ()I
public final fun getServerSocketFactory ()Ljavax/net/ServerSocketFactory;
public final fun getServerSocketFactory ()Lokhttp3/internal/socket/OkioServerSocketFactory;
public final fun noClientAuth ()V
public final fun protocols ()Ljava/util/List;
public final fun requestClientAuth ()V
Expand All @@ -89,7 +89,7 @@ public final class okhttp3/mockwebserver/MockWebServer : org/junit/rules/Externa
public final fun setDispatcher (Lokhttp3/mockwebserver/Dispatcher;)V
public final fun setProtocolNegotiationEnabled (Z)V
public final fun setProtocols (Ljava/util/List;)V
public final fun setServerSocketFactory (Ljavax/net/ServerSocketFactory;)V
public final fun setServerSocketFactory (Lokhttp3/internal/socket/OkioServerSocketFactory;)V
public final fun shutdown ()V
public final fun start ()V
public final fun start (I)V
Expand Down
8 changes: 4 additions & 4 deletions mockwebserver/api/mockwebserver3.api
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public final class mockwebserver3/MockWebServer : java/io/Closeable {
public final fun getProtocolNegotiationEnabled ()Z
public final fun getProtocols ()Ljava/util/List;
public final fun getRequestCount ()I
public final fun getServerSocketFactory ()Ljavax/net/ServerSocketFactory;
public final fun getServerSocketFactory ()Lokhttp3/internal/socket/OkioServerSocketFactory;
public final fun getStarted ()Z
public final fun noClientAuth ()V
public final fun requestClientAuth ()V
Expand All @@ -116,7 +116,7 @@ public final class mockwebserver3/MockWebServer : java/io/Closeable {
public final fun setDispatcher (Lmockwebserver3/Dispatcher;)V
public final fun setProtocolNegotiationEnabled (Z)V
public final fun setProtocols (Ljava/util/List;)V
public final fun setServerSocketFactory (Ljavax/net/ServerSocketFactory;)V
public final fun setServerSocketFactory (Lokhttp3/internal/socket/OkioServerSocketFactory;)V
public final fun setStarted (Z)V
public final fun shutdown ()V
public final fun start ()V
Expand Down Expand Up @@ -159,8 +159,8 @@ public final class mockwebserver3/QueueDispatcher$Companion {
}

public final class mockwebserver3/RecordedRequest {
public fun <init> (Ljava/lang/String;Lokhttp3/Headers;Ljava/util/List;JLokio/Buffer;ILjava/net/Socket;Ljava/io/IOException;)V
public synthetic fun <init> (Ljava/lang/String;Lokhttp3/Headers;Ljava/util/List;JLokio/Buffer;ILjava/net/Socket;Ljava/io/IOException;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun <init> (Ljava/lang/String;Lokhttp3/Headers;Ljava/util/List;JLokio/Buffer;ILokhttp3/internal/socket/OkioSocket;Ljava/io/IOException;)V
public synthetic fun <init> (Ljava/lang/String;Lokhttp3/Headers;Ljava/util/List;JLokio/Buffer;ILokhttp3/internal/socket/OkioSocket;Ljava/io/IOException;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getBody ()Lokio/Buffer;
public final fun getBodySize ()J
public final fun getChunkSizes ()Ljava/util/List;
Expand Down
1 change: 1 addition & 0 deletions okhttp/api/okhttp.api
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ public final class okhttp3/ConnectionSpec {
public fun equals (Ljava/lang/Object;)Z
public fun hashCode ()I
public final fun isCompatible (Ljavax/net/ssl/SSLSocket;)Z
public final fun isCompatible (Lokhttp3/internal/socket/OkioSslSocket;)Z
public final fun isTls ()Z
public final fun supportsTlsExtensions ()Z
public final fun tlsVersions ()Ljava/util/List;
Expand Down
14 changes: 13 additions & 1 deletion okhttp/src/main/kotlin/okhttp3/ConnectionSpec.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2014 Square, Inc.
* Copyright (C) 2024 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -168,10 +168,22 @@ class ConnectionSpec internal constructor(
* For protocols, at least one of the [required protocols][tlsVersions] must match the socket's
* enabled protocols.
*/
@ExperimentalOkHttpApi
fun isCompatible(socket: OkioSslSocket): Boolean {
return isCompatible((socket as RealOkioSslSocket).delegate)
}

/**
* Returns `true` if the socket, as currently configured, supports this connection spec. In
* order for a socket to be compatible the enabled cipher suites and protocols must intersect.
*
* For cipher suites, at least one of the [required cipher suites][cipherSuites] must match the
* socket's enabled cipher suites. If there are no required cipher suites the socket must have at
* least one cipher suite enabled.
*
* For protocols, at least one of the [required protocols][tlsVersions] must match the socket's
* enabled protocols.
*/
fun isCompatible(socket: SSLSocket): Boolean {
if (!isTls) {
return false
Expand Down

0 comments on commit 37f5924

Please sign in to comment.