當前位置: 首頁>>代碼示例>>Java>>正文


Java SSLEncryptionParameters類代碼示例

本文整理匯總了Java中org.alfresco.encryption.ssl.SSLEncryptionParameters的典型用法代碼示例。如果您正苦於以下問題:Java SSLEncryptionParameters類的具體用法?Java SSLEncryptionParameters怎麽用?Java SSLEncryptionParameters使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SSLEncryptionParameters類屬於org.alfresco.encryption.ssl包,在下文中一共展示了SSLEncryptionParameters類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: HttpClientFactory

import org.alfresco.encryption.ssl.SSLEncryptionParameters; //導入依賴的package包/類
public HttpClientFactory(SecureCommsType secureCommsType, SSLEncryptionParameters sslEncryptionParameters,
        KeyResourceLoader keyResourceLoader, KeyStoreParameters keyStoreParameters,
        MD5EncryptionParameters encryptionParameters, String host, int port, int sslPort, int maxTotalConnections,
        int maxHostConnections, int socketTimeout)
{
    this.secureCommsType = secureCommsType;
    this.sslEncryptionParameters = sslEncryptionParameters;
    this.keyResourceLoader = keyResourceLoader;
    this.keyStoreParameters = keyStoreParameters;
    this.encryptionParameters = encryptionParameters;
    this.host = host;
    this.port = port;
    this.sslPort = sslPort;
    this.maxTotalConnections = maxTotalConnections;
    this.maxHostConnections = maxHostConnections;
    this.socketTimeout = socketTimeout;
    init();
}
 
開發者ID:Alfresco,項目名稱:alfresco-core,代碼行數:19,代碼來源:HttpClientFactory.java

示例2: getRepoClient

import org.alfresco.encryption.ssl.SSLEncryptionParameters; //導入依賴的package包/類
protected AlfrescoHttpClient getRepoClient(KeyResourceLoader keyResourceLoader)
{
    // TODO i18n
    KeyStoreParameters keyStoreParameters = new KeyStoreParameters("SSL Key Store", sslKeyStoreType,
                sslKeyStoreProvider, sslKeyStorePasswordFileLocation, sslKeyStoreLocation);
    KeyStoreParameters trustStoreParameters = new KeyStoreParameters("SSL Trust Store", sslTrustStoreType,
                sslTrustStoreProvider, sslTrustStorePasswordFileLocation, sslTrustStoreLocation);
    SSLEncryptionParameters sslEncryptionParameters = new SSLEncryptionParameters(keyStoreParameters,
                trustStoreParameters);

    HttpClientFactory httpClientFactory = new HttpClientFactory(SecureCommsType.getType(secureCommsType),
                sslEncryptionParameters, keyResourceLoader, null, null, alfrescoHost, alfrescoPort,
                alfrescoPortSSL, maxTotalConnections, maxHostConnections, socketTimeout);
    // TODO need to make port configurable depending on secure comms, or just make redirects work
    AlfrescoHttpClient repoClient = httpClientFactory.getRepoClient(alfrescoHost, alfrescoPortSSL);
    repoClient.setBaseUrl(baseUrl);
    return repoClient;
}
 
開發者ID:Alfresco,項目名稱:alfresco-solrclient,代碼行數:19,代碼來源:SOLRAPIClientFactory.java

示例3: setUp

import org.alfresco.encryption.ssl.SSLEncryptionParameters; //導入依賴的package包/類
@Override
public void setUp() throws Exception
{
    KeyStoreParameters keyStoreParameters = new KeyStoreParameters("SSL Key Store", "JCEKS", null, "ssl-keystore-passwords.properties", "ssl.keystore");
    KeyStoreParameters trustStoreParameters = new KeyStoreParameters("SSL Trust Store", "JCEKS", null, "ssl-truststore-passwords.properties", "ssl.truststore");
 
    SSLEncryptionParameters sslEncryptionParameters = new SSLEncryptionParameters(keyStoreParameters, trustStoreParameters);
    
    ClasspathKeyResourceLoader keyResourceLoader = new ClasspathKeyResourceLoader();
    HttpClientFactory httpClientFactory = new HttpClientFactory(SecureCommsType.getType("https"), sslEncryptionParameters, keyResourceLoader, null, null, "localhost", 8080,
            8443, 40, 40, 0);
    
    StringBuilder sb = new StringBuilder();
    sb.append("/solr/admin/cores");
    this.baseUrl = sb.toString();

    httpClient = httpClientFactory.getHttpClient();
    HttpClientParams params = httpClient.getParams();
    params.setBooleanParameter(HttpClientParams.PREEMPTIVE_AUTHENTICATION, true);
    httpClient.getState().setCredentials(new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT), new UsernamePasswordCredentials("admin", "admin"));
}
 
開發者ID:Alfresco,項目名稱:community-edition-old,代碼行數:22,代碼來源:EmbeddedSolrTest.java

示例4: getRepoClient

import org.alfresco.encryption.ssl.SSLEncryptionParameters; //導入依賴的package包/類
protected AlfrescoHttpClient getRepoClient(ClasspathKeyResourceLoader keyResourceLoader)
    {
        // TODO i18n
        KeyStoreParameters keyStoreParameters = new KeyStoreParameters("SSL Key Store", "JCEKS", null, "ssl-keystore-passwords.properties", "ssl.repo.client.keystore");
        KeyStoreParameters trustStoreParameters = new KeyStoreParameters("SSL Trust Store", "JCEKS", null, "ssl-truststore-passwords.properties", "ssl.repo.client.truststore");
 
        SSLEncryptionParameters sslEncryptionParameters = new SSLEncryptionParameters(keyStoreParameters, trustStoreParameters);

    	//MD5HttpClientFactory httpClientFactory = new MD5HttpClientFactory();
//        HttpClientFactory httpClientFactory = new HttpClientFactory(SecureComm);
//
//        invalidKeyEncryptionService = new EncryptionService("127.0.0.1", 8080, keyResourceLoader, keyStoreParameters, encryptionParameters);
//        AlfrescoHttpClient repoClient = httpClientFactory.getAlfrescoHttpClient("127.0.0.1", 8080, invalidKeyEncryptionService);
//        //SecureHttpClient repoClient = new SecureHttpClient(httpClientFactory, "127.0.0.1", 8080, invalidKeyEncryptionService);
//        invalidKeyClient = new SOLRAPIClient(repoClient, model.getDictionaryService(), namespaceDAO);
//
//        keyStoreParameters.setLocation("org/alfresco/solr/client/.keystore");
//        tamperWithEncryptionService = new TamperWithEncryptionService("127.0.0.1", 8080, keyResourceLoader, keyStoreParameters, encryptionParameters);
//        repoClient = httpClientFactory.getAlfrescoHttpClient("127.0.0.1", 8080, tamperWithEncryptionService);
////        repoClient = new SecureHttpClient(httpClientFactory, "127.0.0.1", 8080, tamperWithEncryptionService);
//        tamperWithClient = new SOLRAPIClient(repoClient, model.getDictionaryService(), namespaceDAO);
//        
//        encryptionParameters.setMessageTimeout(30*1000);
//        keyStoreParameters.setLocation("workspace-SpacesStore/conf/.keystore");
//        EncryptionService encryptionService = new EncryptionService("127.0.0.1", 8080, keyResourceLoader, keyStoreParameters, encryptionParameters);
//        repoClient = httpClientFactory.getAlfrescoHttpClient("127.0.0.1", 8080, encryptionService);
        //repoClient = new SecureHttpClient(httpClientFactory, "127.0.0.1", 8080, encryptionService);
//        client = new SOLRAPIClient(repoClient, model.getDictionaryService(), namespaceDAO);

        HttpClientFactory httpClientFactory = new HttpClientFactory(SecureCommsType.getType("https"), sslEncryptionParameters, keyResourceLoader, null, null, "localhost", 8080,
                8443, 40, 40, 0);
        // TODO need to make port configurable depending on secure comms, or just make redirects
        // work
        return httpClientFactory.getRepoClient("localhost", 8443);
    }
 
開發者ID:Alfresco,項目名稱:alfresco-solrclient,代碼行數:36,代碼來源:SOLRAPIClientTest.java

示例5: getRepoClient

import org.alfresco.encryption.ssl.SSLEncryptionParameters; //導入依賴的package包/類
protected AlfrescoHttpClient getRepoClient(SolrKeyResourceLoader keyResourceLoader)
{
    // TODO i18n
    KeyStoreParameters keyStoreParameters = new KeyStoreParameters("SSL Key Store", sslKeyStoreType, sslKeyStoreProvider, sslKeyStorePasswordFileLocation, sslKeyStoreLocation);
    KeyStoreParameters trustStoreParameters = new KeyStoreParameters("SSL Trust Store", sslTrustStoreType, sslTrustStoreProvider, sslTrustStorePasswordFileLocation, sslTrustStoreLocation);
    SSLEncryptionParameters sslEncryptionParameters = new SSLEncryptionParameters(keyStoreParameters, trustStoreParameters);
    
    HttpClientFactory httpClientFactory = new HttpClientFactory(SecureCommsType.getType(secureCommsType),
            sslEncryptionParameters, keyResourceLoader, null, null, alfrescoHost, alfrescoPort, alfrescoPortSSL, maxTotalConnections, maxHostConnections, socketTimeout);
    // TODO need to make port configurable depending on secure comms, or just make redirects
    // work
    AlfrescoHttpClient repoClient = httpClientFactory.getRepoClient(alfrescoHost, alfrescoPortSSL);
    repoClient.setBaseUrl(baseUrl);
    return repoClient;
}
 
開發者ID:Alfresco,項目名稱:community-edition-old,代碼行數:16,代碼來源:CoreTracker.java

示例6: setSSLEncryptionParameters

import org.alfresco.encryption.ssl.SSLEncryptionParameters; //導入依賴的package包/類
public void setSSLEncryptionParameters(SSLEncryptionParameters sslEncryptionParameters)
{
    this.sslEncryptionParameters = sslEncryptionParameters;
}
 
開發者ID:Alfresco,項目名稱:alfresco-core,代碼行數:5,代碼來源:HttpClientFactory.java


注:本文中的org.alfresco.encryption.ssl.SSLEncryptionParameters類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。