本文整理了Java中javax.net.ssl.SSLException.toString()
方法的一些代码示例,展示了SSLException.toString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SSLException.toString()
方法的具体详情如下:
包路径:javax.net.ssl.SSLException
类名称:SSLException
方法名:toString
暂无
代码示例来源:origin: javaee/glassfish
@Override
public Socket acceptSocket(ServerSocket socket) throws IOException {
Socket asock;
try {
asock = socket.accept();
assert asock instanceof SSLSocket;
if(clientAuthNeed) {
((SSLSocket) asock).setNeedClientAuth(clientAuthNeed);
} else {
((SSLSocket) asock).setWantClientAuth(clientAuthWant);
}
} catch (SSLException e) {
throw new SocketException("SSL handshake error" + e.toString());
}
return asock;
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
@Override
public Socket acceptSocket(ServerSocket socket)
throws IOException
{
SSLSocket asock = null;
try {
asock = (SSLSocket)socket.accept();
} catch (SSLException e){
throw new SocketException("SSL handshake error" + e.toString());
}
return asock;
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
@Override
public Socket acceptSocket(ServerSocket socket)
throws IOException
{
SSLSocket asock = null;
try {
asock = (SSLSocket)socket.accept();
} catch (SSLException e){
throw new SocketException("SSL handshake error" + e.toString());
}
return asock;
}
代码示例来源:origin: codefollower/Tomcat-Research
@Override
public Socket acceptSocket(ServerSocket socket)
throws IOException
{
SSLSocket asock = null;
try {
asock = (SSLSocket)socket.accept();
} catch (SSLException e){
throw new SocketException("SSL handshake error" + e.toString());
}
return asock;
}
代码示例来源:origin: org.apache.coyote/com.springsource.org.apache.coyote
@Override
public Socket acceptSocket(ServerSocket socket)
throws IOException
{
SSLSocket asock = null;
try {
asock = (SSLSocket)socket.accept();
} catch (SSLException e){
throw new SocketException("SSL handshake error" + e.toString());
}
return asock;
}
代码示例来源:origin: com.sun.grizzly/grizzly-http-utils
public Socket acceptSocket(ServerSocket socket)
throws IOException
{
SSLSocket asock = null;
try {
asock = (SSLSocket)socket.accept();
asock.setNeedClientAuth(clientAuth);
} catch (SSLException e){
throw new SocketException("SSL handshake error" + e.toString());
}
return asock;
}
代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource
public Socket acceptSocket(ServerSocket socket)
throws IOException
{
SSLSocket asock = null;
try {
asock = (SSLSocket)socket.accept();
configureClientAuth(asock);
} catch (SSLException e){
throw new SocketException("SSL handshake error" + e.toString());
}
return asock;
}
代码示例来源:origin: com.sun.grizzly/grizzly-utils
public Socket acceptSocket(ServerSocket socket)
throws IOException
{
SSLSocket asock = null;
try {
asock = (SSLSocket)socket.accept();
asock.setNeedClientAuth(clientAuth);
} catch (SSLException e){
throw new SocketException("SSL handshake error" + e.toString());
}
return asock;
}
代码示例来源:origin: org.glassfish.external/grizzly-module
public Socket acceptSocket(ServerSocket socket)
throws IOException
{
SSLSocket asock = null;
try {
asock = (SSLSocket)socket.accept();
asock.setNeedClientAuth(clientAuth);
} catch (SSLException e){
throw new SocketException("SSL handshake error" + e.toString());
}
return asock;
}
代码示例来源:origin: com.sun.grizzly/http-utils
public Socket acceptSocket(ServerSocket socket)
throws IOException
{
SSLSocket asock = null;
try {
asock = (SSLSocket)socket.accept();
asock.setNeedClientAuth(clientAuth);
} catch (SSLException e){
throw new SocketException("SSL handshake error" + e.toString());
}
return asock;
}
代码示例来源:origin: hgoebl/DavidWebb
/**
* Analyzes whether the cause of an exception is worth retrying the request.
* <br>
* This is not covering all situations and in case of doubt the exception is considered not
* recoverable. @YOU: if you find a case where an exception is recoverable, create an issue!
* @param webbException the exception to analyze
* @return <tt>true</tt> if it makes sense for the request to be retried again.
*/
public boolean isRecoverable(WebbException webbException) {
Throwable cause = webbException.getCause();
if (cause == null) {
return false;
}
if (cause instanceof SSLException) {
SSLException sslException = (SSLException) cause;
if (sslException.toString().toLowerCase().contains("connection reset by peer")) {
return true;
}
}
if (cause instanceof SocketTimeoutException) {
return true;
}
return false;
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-config
public Socket acceptSocket(ServerSocket socket) throws IOException {
SSLSocket asock;
try {
asock = (SSLSocket) socket.accept();
if(clientAuthNeed) {
asock.setNeedClientAuth(clientAuthNeed);
} else {
asock.setWantClientAuth(clientAuthWant);
}
} catch (SSLException e) {
throw new SocketException("SSL handshake error" + e.toString());
}
return asock;
}
代码示例来源:origin: tywo45/t-io
/**
* 解密
* @return
* @throws SSLException
*/
private SSLEngineResult doUnwrap() throws SSLException {
ByteBuffer cipherText = _buffers.get(BufferType.IN_CIPHER);
ByteBuffer plainText = _buffers.get(BufferType.IN_PLAIN);
try {
log.info("{}, doUnwrap(解密): 密文buffer:{}, 明文buffer: {}", channelContext, cipherText, plainText);
return _engine.unwrap(cipherText, plainText);
} catch (SSLException e) {
if (log.isInfoEnabled()) {
byte[] bs = new byte[cipherText.limit()];
System.arraycopy(cipherText.array(), 0, bs, 0, bs.length);
log.error(channelContext + ", 解密Error:" + e.toString() + ", byte:" + StrUtil.arrayToString(bs) + ", string:" + new String(bs) + ", buffer:" + cipherText, e);
}
throw e;
}
}
代码示例来源:origin: org.t-io/tio-core
/**
* 解密
* @return
* @throws SSLException
*/
private SSLEngineResult doUnwrap() throws SSLException {
ByteBuffer cipherText = _buffers.get(BufferType.IN_CIPHER);
ByteBuffer plainText = _buffers.get(BufferType.IN_PLAIN);
try {
log.info("{}, doUnwrap(解密): 密文buffer:{}, 明文buffer: {}", channelContext, cipherText, plainText);
return _engine.unwrap(cipherText, plainText);
} catch (SSLException e) {
if (log.isInfoEnabled()) {
byte[] bs = new byte[cipherText.limit()];
System.arraycopy(cipherText.array(), 0, bs, 0, bs.length);
log.error(channelContext + ", 解密Error:" + e.toString() + ", byte:" + StrUtil.arrayToString(bs) + ", string:" + new String(bs) + ", buffer:" + cipherText, e);
}
throw e;
}
}
代码示例来源:origin: jboss.web/jbossweb
public Socket acceptSocket(ServerSocket socket)
throws IOException
{
SSLSocket asock = null;
try {
asock = (SSLSocket)socket.accept();
if (!allowUnsafeLegacyRenegotiation) {
asock.addHandshakeCompletedListener(
new DisableSslRenegotiation());
}
configureClientAuth(asock);
} catch (SSLException e){
throw new SocketException("SSL handshake error" + e.toString());
}
return asock;
}
代码示例来源:origin: Samuel-Oliveira/Java_NFe
error("| " + e.toString());
代码示例来源:origin: io.apigee.trireme/trireme-kernel
private void handleEncodingError(TLSChunk qc, SSLException ssle)
{
if (log.isDebugEnabled()) {
log.debug("SSL exception: {}", ssle, ssle);
}
Throwable cause = ssle;
while (cause.getCause() != null) {
cause = cause.getCause();
}
error = ssle;
if (!initFinished) {
// Always make this in to an "error" event
verifyError = ssle;
if (onError != null) {
onError.call(cause);
}
} else {
// Handshaking done, treat this as a legitimate write error
if (qc != null) {
Callback<Object> cb = qc.removeCallback();
if (cb != null) {
cb.call(ssle.toString());
}
} else if (onError != null) {
onError.call(cause);
}
}
}
代码示例来源:origin: com.ironoreserver/com.ironoreserver.core
protected void write(ByteBuffer bb) {
int total = 0;
int bytesWritten = 0;
int totalWritten = 0;
try {
total = bb.capacity();
while(totalWritten < total) {
if (sslEngine != null) {
bytesWritten = sslEngineController.write(bb);
}
else {
bytesWritten = socket.write(bb).get();
}
totalWritten += bytesWritten;
}
}
catch(InterruptedException e) {
Thread.currentThread().interrupt();
throw new SocketInfoException(e.toString(), e);
}
catch(SSLException e) {
throw new SocketInfoException(e.toString(), e);
}
catch(IOException | ExecutionException e) {
throw new SocketInfoException(e.toString(), e);
}
}
}
代码示例来源:origin: com.ironoreserver/com.ironoreserver.core
protected Integer read(int timeout, ByteBuffer bb) {
try {
if (sslEngine != null) {
return sslEngineController.read(bb);
}
else {
return ((timeout < 0) ? socket.read(bb).get() : socket.read(bb).get(timeout, TimeUnit.MILLISECONDS));
}
}
catch(TimeoutException e) {
throw new SocketInfoTimeoutException(e.toString(), e);
}
catch(InterruptedException e) {
Thread.currentThread().interrupt();
throw new SocketInfoException(e.toString(), e);
}
catch(SSLException e) {
throw new SocketInfoException(e.toString(), e);
}
catch(IOException | ExecutionException e) {
throw new SocketInfoException(e.toString(), e);
}
}
代码示例来源:origin: Samuel-Oliveira/Java_Certificado
error("| " + e.toString());
内容来源于网络,如有侵权,请联系作者删除!