/** * Returns true if the cipher suite a TLS 1.3 cipher suite * * @return True if the Ciphersuite is supported in TLS 1.3 */ public boolean isTLS13() { return this.getByteValue()[0] == (byte) 0x13 && this.getByteValue()[1] != (byte) 0x00; }
private byte[] convertCipherSuites(List<CipherSuite> suiteList) { ByteArrayOutputStream stream = new ByteArrayOutputStream(); for (CipherSuite suite : suiteList) { try { stream.write(suite.getByteValue()); } catch (IOException ex) { throw new PreparationException( "Could not prepare ClientHelloMessage. Failed to write Ciphersuites into message", ex); } } return stream.toByteArray(); }
if (!removeCiphers.contains(cs)) { try { newCiphersBytes.write(cs.getByteValue()); } catch (IOException ex) { throw new WorkflowExecutionException("Could not write CipherSuite value to byte[]", ex);
private void prepareCipherSuite() { if (chooser.getConfig().isEnforceSettings()) { msg.setSelectedCipherSuite(chooser.getConfig().getDefaultSelectedCipherSuite().getByteValue()); } else { CipherSuite selectedSuite = null; for (CipherSuite suite : chooser.getConfig().getDefaultServerSupportedCiphersuites()) { if (chooser.getClientSupportedCiphersuites().contains(suite)) { selectedSuite = suite; break; } } if (selectedSuite == null) { throw new WorkflowExecutionException("No Ciphersuites in common"); } msg.setSelectedCipherSuite(selectedSuite.getByteValue()); } LOGGER.debug("SelectedCipherSuite: " + ArrayConverter.bytesToHexString(msg.getSelectedCipherSuite().getValue())); }
private void prepareCipherSuite() { if (chooser.getConfig().isEnforceSettings()) { msg.setSelectedCipherSuite(chooser.getConfig().getDefaultSelectedCipherSuite().getByteValue()); } else { CipherSuite selectedSuite = null; for (CipherSuite suite : chooser.getConfig().getDefaultServerSupportedCiphersuites()) { if (chooser.getClientSupportedCiphersuites().contains(suite)) { selectedSuite = suite; break; } } if (selectedSuite == null) { throw new WorkflowExecutionException("No Ciphersuites in common"); } msg.setSelectedCipherSuite(selectedSuite.getByteValue()); } LOGGER.debug("SelectedCipherSuite: " + ArrayConverter.bytesToHexString(msg.getSelectedCipherSuite().getValue())); }