/** * Creates a Type-2 message in response to the given Type-1 message. * * @param type1 The Type-1 message which this represents a response to. * @param challenge The challenge from the domain controller/server. * @param target The authentication target. */ public Type2Message(Type1Message type1, byte[] challenge, String target) { this(getDefaultFlags(type1), challenge, (type1 != null && target == null && type1.getFlag(NTLMSSP_REQUEST_TARGET)) ? getDefaultDomain() : target); }
byte[] secondayMasterKey; byte[] sessionResponseUserSessionKey; if (type3Message.getFlag(0x00000800))//anonymous flag
int protectionLevel = ntlm.getFlag ( NtlmFlags.NTLMSSP_NEGOTIATE_SEAL ) ? Security.PROTECTION_LEVEL_PRIVACY : ntlm.getFlag ( NtlmFlags.NTLMSSP_NEGOTIATE_SIGN ) ? Security.PROTECTION_LEVEL_INTEGRITY : Security.PROTECTION_LEVEL_CONNECT; return new AuthenticationVerifier ( NtlmAuthentication.AUTHENTICATION_SERVICE_NTLM, protectionLevel, contextId, ntlm.toByteArray () );