From 6439bba5cc09d6febc59bdc9e0d9bc25f1f1eb18 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Wed, 01 Sep 2010 09:04:15 +0000
Subject: [PATCH] Various improvements:

---
 sdk/src/com/sun/opends/sdk/ldap/LDAPConnectionFactoryImpl.java |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/sdk/src/com/sun/opends/sdk/ldap/LDAPConnectionFactoryImpl.java b/sdk/src/com/sun/opends/sdk/ldap/LDAPConnectionFactoryImpl.java
index ce244bb..d56efdd 100644
--- a/sdk/src/com/sun/opends/sdk/ldap/LDAPConnectionFactoryImpl.java
+++ b/sdk/src/com/sun/opends/sdk/ldap/LDAPConnectionFactoryImpl.java
@@ -22,7 +22,7 @@
  * CDDL HEADER END
  *
  *
- *      Copyright 2009 Sun Microsystems, Inc.
+ *      Copyright 2009-2010 Sun Microsystems, Inc.
  */
 
 package com.sun.opends.sdk.ldap;
@@ -62,7 +62,7 @@
     implements ConnectionFactory
 {
 
-  @SuppressWarnings("unchecked")
+  @SuppressWarnings("rawtypes")
   private final class FutureResultImpl implements CompletionHandler<Connection>
   {
     private final FutureResultTransformer<Result, AsynchronousConnection> futureStartTLSResult;
@@ -123,6 +123,8 @@
           {
             final StartTLSExtendedRequest startTLS = Requests
                 .newStartTLSExtendedRequest(options.getSSLContext());
+            startTLS.setEnabledCipherSuites(options.getEnabledCipherSuites());
+            startTLS.setEnabledProtocols(options.getEnabledProtocols());
             return connection.extendedRequest(startTLS, handler);
           }
 
@@ -131,6 +133,8 @@
             try
             {
               connection.startTLS(options.getSSLContext(),
+                  options.getEnabledProtocols(),
+                  options.getEnabledCipherSuites(),
                   new EmptyCompletionHandler<SSLEngine>()
                   {
                     @Override
@@ -269,7 +273,7 @@
    */
   @Override
   public FutureResult<AsynchronousConnection> getAsynchronousConnection(
-      final ResultHandler<AsynchronousConnection> handler)
+      final ResultHandler<? super AsynchronousConnection> handler)
   {
     final FutureResultImpl future = new FutureResultImpl(handler);
 

--
Gitblit v1.10.0