@@ -56,7 +56,7 @@ public void handle(String pathInContext, org.eclipse.jetty.server.Request reques
5656 httpResponse .setHeader ("WWW-Authenticate" , "NTLM TlRMTVNTUAACAAAAAAAAACgAAAABggAAU3J2Tm9uY2UAAAAAAAAAAA==" );
5757
5858 } else if (authorization
59- .equals ("NTLM TlRMTVNTUAADAAAAGAAYAEgAAAAYABgAYAAAABQAFAB4AAAADAAMAIwAAAASABIAmAAAAAAAAACqAAAAAYIAAgUBKAoAAAAPrYfKbe/jRoW5xDxHeoxC1gBmfWiS5+iX4OAN4xBKG/IFPwfH3agtPEia6YnhsADTVQBSAFMAQQAtAE0ASQBOAE8AUgBaAGEAcABoAG8AZABMAGkAZwBoAHQAQwBpAHQAeQA =" )) {
59+ .equals ("NTLM TlRMTVNTUAADAAAAGAAYAEgAAAAYABgAYAAAABQAFAB4AAAADAAMAIwAAAASABIAmAAAAAAAAACqAAAAAYIAAgUBKAoAAAAPrYfKbe/jRoW5xDxHeoxC1gBmfWiS5+iX4OAN4xBKG/IFPwfH3agtPEia6YnhsADTVQBSAFMAQQAtAE0ASQBOAE8AUgBaAGEAcABoAG8AZABMAEkARwBIAFQAQwBJAFQAWQA =" )) {
6060 httpResponse .setStatus (200 );
6161 } else {
6262 httpResponse .setStatus (401 );
@@ -108,14 +108,14 @@ public void testGenerateType1Msg() {
108108 @ Test (expectedExceptions = NtlmEngineException .class )
109109 public void testGenerateType3MsgThrowsExceptionWhenChallengeTooShort () {
110110 NtlmEngine engine = new NtlmEngine ();
111- engine .generateType3Msg ("username" , "passowrd " , "localhost" , "workstattion " , Base64 .encode ("a" .getBytes ()));
111+ engine .generateType3Msg ("username" , "password " , "localhost" , "workstation " , Base64 .encode ("a" .getBytes ()));
112112 fail ("An NtlmEngineException must have occurred as challenge length is too short" );
113113 }
114114
115115 @ Test (expectedExceptions = NtlmEngineException .class )
116116 public void testGenerateType3MsgThrowsExceptionWhenChallengeDoesNotFollowCorrectFormat () {
117117 NtlmEngine engine = new NtlmEngine ();
118- engine .generateType3Msg ("username" , "passowrd " , "localhost" , "workstattion " , Base64 .encode ("challenge" .getBytes ()));
118+ engine .generateType3Msg ("username" , "password " , "localhost" , "workstation " , Base64 .encode ("challenge" .getBytes ()));
119119 fail ("An NtlmEngineException must have occurred as challenge format is not correct" );
120120 }
121121
@@ -128,7 +128,7 @@ public void testGenerateType3MsgThworsExceptionWhenType2IndicatorNotPresent() {
128128 buf .writeByte (3 ).writeByte (0 ).writeByte (0 ).writeByte (0 );
129129 buf .writeBytes ("challenge" .getBytes ());
130130 NtlmEngine engine = new NtlmEngine ();
131- engine .generateType3Msg ("username" , "passowrd " , "localhost" , "workstation" , Base64 .encode (ByteBufUtils .byteBuf2Bytes (buf )));
131+ engine .generateType3Msg ("username" , "password " , "localhost" , "workstation" , Base64 .encode (ByteBufUtils .byteBuf2Bytes (buf )));
132132 fail ("An NtlmEngineException must have occurred as type 2 indicator is incorrect" );
133133 }
134134
@@ -145,7 +145,7 @@ public void testGenerateType3MsgThrowsExceptionWhenUnicodeSupportNotIndicated()
145145 buf .writeByte (0 ).writeByte (0 ).writeByte (0 );
146146 buf .writeLong (1 );// challenge
147147 NtlmEngine engine = new NtlmEngine ();
148- engine .generateType3Msg ("username" , "passowrd " , "localhost" , "workstattion " , Base64 .encode (ByteBufUtils .byteBuf2Bytes (buf )));
148+ engine .generateType3Msg ("username" , "password " , "localhost" , "workstation " , Base64 .encode (ByteBufUtils .byteBuf2Bytes (buf )));
149149 fail ("An NtlmEngineException must have occurred as unicode support is not indicated" );
150150 }
151151
@@ -168,10 +168,10 @@ public void testGenerateType3Msg() {
168168 buf .writeByte (0 ).writeByte (0 ).writeByte (0 );
169169 buf .writeLong (1 );// challenge
170170 NtlmEngine engine = new NtlmEngine ();
171- String type3Msg = engine .generateType3Msg ("username" , "passowrd " , "localhost" , "workstattion " ,
171+ String type3Msg = engine .generateType3Msg ("username" , "password " , "localhost" , "workstation " ,
172172 Base64 .encode (ByteBufUtils .byteBuf2Bytes (buf )));
173173 assertEquals (type3Msg ,
174- "TlRMTVNTUAADAAAAGAAYAEgAAAAYABgAYAAAABIAEgB4AAAAEAAQAIoAAAAYABgAmgAAAAAAAACyAAAAAQAAAgUBKAoAAAAPmr/wN76Y0WPoSFkHghgpi0yh7/UexwVlCeoo1CQEl9d2alfPRld8KYeOkS0GdTuMTABPAEMAQQBMAEgATwBTAFQAdQBzAGUAcgBuAGEAbQBlAHcAbwByAGsAcwB0AGEAdAB0AGkAbwBuAA= =" ,
174+ "TlRMTVNTUAADAAAAGAAYAEgAAAAYABgAYAAAABIAEgB4AAAAEAAQAIoAAAAWABYAmgAAAAAAAACwAAAAAQAAAgUBKAoAAAAP1g6lqqN1HZ0wSSxeQ5riQkyh7/UexwVlCPQm0SHU2vsDQm2wM6NbT2zPonPzLJL0TABPAEMAQQBMAEgATwBTAFQAdQBzAGUAcgBuAGEAbQBlAFcATwBSAEsAUwBUAEEAVABJAE8ATgA =" ,
175175 "Incorrect type3 message generated" );
176176 }
177177
0 commit comments