/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 5091174
* @summary DigestMD5Server does not return correct value for getNegotiatedProperty(Sasl.QOP)
*/
public final class CheckNegotiatedQOPs {
private final int caseNumber;
.execute(false);
.execute(false);
.execute(false);
.execute(false);
.execute(false);
.execute(true);
.execute(false);
.execute(true);
.execute(true);
.execute(false);
.execute(true);
.execute(true);
}
this.caseNumber = caseNumber;
this.requestedQOPs = requestedQOPs;
this.supportedQOPs = supportedQOPs;
}
try {
if (expectException) {
throw new
Exception("An exception was expected but none was thrown");
}
} catch (SaslException e) {
if (expectException) {
return;
} else {
throw e;
}
}
}
if (callbacks[i] instanceof NameCallback) {
} else if (callbacks[i] instanceof PasswordCallback) {
} else if (callbacks[i] instanceof RealmCallback) {
//cb.setText(getInput(cb.getPrompt()));
} else if (callbacks[i] instanceof AuthorizeCallback) {
cb.setAuthorized(true);
} else {
throw new UnsupportedCallbackException(callbacks[i]);
}
}
}
/**
* In real world apps, this would typically be a TextComponent or
* similar widget.
*/
return "dummy-value";
}
}
private final class SampleClient {
if (requestedQOPs != null) {
}
}
return saslClient;
}
byte[] challenge;
byte[] response;
while (! saslClient.isComplete()) {
}
}
}
private final class SampleServer {
if (supportedQOPs != null) {
}
properties, new SampleCallbackHandler());
}
return saslServer;
}
if (saslServer.isComplete()) {
throw new SaslException ("Server is already complete");
}
}
}
}