From 27442dd0dcfec710f241d6d53574a6fdafb6f92a Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Mon, 20 Sep 2010 21:06:56 +0000
Subject: [PATCH] Added QOP, cipher, and other config parameters to the Digest-MD5 and GSSAPI SASL bind request objects.
---
sdk/src/org/opends/sdk/requests/GSSAPISASLBindRequest.java | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 118 insertions(+), 0 deletions(-)
diff --git a/sdk/src/org/opends/sdk/requests/GSSAPISASLBindRequest.java b/sdk/src/org/opends/sdk/requests/GSSAPISASLBindRequest.java
index 78b8742..e3d37f7 100644
--- a/sdk/src/org/opends/sdk/requests/GSSAPISASLBindRequest.java
+++ b/sdk/src/org/opends/sdk/requests/GSSAPISASLBindRequest.java
@@ -66,6 +66,29 @@
/**
+ * Supported quality-of-protection options.
+ */
+ public static enum QOPOption
+ {
+ /**
+ * Authentication only.
+ */
+ AUTH,
+
+ /**
+ * Authentication plus integrity protection.
+ */
+ AUTH_INT,
+
+ /**
+ * Authentication plus integrity and confidentiality protection.
+ */
+ AUTH_CONF
+ }
+
+
+
+ /**
* {@inheritDoc}
*/
GSSAPISASLBindRequest addControl(Control control)
@@ -197,6 +220,52 @@
/**
+ * Returns the quality-of-protection options to use.
+ * The order of the list specifies the preference order.
+ *
+ * @return The list of quality-of-protection options to use.
+ */
+ QOPOption[] getQOP();
+
+
+
+ /**
+ * Returns whether the server must authenticate to the client.
+ * The default is {@code false}.
+ *
+ * @return {@code true} if the server must authenticate
+ * to the client or {@code false} otherwise.
+ */
+ boolean getServerAuth();
+
+
+
+ /**
+ * Returns the maximum size of the receive buffer in bytes. The
+ * default is 65536. The actual maximum number of bytes will
+ * be the minimum of this number and the peer's maximum send
+ * buffer size.
+ *
+ * @return The maximum size of the receive buffer in bytes.
+ */
+ int getMaxReceiveBufferSize();
+
+
+
+ /**
+ * Returns the maximum size of the send buffer in bytes. The
+ * default is 65536. The actual maximum number of bytes will
+ * be the minimum of this number and the peer's maximum receive
+ * buffer size.
+ *
+ * @return The maximum size of the send buffer in bytes.
+ */
+ int getMaxSendBufferSize();
+
+
+
+
+ /**
* Sets the authentication ID of the user, which should be the user's Kerberos
* principal. The authentication ID usually has the form "dn:" immediately
* followed by the distinguished name of the user, or "u:" followed by a user
@@ -327,4 +396,53 @@
*/
GSSAPISASLBindRequest setSubject(Subject subject) throws NullPointerException;
+
+
+ /**
+ * Specifies the quality-of-protection options to use.
+ * The order of the list specifies the preference order.
+ *
+ * @param qopOptions The list of quality-of-protection options to
+ * use.
+ * @return This bind request.
+ */
+ GSSAPISASLBindRequest setQOP(QOPOption... qopOptions);
+
+
+
+ /**
+ * Specifies whether the server must authenticate to the client.
+ *
+ * @param serverAuth {@code true} if the server must authenticate
+ * to the client or {@code false} otherwise.
+ * @return This bind request.
+ */
+ GSSAPISASLBindRequest setServerAuth(boolean serverAuth);
+
+
+
+ /**
+ * Specifies the maximum size of the receive buffer in bytes.
+ * The actual maximum number of bytes will
+ * be the minimum of this number and the peer's maximum send
+ * buffer size.
+ *
+ * @param maxBuffer The maximum size of the receive buffer in bytes.
+ * @return This bind request.
+ */
+ GSSAPISASLBindRequest setMaxReceiveBufferSize(int maxBuffer);
+
+
+
+ /**
+ * Specifies the maximum size of the send buffer in bytes.
+ * The actual maximum number of bytes will
+ * be the minimum of this number and the peer's maximum receive
+ * buffer size.
+ *
+ * @param maxBuffer The maximum size of the send buffer in bytes.
+ * @return This bind request.
+ */
+ GSSAPISASLBindRequest setMaxSendBufferSize(int maxBuffer);
+
}
--
Gitblit v1.10.0