/** * Parse a {@link ServerSRPParams} from an {@link InputStream}. * * @param input * the {@link InputStream} to parse from. * @return a {@link ServerSRPParams} object. * @throws IOException */ public static ServerSRPParams parse(InputStream input) throws IOException { BigInteger N = TlsSRPUtils.readSRPParameter(input); BigInteger g = TlsSRPUtils.readSRPParameter(input); byte[] s = TlsUtils.readOpaque8(input); BigInteger B = TlsSRPUtils.readSRPParameter(input); return new ServerSRPParams(N, g, s, B); } }
/** * Parse a {@link ServerSRPParams} from an {@link InputStream}. * * @param input * the {@link InputStream} to parse from. * @return a {@link ServerSRPParams} object. * @throws IOException */ public static ServerSRPParams parse(InputStream input) throws IOException { BigInteger N = TlsSRPUtils.readSRPParameter(input); BigInteger g = TlsSRPUtils.readSRPParameter(input); byte[] s = TlsUtils.readOpaque8(input); BigInteger B = TlsSRPUtils.readSRPParameter(input); return new ServerSRPParams(N, g, s, B); } }
public void processClientKeyExchange(InputStream input) throws IOException { /* * RFC 5054 2.5.4: The server MUST abort the handshake with an "illegal_parameter" alert if * A % N = 0. */ try { this.srpPeerCredentials = SRP6Util.validatePublicValue(srpGroup.getN(), TlsSRPUtils.readSRPParameter(input)); } catch (CryptoException e) { throw new TlsFatalAlert(AlertDescription.illegal_parameter, e); } context.getSecurityParameters().srpIdentity = Arrays.clone(identity); }
public void processClientKeyExchange(InputStream input) throws IOException { /* * RFC 5054 2.5.4: The server MUST abort the handshake with an "illegal_parameter" alert if * A % N = 0. */ try { this.srpPeerCredentials = SRP6Util.validatePublicValue(srpGroup.getN(), TlsSRPUtils.readSRPParameter(input)); } catch (CryptoException e) { throw new TlsFatalAlert(AlertDescription.illegal_parameter, e); } context.getSecurityParameters().srpIdentity = Arrays.clone(identity); }