Examples of CredentialFrame


Examples of org.eclipse.jetty.spdy.frames.CredentialFrame

        }
    }

    private void onCredential()
    {
        CredentialFrame frame = new CredentialFrame(controlFrameParser.getVersion(), slot,
                Arrays.copyOf(proof, proof.length), certificates.toArray(new Certificate[certificates.size()]));
        controlFrameParser.onControlFrame(frame);
        reset();
    }
View Full Code Here

Examples of org.eclipse.jetty.spdy.frames.CredentialFrame

    }

    @Override
    public ByteBuffer generate(ControlFrame frame)
    {
        CredentialFrame credential = (CredentialFrame)frame;

        byte[] proof = credential.getProof();

        List<byte[]> certificates = serializeCertificates(credential.getCertificateChain());
        int certificatesLength = 0;
        for (byte[] certificate : certificates)
            certificatesLength += certificate.length;

        int frameBodyLength = 2 + 4 + proof.length + certificates.size() * 4 + certificatesLength;

        int totalLength = ControlFrame.HEADER_LENGTH + frameBodyLength;
        ByteBuffer buffer = getByteBufferPool().acquire(totalLength, Generator.useDirectBuffers);
        BufferUtil.clearToFill(buffer);
        generateControlFrameHeader(credential, frameBodyLength, buffer);

        buffer.putShort(credential.getSlot());
        buffer.putInt(proof.length);
        buffer.put(proof);
        for (byte[] certificate : certificates)
        {
            buffer.putInt(certificate.length);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.