Fix defect OpenDJ-6 : Return protocol error when LDAPv2 is disabled and connection is done with LDAPv2
Issue #OPENDJ-6 - Wrong error returned when LDAPv2 is disabled
| | |
| | | { |
| | | BindResponseProtocolOp responseOp = |
| | | new BindResponseProtocolOp( |
| | | LDAPResultCode.INAPPROPRIATE_AUTHENTICATION, |
| | | LDAPResultCode.PROTOCOL_ERROR, |
| | | ERR_LDAPV2_CLIENTS_NOT_ALLOWED.get()); |
| | | sendLDAPMessage(new LDAPMessage(message.getMessageID(), |
| | | responseOp)); |
| | |
| | | message = r.readMessage(); |
| | | BindResponseProtocolOp bindResponse = message.getBindResponseProtocolOp(); |
| | | assertEquals(bindResponse.getResultCode(), |
| | | LDAPResultCode.INAPPROPRIATE_AUTHENTICATION); |
| | | LDAPResultCode.PROTOCOL_ERROR); |
| | | } |
| | | finally |
| | | { |