Package javax.net.ssl

Examples of javax.net.ssl.KeyManager


    }

    protected static KeyManager[] getKeyManagersWithCertAlias(TLSClientParameters tlsClientParameters,
                                                      KeyManager[] keyManagers) throws GeneralSecurityException {
        if (tlsClientParameters.getCertAlias() != null) {
            KeyManager ret[] = new KeyManager[keyManagers.length]
            for (int idx = 0; idx < keyManagers.length; idx++) {
                if (keyManagers[idx] instanceof X509KeyManager) {
                    try {
                        ret[idx] = new AliasedX509ExtendedKeyManager(tlsClientParameters.getCertAlias(),
                                                                             (X509KeyManager)keyManagers[idx]);
View Full Code Here


  public PlatformLayerHttpRequest(PlatformLayerHttpTransport client, HttpMethod method, URI uri,
      List<String> trustKeys) throws PlatformLayerClientException {
    this.client = client;

    KeyManager keyManager = null;
    TrustManager trustManager = null;
    HostnameVerifier hostnameVerifier = null;

    if (trustKeys != null) {
      trustManager = new PublicKeyTrustManager(trustKeys);
View Full Code Here

    CertificateAndKey certificateAndKey = encryptionStore.getCertificateAndKey(cert);

    HostnameVerifier hostnameVerifier = null;

    KeyManager keyManager = new SimpleClientCertificateKeyManager(certificateAndKey);

    TrustManager trustManager = null;

    String trustKeys = configuration.lookup("auth.system.ssl.keys", null);
View Full Code Here

    String keystoneUserUrl = configuration.lookup("auth.user.url", "https://127.0.0.1:"
        + PORT_PLATFORMLAYER_AUTH_USER + "/v2.0/");

    HostnameVerifier hostnameVerifier = null;

    KeyManager keyManager = null;

    TrustManager trustManager = null;

    String trustKeys = configuration.lookup("auth.user.ssl.keys", null);
View Full Code Here

    auth.setCertificateCredentials(certificateCredentials);

    AuthenticateRequest request = new AuthenticateRequest();
    request.setAuth(auth);

    final KeyManager keyManager = new SimpleClientCertificateKeyManager(privateKey, certificateChain);

    for (int i = 0; i < 2; i++) {
      AuthenticateResponse response;
      try {
        RestfulRequest<AuthenticateResponse> httpRequest = httpClient.buildRequest(HttpMethod.POST,
View Full Code Here

      List<String> trustKeys) {
    this.username = username;
    this.password = password;

    HostnameVerifier hostnameVerifier = null;
    KeyManager keyManager = null;
    TrustManager trustManager = null;

    if (trustKeys != null) {
      trustManager = new PublicKeyTrustManager(trustKeys);
View Full Code Here

      }
    }

    SchemeSocketFactory schemeSocketFactory;
    try {
      KeyManager keyManager = new SimpleClientCertificateKeyManager(certificateAndKey);

      TrustManager trustManager;
      X509HostnameVerifier hostnameVerifier;
      if (trustKeys != null) {
        trustManager = new PublicKeyTrustManager(trustKeys);
View Full Code Here

        kmfactory.init(keystore, keyPassword);
        final KeyManager[] kms =  kmfactory.getKeyManagers();
        if (kms != null) {
            if (aliasStrategy != null) {
                for (int i = 0; i < kms.length; i++) {
                    final KeyManager km = kms[i];
                    if (km instanceof X509KeyManager) {
                        kms[i] = new KeyManagerDelegate(
                                (X509KeyManager) km, aliasStrategy);
                    }
                }
View Full Code Here

        return fnrobj.getFnr();
    }

    private SSLSocketFactory getSSLFactory() throws GeneralSecurityException, IOException {

        final KeyManager km[];
        final TrustManager tm[];

        // Put the key and certs in the user keystore (if available)
        if (this.ks != null) {
            final KeyManagerFactory kmf;
View Full Code Here

    }

    protected static KeyManager[] getKeyManagersWithCertAlias(TLSClientParameters tlsClientParameters,
                                                      KeyManager[] keyManagers) throws GeneralSecurityException {
        if (tlsClientParameters.getCertAlias() != null) {
            KeyManager ret[] = new KeyManager[keyManagers.length]
            for (int idx = 0; idx < keyManagers.length; idx++) {
                if (keyManagers[idx] instanceof X509KeyManager) {
                    try {
                        ret[idx] = new AliasedX509ExtendedKeyManager(tlsClientParameters.getCertAlias(),
                                                                             (X509KeyManager)keyManagers[idx]);
View Full Code Here

TOP

Related Classes of javax.net.ssl.KeyManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.