Bug fixes for TLS authentication
Change-Id: I568273cb6fc5f0c95c15dc37ad17f51c2090917b
Showing
1 changed file
with
5 additions
and
2 deletions
... | @@ -394,8 +394,9 @@ public class AAA { | ... | @@ -394,8 +394,9 @@ public class AAA { |
394 | stateMachine.challengeState()); | 394 | stateMachine.challengeState()); |
395 | stateMachine.setRequestAuthenticator(radiusPayload.generateAuthCode()); | 395 | stateMachine.setRequestAuthenticator(radiusPayload.generateAuthCode()); |
396 | 396 | ||
397 | - sendRADIUSPacket(radiusPayload); | ||
398 | radiusPayload.addMessageAuthenticator(AAA.this.radiusSecret); | 397 | radiusPayload.addMessageAuthenticator(AAA.this.radiusSecret); |
398 | + sendRADIUSPacket(radiusPayload); | ||
399 | + | ||
399 | // TODO: this gets called on every fragment, should only be called at TLS-Start | 400 | // TODO: this gets called on every fragment, should only be called at TLS-Start |
400 | stateMachine.requestAccess(); | 401 | stateMachine.requestAccess(); |
401 | 402 | ||
... | @@ -473,7 +474,9 @@ public class AAA { | ... | @@ -473,7 +474,9 @@ public class AAA { |
473 | RADIUS inboundRadiusPacket; | 474 | RADIUS inboundRadiusPacket; |
474 | while (!done) { | 475 | while (!done) { |
475 | try { | 476 | try { |
476 | - DatagramPacket inboundBasePacket = new DatagramPacket(new byte[1000], 1000); | 477 | + byte[] packetBuffer = new byte[RADIUS.RADIUS_MAX_LENGTH]; |
478 | + DatagramPacket inboundBasePacket = | ||
479 | + new DatagramPacket(packetBuffer, packetBuffer.length); | ||
477 | DatagramSocket socket = radiusSocket; | 480 | DatagramSocket socket = radiusSocket; |
478 | socket.receive(inboundBasePacket); | 481 | socket.receive(inboundBasePacket); |
479 | log.info("Packet #{} received", packetNumber++); | 482 | log.info("Packet #{} received", packetNumber++); | ... | ... |
-
Please register or login to post a comment