public void testMalformedDigestWithCorrectLength()
throws Exception
{
InternalClientConnection conn =
new InternalClientConnection(new AuthenticationInfo());
BindOperation bindOperation =
conn.processSASLBind(DN.nullDN(), SASL_MECHANISM_CRAM_MD5, null);
assertEquals(bindOperation.getResultCode(),
ResultCode.SASL_BIND_IN_PROGRESS);
ByteString creds =
ByteString.valueOf("dn:cn=Directory Manager " +
"malformedcredswiththerightlength");
bindOperation =
conn.processSASLBind(DN.nullDN(), SASL_MECHANISM_CRAM_MD5, creds);
assertFalse(bindOperation.getResultCode() == ResultCode.SUCCESS);
}