@Test public void testAdjustTLSContextWithoutComputations() { ECDHEServerKeyExchangeMessage message = new ECDHEServerKeyExchangeMessage(); message.setCurveType(EllipticCurveType.NAMED_CURVE.getValue()); message.setNamedGroup(NamedGroup.SECP256R1.getValue()); message.setPublicKey(ArrayConverter .hexStringToByteArray("04f660a88e9dae015684be56c25610f9c62cf120cb075eea60c560e5e6dd5d10ef6e391d7213a298985470dc2268949317ce24940d474a0c8386ab13b312ffc104")); message.setPublicKeyLength(65); handler.adjustTLSContext(message); assertNull(context.getPreMasterSecret()); assertNull(context.getMasterSecret()); }
@Override public void adjustTLSContext(ECDHEServerKeyExchangeMessage message) { adjustECParameter(message); if (message.getComputations() != null) { tlsContext.setServerEcPrivateKey(message.getComputations().getPrivateKey().getValue()); } }
ECDHEServerKeyExchangeHandler extends ServerKeyExchangeHandler<T> { @Override public void adjustTLSContext(ECDHEServerKeyExchangeMessage message) { adjustECParameter(message); if (message.getComputations() != null) { tlsContext.setServerEcPrivateKey(message.getComputations().getPrivateKey().getValue()); } } }
ECDHEServerKeyExchangeHandler extends ServerKeyExchangeHandler<T> { @Override public void adjustTLSContext(ECDHEServerKeyExchangeMessage message) { adjustECParameter(message); if (message.getComputations() != null) { tlsContext.setServerEcPrivateKey(message.getComputations().getPrivateKey().getValue()); } } ECDHEServerKeyExchangeHandler(TlsContext tlsContext); }
ECDHEServerKeyExchangeHandler extends ServerKeyExchangeHandler<T> { @Override public void adjustTLSContext(ECDHEServerKeyExchangeMessage message) { adjustECParameter(message); if (message.getComputations() != null) { tlsContext.setServerEcPrivateKey(message.getComputations().getPrivateKey().getValue()); } } ECDHEServerKeyExchangeHandler(TlsContext tlsContext); @Override ECDHEServerKeyExchangeParser getParser(byte[] message, int pointer); @Override ECDHEServerKeyExchangePreparator getPreparator(ECDHEServerKeyExchangeMessage message); @Override ECDHEServerKeyExchangeSerializer getSerializer(ECDHEServerKeyExchangeMessage message); @Override void adjustTLSContext(ECDHEServerKeyExchangeMessage message); }
ECDHEServerKeyExchangeHandler extends ServerKeyExchangeHandler<T> { @Override public void adjustTLSContext(ECDHEServerKeyExchangeMessage message) { adjustECParameter(message); if (message.getComputations() != null) { tlsContext.setServerEcPrivateKey(message.getComputations().getPrivateKey().getValue()); } } ECDHEServerKeyExchangeHandler(TlsContext tlsContext); @Override ECDHEServerKeyExchangeParser getParser(byte[] message, int pointer); @Override ECDHEServerKeyExchangePreparator getPreparator(ECDHEServerKeyExchangeMessage message); @Override ECDHEServerKeyExchangeSerializer getSerializer(ECDHEServerKeyExchangeMessage message); @Override void adjustTLSContext(ECDHEServerKeyExchangeMessage message);  }