/** * Writes the CertificateLength of the CertificateMessage into the final * byte[] */ private void writeCertificatesListLength(CertificateMessage msg) { appendInt(msg.getCertificatesListLength().getValue(), HandshakeByteLength.CERTIFICATES_LENGTH); LOGGER.debug("certificatesListLength: " + msg.getCertificatesListLength().getValue()); }
/** * Reads the next bytes as the CertificateLength and writes them in the * message * * @param msg * Message to write in */ private void parseCertificatesListLength(CertificateMessage msg) { msg.setCertificatesListLength(parseIntField(HandshakeByteLength.CERTIFICATES_LENGTH)); LOGGER.debug("CertificatesListLength: " + msg.getCertificatesListLength()); }
/** * Reads the next bytes as the CertificateBytes and writes them in the * message * * @param msg * Message to write in */ private void parseCertificateListBytes(CertificateMessage msg) { msg.setCertificatesListBytes(parseByteArrayField(msg.getCertificatesListLength().getValue())); LOGGER.debug("CertificatesListBytes: " + ArrayConverter.bytesToHexString(msg.getCertificatesListBytes())); }
int position = 0; List<CertificatePair> pairList = new LinkedList<>(); while (position < msg.getCertificatesListLength().getValue()) { CertificatePairParser parser = new CertificatePairParser(position, msg.getCertificatesListBytes() .getValue());
cert = parseCertificate(message.getCertificatesListLength().getValue(), message.getCertificatesListBytes() .getValue());