• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java SSLSupport类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.tomcat.util.net.SSLSupport的典型用法代码示例。如果您正苦于以下问题:Java SSLSupport类的具体用法?Java SSLSupport怎么用?Java SSLSupport使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SSLSupport类属于org.apache.tomcat.util.net包,在下文中一共展示了SSLSupport类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getKeySize

import org.apache.tomcat.util.net.SSLSupport; //导入依赖的package包/类
/**
 * Copied from <code>org.apache.catalina.valves.CertificateValve</code>
 */
public Integer getKeySize() 
    throws IOException {
    // Look up the current SSLSession
    SSLSupport.CipherData c_aux[]=ciphers;
    if (session == null)
        return null;
    Integer keySize = (Integer) session.getValue(KEY_SIZE_KEY);
    if (keySize == null) {
        int size = 0;
        String cipherSuite = session.getCipherSuite();
        for (int i = 0; i < c_aux.length; i++) {
            if (cipherSuite.indexOf(c_aux[i].phrase) >= 0) {
                size = c_aux[i].keySize;
                break;
            }
        }
        keySize = new Integer(size);
        session.putValue(KEY_SIZE_KEY, keySize);
    }
    return keySize;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:25,代码来源:JSSESupport.java


示例2: parseSessionSslId

import org.apache.tomcat.util.net.SSLSupport; //导入依赖的package包/类
/**
 * Look for SSL session ID if required. Only look for SSL Session ID if it
 * is the only tracking method enabled.
 */
protected void parseSessionSslId(Request request) {
    if (request.getRequestedSessionId() == null &&
            SSL_ONLY.equals(request.getServletContext()
                    .getEffectiveSessionTrackingModes()) &&
                    request.connector.secure) {
        // TODO Is there a better way to map SSL sessions to our sesison ID?
        // TODO The request.getAttribute() will cause a number of other SSL
        //      attribute to be populated. Is this a performance concern?
        request.setRequestedSessionId(
                request.getAttribute(SSLSupport.SESSION_ID_KEY).toString());
        request.setRequestedSessionSSL(true);
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:18,代码来源:CoyoteAdapter.java


示例3: getKeySize

import org.apache.tomcat.util.net.SSLSupport; //导入依赖的package包/类
/**
 * Copied from <code>org.apache.catalina.valves.CertificateValve</code>
 */
@Override
public Integer getKeySize()
    throws IOException {
    // Look up the current SSLSession
    SSLSupport.CipherData c_aux[]=ciphers;
    if (session == null)
        return null;

    Integer keySize = null;
    synchronized(keySizeCache) {
        keySize = keySizeCache.get(session);
    }

    if (keySize == null) {
        int size = 0;
        String cipherSuite = session.getCipherSuite();
        for (int i = 0; i < c_aux.length; i++) {
            if (cipherSuite.indexOf(c_aux[i].phrase) >= 0) {
                size = c_aux[i].keySize;
                break;
            }
        }
        keySize = Integer.valueOf(size);
        synchronized(keySizeCache) {
            keySizeCache.put(session, keySize);
        }
    }
    return keySize;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:33,代码来源:JSSESupport.java


示例4: getSSLSupport

import org.apache.tomcat.util.net.SSLSupport; //导入依赖的package包/类
public SSLSupport getSSLSupport(SSLSession session) {
    SSLSupport ssls = factory.getSSLSupport(session);
    return ssls;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:JSSEImplementation.java


示例5: getSSLSupport

import org.apache.tomcat.util.net.SSLSupport; //导入依赖的package包/类
public SSLSupport getSSLSupport(javax.net.ssl.SSLSession session) {
    /*
     * The Tomcat 6.0.26 docs says: This method has been deprecated since it
     * adds a JSSE dependency to this interface. It will be removed in
     * versions after 6.0.x.
     *
     * But we have to provide a implementation of this method because it's
     * declared as abstract.
     *
     * Unfortunately there does not appear to be any way to get SSLSupport
     * information from a session with JSS. JSS looks up the information
     * based on a socket, not a session. This done in SSLSocket.c
     * Java_org_mozilla_jss_ssl_SSLSocket_getStatus().
     *
     * So while it would be nice to provide a working implmentation there
     * doesn't seem to be an easy way to do this. Given that this method is
     * already deprecated and there hasn't been any evidence of it being
     * called it therefore seems reasonable to just return null to satify
     * the compiler's demand for an implementation.
     *
     * Once this abstract method is removed from SSLImplementation in a
     * future release we can remove this stub.
     *
     * NOTE: This method has NOT yet been deprecated in Tomcat 7!
     */
    return null;
}
 
开发者ID:dogtagpki,项目名称:tomcatjss,代码行数:28,代码来源:JSSImplementation.java


示例6: parseSessionSslId

import org.apache.tomcat.util.net.SSLSupport; //导入依赖的package包/类
/**
 * Look for SSL session ID if required. Only look for SSL Session ID if it
 * is the only tracking method enabled.
 */
protected void parseSessionSslId(Request request) {
	if (request.getRequestedSessionId() == null
			&& SSL_ONLY.equals(request.getServletContext().getEffectiveSessionTrackingModes())
			&& request.connector.secure) {
		// TODO Is there a better way to map SSL sessions to our sesison ID?
		// TODO The request.getAttribute() will cause a number of other SSL
		// attribute to be populated. Is this a performance concern?
		request.setRequestedSessionId(request.getAttribute(SSLSupport.SESSION_ID_KEY).toString());
		request.setRequestedSessionSSL(true);
	}
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:16,代码来源:CoyoteAdapter.java


示例7: getKeySize

import org.apache.tomcat.util.net.SSLSupport; //导入依赖的package包/类
/**
 * Copied from <code>org.apache.catalina.valves.CertificateValve</code>
 */
@Override
public Integer getKeySize() throws IOException {
	// Look up the current SSLSession
	SSLSupport.CipherData c_aux[] = ciphers;
	if (session == null)
		return null;

	Integer keySize = null;
	synchronized (keySizeCache) {
		keySize = keySizeCache.get(session);
	}

	if (keySize == null) {
		int size = 0;
		String cipherSuite = session.getCipherSuite();
		for (int i = 0; i < c_aux.length; i++) {
			if (cipherSuite.indexOf(c_aux[i].phrase) >= 0) {
				size = c_aux[i].keySize;
				break;
			}
		}
		keySize = Integer.valueOf(size);
		synchronized (keySizeCache) {
			keySizeCache.put(session, keySize);
		}
	}
	return keySize;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:32,代码来源:JSSESupport.java


示例8: WantCertJSSESupport

import org.apache.tomcat.util.net.SSLSupport; //导入依赖的package包/类
public WantCertJSSESupport(SSLSocket sock) {
   	this.ssl = sock;

   	try {
           Class<?> clazz = Class.forName(TOMCAT_JSSE_SUPPORT);
           Constructor<?> cons = clazz.getDeclaredConstructor(SSLSocket.class);
           cons.setAccessible(true);
           this.jseeSupport = (SSLSupport) cons.newInstance(sock);
	} catch (Exception ex) {ex.printStackTrace();
		throw new RuntimeException("Error creating  object " + TOMCAT_JSSE_SUPPORT);
		
	}
}
 
开发者ID:GluuFederation,项目名称:oxCore,代码行数:14,代码来源:WantCertJSSESupport.java


示例9: getKeySize

import org.apache.tomcat.util.net.SSLSupport; //导入依赖的package包/类
/**
 * Copied from <code>org.apache.catalina.valves.CertificateValve</code>
 */
@Override
public Integer getKeySize() 
    throws IOException {
    // Look up the current SSLSession
    SSLSupport.CipherData c_aux[]=ciphers;
    if (session == null)
        return null;
    
    Integer keySize = null;
    synchronized(keySizeCache) {
        keySize = keySizeCache.get(session);
    }
    
    if (keySize == null) {
        int size = 0;
        String cipherSuite = session.getCipherSuite();
        for (int i = 0; i < c_aux.length; i++) {
            if (cipherSuite.indexOf(c_aux[i].phrase) >= 0) {
                size = c_aux[i].keySize;
                break;
            }
        }
        keySize = Integer.valueOf(size);
        synchronized(keySizeCache) {
            keySizeCache.put(session, keySize);
        }
    }
    return keySize;
}
 
开发者ID:WhiteBearSolutions,项目名称:WBSAirback,代码行数:33,代码来源:JSSESupport.java


示例10: getAttribute

import org.apache.tomcat.util.net.SSLSupport; //导入依赖的package包/类
/**
 * Return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 *
 * @param name Name of the request attribute to return
 */
@Override
public Object getAttribute(String name) {

    // Special attributes
    SpecialAttributeAdapter adapter = specialAttributes.get(name);
    if (adapter != null) {
        return adapter.get(this, name);
    }

    Object attr=attributes.get(name);

    if(attr!=null) {
        return(attr);
    }

    attr =  coyoteRequest.getAttribute(name);
    if(attr != null) {
        return attr;
    }
    if( isSSLAttribute(name) || name.equals(SSLSupport.PROTOCOL_VERSION_KEY)) {
        coyoteRequest.action(ActionCode.REQ_SSL_ATTRIBUTE,
                             coyoteRequest);
        attr = coyoteRequest.getAttribute(Globals.CERTIFICATES_ATTR);
        if( attr != null) {
            attributes.put(Globals.CERTIFICATES_ATTR, attr);
        }
        attr = coyoteRequest.getAttribute(Globals.CIPHER_SUITE_ATTR);
        if(attr != null) {
            attributes.put(Globals.CIPHER_SUITE_ATTR, attr);
        }
        attr = coyoteRequest.getAttribute(Globals.KEY_SIZE_ATTR);
        if(attr != null) {
            attributes.put(Globals.KEY_SIZE_ATTR, attr);
        }
        attr = coyoteRequest.getAttribute(Globals.SSL_SESSION_ID_ATTR);
        if(attr != null) {
            attributes.put(Globals.SSL_SESSION_ID_ATTR, attr);
            attributes.put(Globals.SSL_SESSION_ID_TOMCAT_ATTR, attr);
        }
        attr = coyoteRequest.getAttribute(Globals.SSL_SESSION_MGR_ATTR);
        if(attr != null) {
            attributes.put(Globals.SSL_SESSION_MGR_ATTR, attr);
        }
        attr = coyoteRequest.getAttribute(SSLSupport.PROTOCOL_VERSION_KEY);
        if(attr != null) {
            attributes.put(SSLSupport.PROTOCOL_VERSION_KEY, attr);
        }
        attr = attributes.get(name);
        sslAttributesParsed = true;
    }
    return attr;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:59,代码来源:Request.java


示例11: setSslSupport

import org.apache.tomcat.util.net.SSLSupport; //导入依赖的package包/类
@Override
public void setSslSupport(SSLSupport sslSupport) {
    // Should never reach this code but in case we do...
    throw new IllegalStateException(
            sm.getString("ajpprocessor.ssl.notsupported"));
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:7,代码来源:AbstractAjpProcessor.java


示例12: setSslSupport

import org.apache.tomcat.util.net.SSLSupport; //导入依赖的package包/类
@Override
public final void setSslSupport(SSLSupport sslSupport) {
    // NOOP
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:5,代码来源:UpgradeProcessor.java


示例13: setSslSupport

import org.apache.tomcat.util.net.SSLSupport; //导入依赖的package包/类
@Override
public void setSslSupport(SSLSupport sslSupport) {
    // NOOP for APR
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:5,代码来源:Http11AprProcessor.java


示例14: setSslSupport

import org.apache.tomcat.util.net.SSLSupport; //导入依赖的package包/类
/**
 * Set the SSL information for this HTTP connection.
 */
@Override
public void setSslSupport(SSLSupport sslSupport) {
    this.sslSupport = sslSupport;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:8,代码来源:Http11NioProcessor.java


示例15: getSSLSupport

import org.apache.tomcat.util.net.SSLSupport; //导入依赖的package包/类
@Override
public SSLSupport getSSLSupport(Socket s) {
    return new JSSESupport((SSLSocket) s);
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:5,代码来源:JSSEImplementation.java


示例16: setSSLSupport

import org.apache.tomcat.util.net.SSLSupport; //导入依赖的package包/类
/**
 * Set the SSL information for this HTTP connection.
 */
public void setSSLSupport(SSLSupport sslSupport) {
    this.sslSupport = sslSupport;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:7,代码来源:Http11Processor.java


示例17: getSSLSupport

import org.apache.tomcat.util.net.SSLSupport; //导入依赖的package包/类
/**
 * returns the SSLSupport attached to this socket.
 */
public SSLSupport getSSLSupport(Socket socket) {
    return new JSSESupport((SSLSocket)socket);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:7,代码来源:JSSEFactory.java



注:本文中的org.apache.tomcat.util.net.SSLSupport类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DelegateInvocationHandlerImpl类代码示例发布时间:2022-05-22
下一篇:
Java FileBasedIndexExtension类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap