
system.net.security.SslStream Maven / Gradle / Ivy
/*
* MIT License
*
* Copyright (c) 2022 MASES s.r.l.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/**************************************************************************************
*
* This code was generated from a template using JCOReflector
*
* Manual changes to this file may cause unexpected behavior in your application.
* Manual changes to this file will be overwritten if the code is regenerated.
*
*************************************************************************************/
package system.net.security;
import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
import java.util.ArrayList;
// Import section
import system.net.security.AuthenticatedStream;
import system.io.Stream;
import system.net.security.RemoteCertificateValidationCallback;
import system.net.security.LocalCertificateSelectionCallback;
import system.net.security.EncryptionPolicy;
import system.IAsyncResult;
import system.IAsyncResultImplementation;
import system.io.SeekOrigin;
import system.AsyncCallback;
import system.security.cryptography.x509certificates.X509CertificateCollection;
import system.security.authentication.SslProtocols;
import system.security.cryptography.x509certificates.X509Certificate;
import system.threading.tasks.Task;
import system.net.security.SslClientAuthenticationOptions;
import system.threading.CancellationToken;
import system.net.security.SslServerAuthenticationOptions;
import system.threading.tasks.ValueTask;
import system.net.security.SslApplicationProtocol;
import system.net.security.TlsCipherSuite;
import system.net.TransportContext;
import system.security.authentication.CipherAlgorithmType;
import system.security.authentication.ExchangeAlgorithmType;
import system.security.authentication.HashAlgorithmType;
/**
* The base .NET class managing System.Net.Security.SslStream, System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
*
*
* See: https://docs.microsoft.com/en-us/dotnet/api/System.Net.Security.SslStream
*/
public class SslStream extends AuthenticatedStream {
/**
* Fully assembly qualified name: System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
*/
public static final String assemblyFullName = "System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
/**
* Assembly name: System.Net.Security
*/
public static final String assemblyShortName = "System.Net.Security";
/**
* Qualified class name: System.Net.Security.SslStream
*/
public static final String className = "System.Net.Security.SslStream";
static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName);
/**
* The type managed from JCOBridge. See {@link JCType}
*/
public static JCType classType = createType();
static JCEnum enumInstance = null;
JCObject classInstance = null;
static JCType createType() {
try {
String classToCreate = className + ", "
+ (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
if (JCOReflector.getDebug())
JCOReflector.writeLog("Creating %s", classToCreate);
JCType typeCreated = bridge.GetType(classToCreate);
if (JCOReflector.getDebug())
JCOReflector.writeLog("Created: %s",
(typeCreated != null) ? typeCreated.toString() : "Returned null value");
return typeCreated;
} catch (JCException e) {
JCOReflector.writeLog(e);
return null;
}
}
void addReference(String ref) throws Throwable {
try {
bridge.AddReference(ref);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
/**
* Internal constructor. Use with caution
*/
public SslStream(java.lang.Object instance) throws Throwable {
super(instance);
if (instance instanceof JCObject) {
classInstance = (JCObject) instance;
} else
throw new Exception("Cannot manage object, it is not a JCObject");
}
public String getJCOAssemblyName() {
return assemblyFullName;
}
public String getJCOClassName() {
return className;
}
public String getJCOObjectName() {
return className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
}
public java.lang.Object getJCOInstance() {
return classInstance;
}
public void setJCOInstance(JCObject instance) {
classInstance = instance;
super.setJCOInstance(classInstance);
}
public JCType getJCOType() {
return classType;
}
/**
* Try to cast the {@link IJCOBridgeReflected} instance into {@link SslStream}, a cast assert is made to check if types are compatible.
* @param from {@link IJCOBridgeReflected} instance to be casted
* @return {@link SslStream} instance
* @throws java.lang.Throwable in case of error during cast operation
*/
public static SslStream cast(IJCOBridgeReflected from) throws Throwable {
NetType.AssertCast(classType, from);
return new SslStream(from.getJCOInstance());
}
// Constructors section
public SslStream() throws Throwable {
}
public SslStream(Stream innerStream, boolean leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback, LocalCertificateSelectionCallback userCertificateSelectionCallback, EncryptionPolicy encryptionPolicy) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.PlatformNotSupportedException, system.FormatException, system.diagnostics.tracing.EventSourceException, system.net.sockets.SocketException {
try {
// add reference to assemblyName.dll file
addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
setJCOInstance((JCObject)classType.NewObject(innerStream == null ? null : innerStream.getJCOInstance(), leaveInnerStreamOpen, userCertificateValidationCallback, userCertificateSelectionCallback, encryptionPolicy == null ? null : encryptionPolicy.getJCOInstance()));
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public SslStream(Stream innerStream, boolean leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback, LocalCertificateSelectionCallback userCertificateSelectionCallback) throws Throwable, system.ArgumentException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.FormatException, system.ObjectDisposedException, system.net.sockets.SocketException {
try {
// add reference to assemblyName.dll file
addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
setJCOInstance((JCObject)classType.NewObject(innerStream == null ? null : innerStream.getJCOInstance(), leaveInnerStreamOpen, userCertificateValidationCallback, userCertificateSelectionCallback));
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public SslStream(Stream innerStream, boolean leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback) throws Throwable, system.ArgumentException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.FormatException, system.ObjectDisposedException, system.net.sockets.SocketException {
try {
// add reference to assemblyName.dll file
addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
setJCOInstance((JCObject)classType.NewObject(innerStream == null ? null : innerStream.getJCOInstance(), leaveInnerStreamOpen, userCertificateValidationCallback));
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public SslStream(Stream innerStream, boolean leaveInnerStreamOpen) throws Throwable, system.ArgumentException, system.IndexOutOfRangeException, system.NotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.FormatException, system.ObjectDisposedException, system.net.sockets.SocketException {
try {
// add reference to assemblyName.dll file
addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
setJCOInstance((JCObject)classType.NewObject(innerStream == null ? null : innerStream.getJCOInstance(), leaveInnerStreamOpen));
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public SslStream(Stream innerStream) throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.ObjectDisposedException, system.net.sockets.SocketException, system.ArrayTypeMismatchException {
try {
// add reference to assemblyName.dll file
addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
setJCOInstance((JCObject)classType.NewObject(innerStream == null ? null : innerStream.getJCOInstance()));
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
// Methods section
public int EndRead(IAsyncResult asyncResult) throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException, system.diagnostics.tracing.EventSourceException, system.threading.tasks.TaskSchedulerException, system.ArgumentOutOfRangeException, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Invoke("EndRead", asyncResult == null ? null : asyncResult.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public int Read(byte[] buffer, int offset, int count) throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArrayTypeMismatchException, system.diagnostics.tracing.EventSourceException, system.threading.tasks.TaskSchedulerException, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Invoke("Read", buffer, offset, count);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public int Read(JCORefOut dupParam0, int dupParam1, int dupParam2) throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArrayTypeMismatchException, system.diagnostics.tracing.EventSourceException, system.threading.tasks.TaskSchedulerException, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Invoke("Read", dupParam0.getJCRefOut(), dupParam1, dupParam2);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public int ReadByte() throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException, system.FormatException, system.ArgumentException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Invoke("ReadByte");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public long Seek(long offset, SeekOrigin origin) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.NotSupportedException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (long)classInstance.Invoke("Seek", offset, origin == null ? null : origin.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public IAsyncResult BeginAuthenticateAsClient(java.lang.String targetHost, AsyncCallback asyncCallback, NetObject asyncState) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.InvalidOperationException, system.componentmodel.Win32Exception, system.NotSupportedException, system.PlatformNotSupportedException, system.security.authentication.AuthenticationException, system.ArgumentOutOfRangeException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objBeginAuthenticateAsClient = (JCObject)classInstance.Invoke("BeginAuthenticateAsClient", targetHost, asyncCallback, asyncState == null ? null : asyncState.getJCOInstance());
return new IAsyncResultImplementation(objBeginAuthenticateAsClient);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public IAsyncResult BeginAuthenticateAsClient(java.lang.String targetHost, X509CertificateCollection clientCertificates, boolean checkCertificateRevocation, AsyncCallback asyncCallback, NetObject asyncState) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.InvalidOperationException, system.componentmodel.Win32Exception, system.NotSupportedException, system.PlatformNotSupportedException, system.security.authentication.AuthenticationException, system.ArgumentOutOfRangeException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objBeginAuthenticateAsClient = (JCObject)classInstance.Invoke("BeginAuthenticateAsClient", targetHost, clientCertificates == null ? null : clientCertificates.getJCOInstance(), checkCertificateRevocation, asyncCallback, asyncState == null ? null : asyncState.getJCOInstance());
return new IAsyncResultImplementation(objBeginAuthenticateAsClient);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public IAsyncResult BeginAuthenticateAsClient(java.lang.String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, boolean checkCertificateRevocation, AsyncCallback asyncCallback, NetObject asyncState) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ObjectDisposedException, system.IndexOutOfRangeException, system.componentmodel.Win32Exception, system.NotSupportedException, system.security.authentication.AuthenticationException, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objBeginAuthenticateAsClient = (JCObject)classInstance.Invoke("BeginAuthenticateAsClient", targetHost, clientCertificates == null ? null : clientCertificates.getJCOInstance(), enabledSslProtocols == null ? null : enabledSslProtocols.getJCOInstance(), checkCertificateRevocation, asyncCallback, asyncState == null ? null : asyncState.getJCOInstance());
return new IAsyncResultImplementation(objBeginAuthenticateAsClient);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public IAsyncResult BeginAuthenticateAsServer(X509Certificate serverCertificate, boolean clientCertificateRequired, boolean checkCertificateRevocation, AsyncCallback asyncCallback, NetObject asyncState) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.InvalidOperationException, system.security.cryptography.CryptographicException, system.NotSupportedException, system.ArgumentOutOfRangeException, system.security.authentication.AuthenticationException, system.componentmodel.Win32Exception {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objBeginAuthenticateAsServer = (JCObject)classInstance.Invoke("BeginAuthenticateAsServer", serverCertificate == null ? null : serverCertificate.getJCOInstance(), clientCertificateRequired, checkCertificateRevocation, asyncCallback, asyncState == null ? null : asyncState.getJCOInstance());
return new IAsyncResultImplementation(objBeginAuthenticateAsServer);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public IAsyncResult BeginAuthenticateAsServer(X509Certificate serverCertificate, boolean clientCertificateRequired, SslProtocols enabledSslProtocols, boolean checkCertificateRevocation, AsyncCallback asyncCallback, NetObject asyncState) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ObjectDisposedException, system.IndexOutOfRangeException, system.security.cryptography.CryptographicException, system.NotSupportedException, system.security.SecurityException, system.security.authentication.AuthenticationException, system.componentmodel.Win32Exception, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objBeginAuthenticateAsServer = (JCObject)classInstance.Invoke("BeginAuthenticateAsServer", serverCertificate == null ? null : serverCertificate.getJCOInstance(), clientCertificateRequired, enabledSslProtocols == null ? null : enabledSslProtocols.getJCOInstance(), checkCertificateRevocation, asyncCallback, asyncState == null ? null : asyncState.getJCOInstance());
return new IAsyncResultImplementation(objBeginAuthenticateAsServer);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public IAsyncResult BeginAuthenticateAsServer(X509Certificate serverCertificate, AsyncCallback asyncCallback, NetObject asyncState) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.InvalidOperationException, system.security.cryptography.CryptographicException, system.NotSupportedException, system.ArgumentOutOfRangeException, system.security.authentication.AuthenticationException, system.componentmodel.Win32Exception {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objBeginAuthenticateAsServer = (JCObject)classInstance.Invoke("BeginAuthenticateAsServer", serverCertificate == null ? null : serverCertificate.getJCOInstance(), asyncCallback, asyncState == null ? null : asyncState.getJCOInstance());
return new IAsyncResultImplementation(objBeginAuthenticateAsServer);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback asyncCallback, NetObject asyncState) throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.OperationCanceledException, system.threading.tasks.TaskCanceledException, system.AggregateException, system.threading.SemaphoreFullException, system.threading.tasks.TaskSchedulerException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objBeginRead = (JCObject)classInstance.Invoke("BeginRead", buffer, offset, count, asyncCallback, asyncState == null ? null : asyncState.getJCOInstance());
return new IAsyncResultImplementation(objBeginRead);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public IAsyncResult BeginRead(JCORefOut dupParam0, int dupParam1, int dupParam2, AsyncCallback dupParam3, NetObject dupParam4) throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.OperationCanceledException, system.threading.tasks.TaskCanceledException, system.AggregateException, system.threading.SemaphoreFullException, system.threading.tasks.TaskSchedulerException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objBeginRead = (JCObject)classInstance.Invoke("BeginRead", dupParam0.getJCRefOut(), dupParam1, dupParam2, dupParam3, dupParam4 == null ? null : dupParam4.getJCOInstance());
return new IAsyncResultImplementation(objBeginRead);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback asyncCallback, NetObject asyncState) throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.OperationCanceledException, system.threading.tasks.TaskCanceledException, system.AggregateException, system.threading.SemaphoreFullException, system.threading.tasks.TaskSchedulerException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objBeginWrite = (JCObject)classInstance.Invoke("BeginWrite", buffer, offset, count, asyncCallback, asyncState == null ? null : asyncState.getJCOInstance());
return new IAsyncResultImplementation(objBeginWrite);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public IAsyncResult BeginWrite(JCORefOut dupParam0, int dupParam1, int dupParam2, AsyncCallback dupParam3, NetObject dupParam4) throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.OperationCanceledException, system.threading.tasks.TaskCanceledException, system.AggregateException, system.threading.SemaphoreFullException, system.threading.tasks.TaskSchedulerException, system.ArgumentException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objBeginWrite = (JCObject)classInstance.Invoke("BeginWrite", dupParam0.getJCRefOut(), dupParam1, dupParam2, dupParam3, dupParam4 == null ? null : dupParam4.getJCOInstance());
return new IAsyncResultImplementation(objBeginWrite);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public Task AuthenticateAsClientAsync(SslClientAuthenticationOptions sslClientAuthenticationOptions, CancellationToken cancellationToken) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.ArrayTypeMismatchException, system.FormatException, system.diagnostics.tracing.EventSourceException, system.OutOfMemoryException, system.componentmodel.Win32Exception, system.security.authentication.AuthenticationException, system.threading.tasks.TaskSchedulerException, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAuthenticateAsClientAsync = (JCObject)classInstance.Invoke("AuthenticateAsClientAsync", sslClientAuthenticationOptions == null ? null : sslClientAuthenticationOptions.getJCOInstance(), cancellationToken == null ? null : cancellationToken.getJCOInstance());
return new Task(objAuthenticateAsClientAsync);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public Task AuthenticateAsClientAsync(java.lang.String targetHost, X509CertificateCollection clientCertificates, boolean checkCertificateRevocation) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.InvalidOperationException, system.IndexOutOfRangeException, system.componentmodel.Win32Exception, system.NotSupportedException, system.security.authentication.AuthenticationException, system.threading.tasks.TaskCanceledException, system.AggregateException, system.ArgumentOutOfRangeException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAuthenticateAsClientAsync = (JCObject)classInstance.Invoke("AuthenticateAsClientAsync", targetHost, clientCertificates == null ? null : clientCertificates.getJCOInstance(), checkCertificateRevocation);
return new Task(objAuthenticateAsClientAsync);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public Task AuthenticateAsClientAsync(java.lang.String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, boolean checkCertificateRevocation) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ObjectDisposedException, system.IndexOutOfRangeException, system.diagnostics.tracing.EventSourceException, system.componentmodel.Win32Exception, system.NotSupportedException, system.security.authentication.AuthenticationException, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAuthenticateAsClientAsync = (JCObject)classInstance.Invoke("AuthenticateAsClientAsync", targetHost, clientCertificates == null ? null : clientCertificates.getJCOInstance(), enabledSslProtocols == null ? null : enabledSslProtocols.getJCOInstance(), checkCertificateRevocation);
return new Task(objAuthenticateAsClientAsync);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public Task AuthenticateAsClientAsync(java.lang.String targetHost) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ObjectDisposedException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.FormatException, system.componentmodel.Win32Exception, system.NotSupportedException, system.security.authentication.AuthenticationException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAuthenticateAsClientAsync = (JCObject)classInstance.Invoke("AuthenticateAsClientAsync", targetHost);
return new Task(objAuthenticateAsClientAsync);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public Task AuthenticateAsServerAsync(SslServerAuthenticationOptions sslServerAuthenticationOptions, CancellationToken cancellationToken) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.ArrayTypeMismatchException, system.FormatException, system.security.cryptography.CryptographicException, system.diagnostics.tracing.EventSourceException, system.OutOfMemoryException, system.security.SecurityException, system.security.authentication.AuthenticationException, system.componentmodel.Win32Exception, system.threading.tasks.TaskSchedulerException, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAuthenticateAsServerAsync = (JCObject)classInstance.Invoke("AuthenticateAsServerAsync", sslServerAuthenticationOptions == null ? null : sslServerAuthenticationOptions.getJCOInstance(), cancellationToken == null ? null : cancellationToken.getJCOInstance());
return new Task(objAuthenticateAsServerAsync);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public Task AuthenticateAsServerAsync(X509Certificate serverCertificate, boolean clientCertificateRequired, boolean checkCertificateRevocation) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ObjectDisposedException, system.IndexOutOfRangeException, system.diagnostics.tracing.EventSourceException, system.NotSupportedException, system.security.cryptography.CryptographicException, system.security.SecurityException, system.security.authentication.AuthenticationException, system.componentmodel.Win32Exception, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAuthenticateAsServerAsync = (JCObject)classInstance.Invoke("AuthenticateAsServerAsync", serverCertificate == null ? null : serverCertificate.getJCOInstance(), clientCertificateRequired, checkCertificateRevocation);
return new Task(objAuthenticateAsServerAsync);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public Task AuthenticateAsServerAsync(X509Certificate serverCertificate, boolean clientCertificateRequired, SslProtocols enabledSslProtocols, boolean checkCertificateRevocation) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ObjectDisposedException, system.IndexOutOfRangeException, system.diagnostics.tracing.EventSourceException, system.NotSupportedException, system.security.cryptography.CryptographicException, system.security.SecurityException, system.security.authentication.AuthenticationException, system.componentmodel.Win32Exception, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAuthenticateAsServerAsync = (JCObject)classInstance.Invoke("AuthenticateAsServerAsync", serverCertificate == null ? null : serverCertificate.getJCOInstance(), clientCertificateRequired, enabledSslProtocols == null ? null : enabledSslProtocols.getJCOInstance(), checkCertificateRevocation);
return new Task(objAuthenticateAsServerAsync);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public Task AuthenticateAsServerAsync(X509Certificate serverCertificate) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.InvalidOperationException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.security.cryptography.CryptographicException, system.NotSupportedException, system.ArgumentOutOfRangeException, system.security.SecurityException, system.security.authentication.AuthenticationException, system.componentmodel.Win32Exception, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objAuthenticateAsServerAsync = (JCObject)classInstance.Invoke("AuthenticateAsServerAsync", serverCertificate == null ? null : serverCertificate.getJCOInstance());
return new Task(objAuthenticateAsServerAsync);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public Task FlushAsync(CancellationToken cancellationToken) throws Throwable, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ArgumentException, system.NotSupportedException, system.IndexOutOfRangeException, system.diagnostics.tracing.EventSourceException, system.OutOfMemoryException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objFlushAsync = (JCObject)classInstance.Invoke("FlushAsync", cancellationToken == null ? null : cancellationToken.getJCOInstance());
return new Task(objFlushAsync);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public Task ShutdownAsync() throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentException, system.ArgumentOutOfRangeException, system.diagnostics.tracing.EventSourceException, system.OutOfMemoryException, system.security.cryptography.CryptographicException, system.IndexOutOfRangeException, system.security.SecurityException, system.componentmodel.Win32Exception, system.security.authentication.AuthenticationException, system.ArrayTypeMismatchException, system.OperationCanceledException, system.threading.SemaphoreFullException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objShutdownAsync = (JCObject)classInstance.Invoke("ShutdownAsync");
return new Task(objShutdownAsync);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.OperationCanceledException, system.threading.SemaphoreFullException, system.ArgumentException, system.ArrayTypeMismatchException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objWriteAsync = (JCObject)classInstance.Invoke("WriteAsync", buffer, offset, count, cancellationToken == null ? null : cancellationToken.getJCOInstance());
return new Task(objWriteAsync);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public Task WriteAsync(JCORefOut dupParam0, int dupParam1, int dupParam2, CancellationToken dupParam3) throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.OperationCanceledException, system.threading.SemaphoreFullException, system.ArgumentException, system.ArrayTypeMismatchException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objWriteAsync = (JCObject)classInstance.Invoke("WriteAsync", dupParam0.getJCRefOut(), dupParam1, dupParam2, dupParam3 == null ? null : dupParam3.getJCOInstance());
return new Task(objWriteAsync);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public ValueTask DisposeAsync() throws Throwable, system.ArgumentNullException, system.PlatformNotSupportedException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject objDisposeAsync = (JCObject)classInstance.Invoke("DisposeAsync");
return new ValueTask(objDisposeAsync);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void AuthenticateAsClient(SslClientAuthenticationOptions sslClientAuthenticationOptions) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.ArrayTypeMismatchException, system.FormatException, system.diagnostics.tracing.EventSourceException, system.OutOfMemoryException, system.componentmodel.Win32Exception, system.security.authentication.AuthenticationException, system.threading.tasks.TaskSchedulerException, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("AuthenticateAsClient", sslClientAuthenticationOptions == null ? null : sslClientAuthenticationOptions.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void AuthenticateAsClient(java.lang.String targetHost, X509CertificateCollection clientCertificates, boolean checkCertificateRevocation) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.InvalidOperationException, system.IndexOutOfRangeException, system.componentmodel.Win32Exception, system.NotSupportedException, system.security.authentication.AuthenticationException, system.threading.tasks.TaskCanceledException, system.AggregateException, system.ArgumentOutOfRangeException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("AuthenticateAsClient", targetHost, clientCertificates == null ? null : clientCertificates.getJCOInstance(), checkCertificateRevocation);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void AuthenticateAsClient(java.lang.String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, boolean checkCertificateRevocation) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ObjectDisposedException, system.IndexOutOfRangeException, system.diagnostics.tracing.EventSourceException, system.componentmodel.Win32Exception, system.NotSupportedException, system.security.authentication.AuthenticationException, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("AuthenticateAsClient", targetHost, clientCertificates == null ? null : clientCertificates.getJCOInstance(), enabledSslProtocols == null ? null : enabledSslProtocols.getJCOInstance(), checkCertificateRevocation);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void AuthenticateAsClient(java.lang.String targetHost) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.InvalidOperationException, system.IndexOutOfRangeException, system.componentmodel.Win32Exception, system.NotSupportedException, system.security.authentication.AuthenticationException, system.threading.tasks.TaskCanceledException, system.AggregateException, system.ArgumentOutOfRangeException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("AuthenticateAsClient", targetHost);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void AuthenticateAsServer(SslServerAuthenticationOptions sslServerAuthenticationOptions) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.NotSupportedException, system.ObjectDisposedException, system.RankException, system.ArrayTypeMismatchException, system.FormatException, system.security.cryptography.CryptographicException, system.diagnostics.tracing.EventSourceException, system.OutOfMemoryException, system.security.SecurityException, system.security.authentication.AuthenticationException, system.componentmodel.Win32Exception, system.threading.tasks.TaskSchedulerException, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("AuthenticateAsServer", sslServerAuthenticationOptions == null ? null : sslServerAuthenticationOptions.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void AuthenticateAsServer(X509Certificate serverCertificate, boolean clientCertificateRequired, boolean checkCertificateRevocation) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.InvalidOperationException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.security.cryptography.CryptographicException, system.NotSupportedException, system.ArgumentOutOfRangeException, system.security.SecurityException, system.security.authentication.AuthenticationException, system.componentmodel.Win32Exception, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("AuthenticateAsServer", serverCertificate == null ? null : serverCertificate.getJCOInstance(), clientCertificateRequired, checkCertificateRevocation);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void AuthenticateAsServer(X509Certificate serverCertificate, boolean clientCertificateRequired, SslProtocols enabledSslProtocols, boolean checkCertificateRevocation) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.InvalidOperationException, system.PlatformNotSupportedException, system.ObjectDisposedException, system.IndexOutOfRangeException, system.diagnostics.tracing.EventSourceException, system.NotSupportedException, system.security.cryptography.CryptographicException, system.security.SecurityException, system.security.authentication.AuthenticationException, system.componentmodel.Win32Exception, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("AuthenticateAsServer", serverCertificate == null ? null : serverCertificate.getJCOInstance(), clientCertificateRequired, enabledSslProtocols == null ? null : enabledSslProtocols.getJCOInstance(), checkCertificateRevocation);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void AuthenticateAsServer(X509Certificate serverCertificate) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.InvalidOperationException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.security.cryptography.CryptographicException, system.NotSupportedException, system.ArgumentOutOfRangeException, system.security.SecurityException, system.security.authentication.AuthenticationException, system.componentmodel.Win32Exception, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("AuthenticateAsServer", serverCertificate == null ? null : serverCertificate.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void EndAuthenticateAsClient(IAsyncResult asyncResult) throws Throwable, system.diagnostics.tracing.EventSourceException, system.ArgumentNullException, system.InvalidOperationException, system.threading.tasks.TaskSchedulerException, system.ArgumentOutOfRangeException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("EndAuthenticateAsClient", asyncResult == null ? null : asyncResult.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void EndAuthenticateAsServer(IAsyncResult asyncResult) throws Throwable, system.diagnostics.tracing.EventSourceException, system.ArgumentNullException, system.InvalidOperationException, system.threading.tasks.TaskSchedulerException, system.ArgumentOutOfRangeException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("EndAuthenticateAsServer", asyncResult == null ? null : asyncResult.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void EndWrite(IAsyncResult asyncResult) throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException, system.diagnostics.tracing.EventSourceException, system.threading.tasks.TaskSchedulerException, system.ArgumentOutOfRangeException, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("EndWrite", asyncResult == null ? null : asyncResult.getJCOInstance());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void Flush() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("Flush");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void SetLength(long value) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("SetLength", value);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void Write(byte[] buffer, int offset, int count) throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.diagnostics.tracing.EventSourceException, system.threading.tasks.TaskSchedulerException, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("Write", buffer, offset, count);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void Write(JCORefOut dupParam0, int dupParam1, int dupParam2) throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.diagnostics.tracing.EventSourceException, system.threading.tasks.TaskSchedulerException, system.threading.tasks.TaskCanceledException, system.AggregateException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("Write", dupParam0.getJCRefOut(), dupParam1, dupParam2);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void Write(byte[] buffer) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("Write", (java.lang.Object)buffer);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public void Write(JCORefOut dupParam0) throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
classInstance.Invoke("Write", (java.lang.Object)dupParam0.getJCRefOut());
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
// Properties section
public boolean getCheckCertRevocationStatus() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (boolean)classInstance.Get("CheckCertRevocationStatus");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public int getCipherStrength() throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Get("CipherStrength");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public int getHashStrength() throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Get("HashStrength");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public int getKeyExchangeStrength() throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (int)classInstance.Get("KeyExchangeStrength");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public SslApplicationProtocol getNegotiatedApplicationProtocol() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("NegotiatedApplicationProtocol");
return new SslApplicationProtocol(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public TlsCipherSuite getNegotiatedCipherSuite() throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("NegotiatedCipherSuite");
return new TlsCipherSuite(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public TransportContext getTransportContext() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("TransportContext");
return new TransportContext(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public CipherAlgorithmType getCipherAlgorithm() throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("CipherAlgorithm");
return new CipherAlgorithmType(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public ExchangeAlgorithmType getKeyExchangeAlgorithm() throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("KeyExchangeAlgorithm");
return new ExchangeAlgorithmType(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public HashAlgorithmType getHashAlgorithm() throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("HashAlgorithm");
return new HashAlgorithmType(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public SslProtocols getSslProtocol() throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("SslProtocol");
return new SslProtocols(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public X509Certificate getLocalCertificate() throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("LocalCertificate");
return new X509Certificate(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public X509Certificate getRemoteCertificate() throws Throwable, system.NotSupportedException, system.ArgumentNullException, system.ObjectDisposedException, system.PlatformNotSupportedException, system.InvalidOperationException {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
JCObject val = (JCObject)classInstance.Get("RemoteCertificate");
return new X509Certificate(val);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public java.lang.String getTargetHostName() throws Throwable {
if (classInstance == null)
throw new UnsupportedOperationException("classInstance is null.");
try {
return (java.lang.String)classInstance.Get("TargetHostName");
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
// Instance Events section
}