protected boolean doTunnelAuthentication(byte id, byte[] in) throws RadiusException, SSLException, NoSuchAlgorithmException { byte []out; if (in != null && in.length > 0) { out = tunnelAuth.doEAP(in); } else { out = tunnelAuth.eapResponse(EAP_IDENTITY, (byte)0, getUsername()); } putAppBuffer(out); return true; } }
protected boolean doTunnelAuthentication(byte id, byte[] in) throws RadiusException, SSLException, NoSuchAlgorithmException { byte []out; if (in != null && in.length > 0) { out = tunnelAuth.doEAP(in); } else { out = tunnelAuth.eapResponse(EAP_IDENTITY, (byte)0, getUsername()); } putAppBuffer(out); return true; } }
protected boolean doTunnelAuthentication(byte id, byte[] in) throws RadiusException, SSLException, NoSuchAlgorithmException { byte []out; if (in != null && in.length > 0) { out = tunnelAuth.doEAP(in); } else { out = tunnelAuth.eapResponse(EAP_IDENTITY, (byte)0, getUsername()); } putAppBuffer(out); return true; } }
/** * EAP requires a challenge/response. The request packet is reset with a new * RADIUS identifier and the EAP-Message is encoded. * @throws NoSuchAlgorithmException * @see net.jradius.client.auth.RadiusAuthenticator#processChallenge(net.jradius.packet.RadiusPacket, net.jradius.packet.RadiusPacket) */ public void processChallenge(RadiusPacket p, RadiusPacket r) throws RadiusException, NoSuchAlgorithmException { super.processChallenge(p, r); p.setIdentifier(-1); byte[] eapReply = AttributeFactory.assembleAttributeList(r.getAttributes(), AttributeDictionary.EAP_MESSAGE); byte[] eapMessage = doEAP(eapReply); RadiusAttribute a = p.findAttribute(AttributeDictionary.EAP_MESSAGE); if (a != null) p.removeAttribute(a); AttributeFactory.addToAttributeList(p.getAttributes(), AttributeDictionary.EAP_MESSAGE, eapMessage, p.isRecyclable()); RadiusLog.debug("Sending Challenge:\n" + p.toString()); }
/** * EAP requires a challenge/response. The request packet is reset with a new * RADIUS identifier and the EAP-Message is encoded. * @throws NoSuchAlgorithmException * @see net.jradius.client.auth.RadiusAuthenticator#processChallenge(net.jradius.packet.RadiusPacket, net.jradius.packet.RadiusPacket) */ public void processChallenge(RadiusPacket p, RadiusPacket r) throws RadiusException, NoSuchAlgorithmException { super.processChallenge(p, r); p.setIdentifier(-1); byte[] eapReply = AttributeFactory.assembleAttributeList(r.getAttributes(), AttributeDictionary.EAP_MESSAGE); byte[] eapMessage = doEAP(eapReply); RadiusAttribute a = p.findAttribute(AttributeDictionary.EAP_MESSAGE); if (a != null) p.removeAttribute(a); AttributeFactory.addToAttributeList(p.getAttributes(), AttributeDictionary.EAP_MESSAGE, eapMessage, p.isRecyclable()); RadiusLog.debug("Sending Challenge:\n" + p.toString()); }