import typing

import java
import java.chaquopy
import java.io
import java.lang
import java.net
import java.nio
import java.security
import java.security.cert
import java.util
import java.util.function
import javax.net
import javax.security.cert

class CertPathTrustManagerParameters(ManagerFactoryParameters):
    def __init__(self, parameters: java.security.cert.CertPathParameters, /) -> None: ...
    def getParameters(self) -> java.security.cert.CertPathParameters: ...

class ExtendedSSLSession(SSLSession):
    def __init__(self) -> None: ...
    def getLocalSupportedSignatureAlgorithms(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getPeerSupportedSignatureAlgorithms(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getRequestedServerNames(self) -> java.util.List[SNIServerName]: ...

class HandshakeCompletedEvent(java.util.EventObject):
    def __init__(self, sock: SSLSocket, s: SSLSession, /) -> None: ...
    def getCipherSuite(self) -> str: ...
    def getLocalCertificates(self) -> java.chaquopy.JavaArray[java.security.cert.Certificate]: ...
    def getLocalPrincipal(self) -> java.security.Principal: ...
    def getPeerCertificateChain(self) -> java.chaquopy.JavaArray[javax.security.cert.X509Certificate]: ...
    def getPeerCertificates(self) -> java.chaquopy.JavaArray[java.security.cert.Certificate]: ...
    def getPeerPrincipal(self) -> java.security.Principal: ...
    def getSession(self) -> SSLSession: ...
    def getSocket(self) -> SSLSocket: ...

class HandshakeCompletedListener(java.util.EventListener):
    def handshakeCompleted(self, arg1: HandshakeCompletedEvent, /) -> None: ...

class HostnameVerifier(java.lang.Object):
    def verify(self, arg1: str | java.lang.String, arg2: SSLSession, /) -> bool: ...

class HttpsURLConnection(java.net.HttpURLConnection):
    hostnameVerifier: HostnameVerifier = ...
    def __init__(self, url: java.net.URL, /) -> None: ...
    def getCipherSuite(self) -> str: ...
    @staticmethod
    def getDefaultHostnameVerifier() -> HostnameVerifier: ...
    @staticmethod
    def getDefaultSSLSocketFactory() -> SSLSocketFactory: ...
    def getHostnameVerifier(self) -> HostnameVerifier: ...
    def getLocalCertificates(self) -> java.chaquopy.JavaArray[java.security.cert.Certificate]: ...
    def getLocalPrincipal(self) -> java.security.Principal: ...
    def getPeerPrincipal(self) -> java.security.Principal: ...
    def getSSLSocketFactory(self) -> SSLSocketFactory: ...
    def getServerCertificates(self) -> java.chaquopy.JavaArray[java.security.cert.Certificate]: ...
    @staticmethod
    def setDefaultHostnameVerifier(v: HostnameVerifier, /) -> None: ...
    @staticmethod
    def setDefaultSSLSocketFactory(sf: SSLSocketFactory, /) -> None: ...
    def setHostnameVerifier(self, v: HostnameVerifier, /) -> None: ...
    def setSSLSocketFactory(self, sf: SSLSocketFactory, /) -> None: ...

class KeyManager(java.lang.Object): ...

class KeyManagerFactory(java.lang.Object):
    def __init__(self, factorySpi: KeyManagerFactorySpi, provider: java.security.Provider, algorithm: str | java.lang.String, /) -> None: ...
    def getAlgorithm(self) -> str: ...
    @staticmethod
    def getDefaultAlgorithm() -> str: ...
    @typing.overload
    @staticmethod
    def getInstance(algorithm: str | java.lang.String, /) -> KeyManagerFactory: ...
    @typing.overload
    @staticmethod
    def getInstance(algorithm: str | java.lang.String, provider: str | java.lang.String, /) -> KeyManagerFactory: ...
    @typing.overload
    @staticmethod
    def getInstance(algorithm: str | java.lang.String, provider: java.security.Provider, /) -> KeyManagerFactory: ...
    def getKeyManagers(self) -> java.chaquopy.JavaArray[KeyManager]: ...
    def getProvider(self) -> java.security.Provider: ...
    @typing.overload
    def init(self, spec: ManagerFactoryParameters, /) -> None: ...
    @typing.overload
    def init(self, ks: java.security.KeyStore, password: java.chaquopy.JavaArrayJChar, /) -> None: ...

class KeyManagerFactorySpi(java.lang.Object):
    def __init__(self) -> None: ...
    def engineGetKeyManagers(self) -> java.chaquopy.JavaArray[KeyManager]: ...
    @typing.overload
    def engineInit(self, arg1: ManagerFactoryParameters, /) -> None: ...
    @typing.overload
    def engineInit(self, arg1: java.security.KeyStore, arg2: java.chaquopy.JavaArrayJChar, /) -> None: ...

class KeyStoreBuilderParameters(ManagerFactoryParameters):
    @typing.overload
    def __init__(self, builder: java.security.KeyStore.Builder, /) -> None: ...
    @typing.overload
    def __init__(self, parameters: java.util.List[java.security.KeyStore.Builder], /) -> None: ...
    def getParameters(self) -> java.util.List[java.security.KeyStore.Builder]: ...

class ManagerFactoryParameters(java.lang.Object): ...

class SNIHostName(SNIServerName):
    @typing.overload
    def __init__(self, hostname: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, encoded: java.chaquopy.JavaArrayJByte, /) -> None: ...
    @staticmethod
    def createSNIMatcher(regex: str | java.lang.String, /) -> SNIMatcher: ...
    def equals(self, other: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getAsciiName(self) -> str: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...

class SNIMatcher(java.lang.Object):
    def __init__(self, type: int | java.jint | java.lang.Integer, /) -> None: ...
    def getType(self) -> int: ...
    def matches(self, arg1: SNIServerName, /) -> bool: ...

class SNIServerName(java.lang.Object):
    def __init__(self, type: int | java.jint | java.lang.Integer, encoded: java.chaquopy.JavaArrayJByte, /) -> None: ...
    def equals(self, other: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getEncoded(self) -> java.chaquopy.JavaArrayJByte: ...
    def getType(self) -> int: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...

class SSLContext(java.lang.Object):
    def __init__(self, contextSpi: SSLContextSpi, provider: java.security.Provider, protocol: str | java.lang.String, /) -> None: ...
    @typing.overload
    def createSSLEngine(self) -> SSLEngine: ...
    @typing.overload
    def createSSLEngine(self, peerHost: str | java.lang.String, peerPort: int | java.jint | java.lang.Integer, /) -> SSLEngine: ...
    def getClientSessionContext(self) -> SSLSessionContext: ...
    @staticmethod
    def getDefault() -> SSLContext: ...
    def getDefaultSSLParameters(self) -> SSLParameters: ...
    @typing.overload
    @staticmethod
    def getInstance(protocol: str | java.lang.String, /) -> SSLContext: ...
    @typing.overload
    @staticmethod
    def getInstance(protocol: str | java.lang.String, provider: str | java.lang.String, /) -> SSLContext: ...
    @typing.overload
    @staticmethod
    def getInstance(protocol: str | java.lang.String, provider: java.security.Provider, /) -> SSLContext: ...
    def getProtocol(self) -> str: ...
    def getProvider(self) -> java.security.Provider: ...
    def getServerSessionContext(self) -> SSLSessionContext: ...
    def getServerSocketFactory(self) -> SSLServerSocketFactory: ...
    def getSocketFactory(self) -> SSLSocketFactory: ...
    def getSupportedSSLParameters(self) -> SSLParameters: ...
    def init(self, km: java.chaquopy.JavaArray[KeyManager], tm: java.chaquopy.JavaArray[TrustManager], random: java.security.SecureRandom, /) -> None: ...
    @staticmethod
    def setDefault(context: SSLContext, /) -> None: ...

class SSLContextSpi(java.lang.Object):
    def __init__(self) -> None: ...
    @typing.overload
    def engineCreateSSLEngine(self) -> SSLEngine: ...
    @typing.overload
    def engineCreateSSLEngine(self, arg1: str | java.lang.String, arg2: int | java.jint | java.lang.Integer, /) -> SSLEngine: ...
    def engineGetClientSessionContext(self) -> SSLSessionContext: ...
    def engineGetDefaultSSLParameters(self) -> SSLParameters: ...
    def engineGetServerSessionContext(self) -> SSLSessionContext: ...
    def engineGetServerSocketFactory(self) -> SSLServerSocketFactory: ...
    def engineGetSocketFactory(self) -> SSLSocketFactory: ...
    def engineGetSupportedSSLParameters(self) -> SSLParameters: ...
    def engineInit(self, arg1: java.chaquopy.JavaArray[KeyManager], arg2: java.chaquopy.JavaArray[TrustManager], arg3: java.security.SecureRandom, /) -> None: ...

class SSLEngine(java.lang.Object):
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, peerHost: str | java.lang.String, peerPort: int | java.jint | java.lang.Integer, /) -> None: ...
    def beginHandshake(self) -> None: ...
    def closeInbound(self) -> None: ...
    def closeOutbound(self) -> None: ...
    def getApplicationProtocol(self) -> str: ...
    def getDelegatedTask(self) -> java.lang.Runnable: ...
    def getEnableSessionCreation(self) -> bool: ...
    def getEnabledCipherSuites(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getEnabledProtocols(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getHandshakeApplicationProtocol(self) -> str: ...
    def getHandshakeApplicationProtocolSelector(self) -> java.util.function.BiFunction[SSLEngine, java.util.List[java.lang.String], java.lang.String]: ...
    def getHandshakeSession(self) -> SSLSession: ...
    def getHandshakeStatus(self) -> SSLEngineResult.HandshakeStatus: ...
    def getNeedClientAuth(self) -> bool: ...
    def getPeerHost(self) -> str: ...
    def getPeerPort(self) -> int: ...
    def getSSLParameters(self) -> SSLParameters: ...
    def getSession(self) -> SSLSession: ...
    def getSupportedCipherSuites(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getSupportedProtocols(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getUseClientMode(self) -> bool: ...
    def getWantClientAuth(self) -> bool: ...
    def isInboundDone(self) -> bool: ...
    def isOutboundDone(self) -> bool: ...
    def setEnableSessionCreation(self, arg1: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setEnabledCipherSuites(self, arg1: java.chaquopy.JavaArray[java.lang.String], /) -> None: ...
    def setEnabledProtocols(self, arg1: java.chaquopy.JavaArray[java.lang.String], /) -> None: ...
    def setHandshakeApplicationProtocolSelector(self, selector: java.util.function.BiFunction[SSLEngine, java.util.List[java.lang.String], java.lang.String], /) -> None: ...
    def setNeedClientAuth(self, arg1: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setSSLParameters(self, params: SSLParameters, /) -> None: ...
    def setUseClientMode(self, arg1: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setWantClientAuth(self, arg1: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    @typing.overload
    def unwrap(self, src: java.nio.ByteBuffer, dst: java.nio.ByteBuffer, /) -> SSLEngineResult: ...
    @typing.overload
    def unwrap(self, src: java.nio.ByteBuffer, dsts: java.chaquopy.JavaArray[java.nio.ByteBuffer], /) -> SSLEngineResult: ...
    @typing.overload
    def unwrap(self, arg1: java.nio.ByteBuffer, arg2: java.chaquopy.JavaArray[java.nio.ByteBuffer], arg3: int | java.jint | java.lang.Integer, arg4: int | java.jint | java.lang.Integer, /) -> SSLEngineResult: ...
    @typing.overload
    def wrap(self, src: java.nio.ByteBuffer, dst: java.nio.ByteBuffer, /) -> SSLEngineResult: ...
    @typing.overload
    def wrap(self, srcs: java.chaquopy.JavaArray[java.nio.ByteBuffer], dst: java.nio.ByteBuffer, /) -> SSLEngineResult: ...
    @typing.overload
    def wrap(self, arg1: java.chaquopy.JavaArray[java.nio.ByteBuffer], arg2: int | java.jint | java.lang.Integer, arg3: int | java.jint | java.lang.Integer, arg4: java.nio.ByteBuffer, /) -> SSLEngineResult: ...

class SSLEngineResult(java.lang.Object):
    def __init__(self, status: SSLEngineResult.Status, handshakeStatus: SSLEngineResult.HandshakeStatus, bytesConsumed: int | java.jint | java.lang.Integer, bytesProduced: int | java.jint | java.lang.Integer, /) -> None: ...
    def bytesConsumed(self) -> int: ...
    def bytesProduced(self) -> int: ...
    def getHandshakeStatus(self) -> SSLEngineResult.HandshakeStatus: ...
    def getStatus(self) -> SSLEngineResult.Status: ...
    def toString(self) -> str: ...

    class Status(java.lang.Enum[SSLEngineResult.Status]):
        BUFFER_OVERFLOW: typing.ClassVar[SSLEngineResult.Status] = ...
        BUFFER_UNDERFLOW: typing.ClassVar[SSLEngineResult.Status] = ...
        CLOSED: typing.ClassVar[SSLEngineResult.Status] = ...
        OK: typing.ClassVar[SSLEngineResult.Status] = ...
        @staticmethod
        def valueOf(name: str | java.lang.String, /) -> SSLEngineResult.Status: ...
        @staticmethod
        def values() -> java.chaquopy.JavaArray[SSLEngineResult.Status]: ...

    class HandshakeStatus(java.lang.Enum[SSLEngineResult.HandshakeStatus]):
        FINISHED: typing.ClassVar[SSLEngineResult.HandshakeStatus] = ...
        NEED_TASK: typing.ClassVar[SSLEngineResult.HandshakeStatus] = ...
        NEED_UNWRAP: typing.ClassVar[SSLEngineResult.HandshakeStatus] = ...
        NEED_WRAP: typing.ClassVar[SSLEngineResult.HandshakeStatus] = ...
        NOT_HANDSHAKING: typing.ClassVar[SSLEngineResult.HandshakeStatus] = ...
        @staticmethod
        def valueOf(name: str | java.lang.String, /) -> SSLEngineResult.HandshakeStatus: ...
        @staticmethod
        def values() -> java.chaquopy.JavaArray[SSLEngineResult.HandshakeStatus]: ...

class SSLException(java.io.IOException):
    @typing.overload
    def __init__(self, reason: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, cause: java.lang.Throwable, /) -> None: ...
    @typing.overload
    def __init__(self, message: str | java.lang.String, cause: java.lang.Throwable, /) -> None: ...

class SSLHandshakeException(SSLException):
    def __init__(self, reason: str | java.lang.String, /) -> None: ...

class SSLKeyException(SSLException):
    def __init__(self, reason: str | java.lang.String, /) -> None: ...

class SSLParameters(java.lang.Object):
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, cipherSuites: java.chaquopy.JavaArray[java.lang.String], /) -> None: ...
    @typing.overload
    def __init__(self, cipherSuites: java.chaquopy.JavaArray[java.lang.String], protocols: java.chaquopy.JavaArray[java.lang.String], /) -> None: ...
    def getAlgorithmConstraints(self) -> java.security.AlgorithmConstraints: ...
    def getApplicationProtocols(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getCipherSuites(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getEndpointIdentificationAlgorithm(self) -> str: ...
    def getNeedClientAuth(self) -> bool: ...
    def getProtocols(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getSNIMatchers(self) -> java.util.Collection[SNIMatcher]: ...
    def getServerNames(self) -> java.util.List[SNIServerName]: ...
    def getUseCipherSuitesOrder(self) -> bool: ...
    def getWantClientAuth(self) -> bool: ...
    def setAlgorithmConstraints(self, constraints: java.security.AlgorithmConstraints, /) -> None: ...
    def setApplicationProtocols(self, protocols: java.chaquopy.JavaArray[java.lang.String], /) -> None: ...
    def setCipherSuites(self, cipherSuites: java.chaquopy.JavaArray[java.lang.String], /) -> None: ...
    def setEndpointIdentificationAlgorithm(self, algorithm: str | java.lang.String, /) -> None: ...
    def setNeedClientAuth(self, needClientAuth: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setProtocols(self, protocols: java.chaquopy.JavaArray[java.lang.String], /) -> None: ...
    def setSNIMatchers(self, matchers: java.util.Collection[SNIMatcher], /) -> None: ...
    def setServerNames(self, serverNames: java.util.List[SNIServerName], /) -> None: ...
    def setUseCipherSuitesOrder(self, honorOrder: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setWantClientAuth(self, wantClientAuth: bool | java.jboolean | java.lang.Boolean, /) -> None: ...

class SSLPeerUnverifiedException(SSLException):
    def __init__(self, reason: str | java.lang.String, /) -> None: ...

class SSLPermission(java.security.BasicPermission):
    @typing.overload
    def __init__(self, name: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, name: str | java.lang.String, actions: str | java.lang.String, /) -> None: ...

class SSLProtocolException(SSLException):
    def __init__(self, reason: str | java.lang.String, /) -> None: ...

class SSLServerSocket(java.net.ServerSocket):
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, port: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def __init__(self, port: int | java.jint | java.lang.Integer, backlog: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def __init__(self, port: int | java.jint | java.lang.Integer, backlog: int | java.jint | java.lang.Integer, address: java.net.InetAddress, /) -> None: ...
    def getEnableSessionCreation(self) -> bool: ...
    def getEnabledCipherSuites(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getEnabledProtocols(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getNeedClientAuth(self) -> bool: ...
    def getSSLParameters(self) -> SSLParameters: ...
    def getSupportedCipherSuites(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getSupportedProtocols(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getUseClientMode(self) -> bool: ...
    def getWantClientAuth(self) -> bool: ...
    def setEnableSessionCreation(self, arg1: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setEnabledCipherSuites(self, arg1: java.chaquopy.JavaArray[java.lang.String], /) -> None: ...
    def setEnabledProtocols(self, arg1: java.chaquopy.JavaArray[java.lang.String], /) -> None: ...
    def setNeedClientAuth(self, arg1: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setSSLParameters(self, params: SSLParameters, /) -> None: ...
    def setUseClientMode(self, arg1: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setWantClientAuth(self, arg1: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def toString(self) -> str: ...

class SSLServerSocketFactory(javax.net.ServerSocketFactory):
    def __init__(self) -> None: ...
    @staticmethod
    def getDefault() -> javax.net.ServerSocketFactory: ...
    def getDefaultCipherSuites(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getSupportedCipherSuites(self) -> java.chaquopy.JavaArray[java.lang.String]: ...

class SSLSession(java.lang.Object):
    def getApplicationBufferSize(self) -> int: ...
    def getCipherSuite(self) -> str: ...
    def getCreationTime(self) -> int: ...
    def getId(self) -> java.chaquopy.JavaArrayJByte: ...
    def getLastAccessedTime(self) -> int: ...
    def getLocalCertificates(self) -> java.chaquopy.JavaArray[java.security.cert.Certificate]: ...
    def getLocalPrincipal(self) -> java.security.Principal: ...
    def getPacketBufferSize(self) -> int: ...
    def getPeerCertificateChain(self) -> java.chaquopy.JavaArray[javax.security.cert.X509Certificate]: ...
    def getPeerCertificates(self) -> java.chaquopy.JavaArray[java.security.cert.Certificate]: ...
    def getPeerHost(self) -> str: ...
    def getPeerPort(self) -> int: ...
    def getPeerPrincipal(self) -> java.security.Principal: ...
    def getProtocol(self) -> str: ...
    def getSessionContext(self) -> SSLSessionContext: ...
    def getValue(self, arg1: str | java.lang.String, /) -> java.lang.Object: ...
    def getValueNames(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def invalidate(self) -> None: ...
    def isValid(self) -> bool: ...
    def putValue(self, arg1: str | java.lang.String, arg2: java.lang.Object | int | bool | float | str, /) -> None: ...
    def removeValue(self, arg1: str | java.lang.String, /) -> None: ...

class SSLSessionBindingEvent(java.util.EventObject):
    def __init__(self, session: SSLSession, name: str | java.lang.String, /) -> None: ...
    def getName(self) -> str: ...
    def getSession(self) -> SSLSession: ...

class SSLSessionBindingListener(java.util.EventListener):
    def valueBound(self, arg1: SSLSessionBindingEvent, /) -> None: ...
    def valueUnbound(self, arg1: SSLSessionBindingEvent, /) -> None: ...

class SSLSessionContext(java.lang.Object):
    def getIds(self) -> java.util.Enumeration[java.chaquopy.JavaArrayJByte]: ...
    def getSession(self, arg1: java.chaquopy.JavaArrayJByte, /) -> SSLSession: ...
    def getSessionCacheSize(self) -> int: ...
    def getSessionTimeout(self) -> int: ...
    def setSessionCacheSize(self, arg1: int | java.jint | java.lang.Integer, /) -> None: ...
    def setSessionTimeout(self, arg1: int | java.jint | java.lang.Integer, /) -> None: ...

class SSLSocket(java.net.Socket):
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, host: str | java.lang.String, port: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def __init__(self, address: java.net.InetAddress, port: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def __init__(self, host: str | java.lang.String, port: int | java.jint | java.lang.Integer, clientAddress: java.net.InetAddress, clientPort: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def __init__(self, address: java.net.InetAddress, port: int | java.jint | java.lang.Integer, clientAddress: java.net.InetAddress, clientPort: int | java.jint | java.lang.Integer, /) -> None: ...
    def addHandshakeCompletedListener(self, arg1: HandshakeCompletedListener, /) -> None: ...
    def getApplicationProtocol(self) -> str: ...
    def getEnableSessionCreation(self) -> bool: ...
    def getEnabledCipherSuites(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getEnabledProtocols(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getHandshakeApplicationProtocol(self) -> str: ...
    def getHandshakeApplicationProtocolSelector(self) -> java.util.function.BiFunction[SSLSocket, java.util.List[java.lang.String], java.lang.String]: ...
    def getHandshakeSession(self) -> SSLSession: ...
    def getNeedClientAuth(self) -> bool: ...
    def getSSLParameters(self) -> SSLParameters: ...
    def getSession(self) -> SSLSession: ...
    def getSupportedCipherSuites(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getSupportedProtocols(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getUseClientMode(self) -> bool: ...
    def getWantClientAuth(self) -> bool: ...
    def removeHandshakeCompletedListener(self, arg1: HandshakeCompletedListener, /) -> None: ...
    def setEnableSessionCreation(self, arg1: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setEnabledCipherSuites(self, arg1: java.chaquopy.JavaArray[java.lang.String], /) -> None: ...
    def setEnabledProtocols(self, arg1: java.chaquopy.JavaArray[java.lang.String], /) -> None: ...
    def setHandshakeApplicationProtocolSelector(self, selector: java.util.function.BiFunction[SSLSocket, java.util.List[java.lang.String], java.lang.String], /) -> None: ...
    def setNeedClientAuth(self, arg1: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setSSLParameters(self, params: SSLParameters, /) -> None: ...
    def setUseClientMode(self, arg1: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setWantClientAuth(self, arg1: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def startHandshake(self) -> None: ...
    def toString(self) -> str: ...

class SSLSocketFactory(javax.net.SocketFactory):
    def __init__(self) -> None: ...
    def createSocket(self, arg1: java.net.Socket, arg2: str | java.lang.String, arg3: int | java.jint | java.lang.Integer, arg4: bool | java.jboolean | java.lang.Boolean, /) -> java.net.Socket: ...
    @staticmethod
    def getDefault() -> javax.net.SocketFactory: ...
    def getDefaultCipherSuites(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getSupportedCipherSuites(self) -> java.chaquopy.JavaArray[java.lang.String]: ...

class StandardConstants(java.lang.Object):
    SNI_HOST_NAME: typing.ClassVar[int] = ...

class TrustManager(java.lang.Object): ...

class TrustManagerFactory(java.lang.Object):
    def __init__(self, factorySpi: TrustManagerFactorySpi, provider: java.security.Provider, algorithm: str | java.lang.String, /) -> None: ...
    def getAlgorithm(self) -> str: ...
    @staticmethod
    def getDefaultAlgorithm() -> str: ...
    @typing.overload
    @staticmethod
    def getInstance(algorithm: str | java.lang.String, /) -> TrustManagerFactory: ...
    @typing.overload
    @staticmethod
    def getInstance(algorithm: str | java.lang.String, provider: str | java.lang.String, /) -> TrustManagerFactory: ...
    @typing.overload
    @staticmethod
    def getInstance(algorithm: str | java.lang.String, provider: java.security.Provider, /) -> TrustManagerFactory: ...
    def getProvider(self) -> java.security.Provider: ...
    def getTrustManagers(self) -> java.chaquopy.JavaArray[TrustManager]: ...
    @typing.overload
    def init(self, ks: java.security.KeyStore, /) -> None: ...
    @typing.overload
    def init(self, spec: ManagerFactoryParameters, /) -> None: ...

class TrustManagerFactorySpi(java.lang.Object):
    def __init__(self) -> None: ...
    def engineGetTrustManagers(self) -> java.chaquopy.JavaArray[TrustManager]: ...
    @typing.overload
    def engineInit(self, arg1: java.security.KeyStore, /) -> None: ...
    @typing.overload
    def engineInit(self, arg1: ManagerFactoryParameters, /) -> None: ...

class X509ExtendedKeyManager(X509KeyManager):
    def __init__(self) -> None: ...
    def chooseEngineClientAlias(self, keyType: java.chaquopy.JavaArray[java.lang.String], issuers: java.chaquopy.JavaArray[java.security.Principal], engine: SSLEngine, /) -> str: ...
    def chooseEngineServerAlias(self, keyType: str | java.lang.String, issuers: java.chaquopy.JavaArray[java.security.Principal], engine: SSLEngine, /) -> str: ...

class X509ExtendedTrustManager(X509TrustManager):
    def __init__(self) -> None: ...
    @typing.overload
    def checkClientTrusted(self, arg1: java.chaquopy.JavaArray[java.security.cert.X509Certificate], arg2: str | java.lang.String, arg3: java.net.Socket, /) -> None: ...
    @typing.overload
    def checkClientTrusted(self, arg1: java.chaquopy.JavaArray[java.security.cert.X509Certificate], arg2: str | java.lang.String, arg3: SSLEngine, /) -> None: ...
    @typing.overload
    def checkServerTrusted(self, arg1: java.chaquopy.JavaArray[java.security.cert.X509Certificate], arg2: str | java.lang.String, arg3: java.net.Socket, /) -> None: ...
    @typing.overload
    def checkServerTrusted(self, arg1: java.chaquopy.JavaArray[java.security.cert.X509Certificate], arg2: str | java.lang.String, arg3: SSLEngine, /) -> None: ...

class X509KeyManager(KeyManager):
    def chooseClientAlias(self, arg1: java.chaquopy.JavaArray[java.lang.String], arg2: java.chaquopy.JavaArray[java.security.Principal], arg3: java.net.Socket, /) -> str: ...
    def chooseServerAlias(self, arg1: str | java.lang.String, arg2: java.chaquopy.JavaArray[java.security.Principal], arg3: java.net.Socket, /) -> str: ...
    def getCertificateChain(self, arg1: str | java.lang.String, /) -> java.chaquopy.JavaArray[java.security.cert.X509Certificate]: ...
    def getClientAliases(self, arg1: str | java.lang.String, arg2: java.chaquopy.JavaArray[java.security.Principal], /) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getPrivateKey(self, arg1: str | java.lang.String, /) -> java.security.PrivateKey: ...
    def getServerAliases(self, arg1: str | java.lang.String, arg2: java.chaquopy.JavaArray[java.security.Principal], /) -> java.chaquopy.JavaArray[java.lang.String]: ...

class X509TrustManager(TrustManager):
    def checkClientTrusted(self, arg1: java.chaquopy.JavaArray[java.security.cert.X509Certificate], arg2: str | java.lang.String, /) -> None: ...
    def checkServerTrusted(self, arg1: java.chaquopy.JavaArray[java.security.cert.X509Certificate], arg2: str | java.lang.String, /) -> None: ...
    def getAcceptedIssuers(self) -> java.chaquopy.JavaArray[java.security.cert.X509Certificate]: ...
