FileDocCategorySizeDatePackage
CertificateVerify.javaAPI DocAndroid 1.5 API2887Wed May 06 22:41:06 BST 2009org.apache.harmony.xnet.provider.jsse

CertificateVerify

public class CertificateVerify extends org.apache.harmony.xnet.provider.jsse.Message
Represents certificate verify message
see
TLS 1.0 spec., 7.4.8. Certificate verify

Fields Summary
byte[]
signedHash
Signature
Constructors Summary
public CertificateVerify(byte[] hash)
Creates outbound message

param
hash

        if (hash == null || hash.length == 0) {
            fatalAlert(AlertProtocol.INTERNAL_ERROR,
                    "INTERNAL ERROR: incorrect certificate verify hash");
        }
        this.signedHash = hash;
        length = hash.length + 2;
    
public CertificateVerify(org.apache.harmony.xnet.provider.jsse.HandshakeIODataStream in, int length)
Creates inbound message

param
in
param
length
throws
IOException

        if (length == 0) {
            fatalAlert(AlertProtocol.DECODE_ERROR,
                    "DECODE ERROR: incorrect CertificateVerify");
        } else {
            if (in.readUint16() != length - 2) {
                fatalAlert(AlertProtocol.DECODE_ERROR,
                        "DECODE ERROR: incorrect CertificateVerify");
            }
            signedHash = in.read(length -2);
        }
        this.length = length;
    
Methods Summary
public intgetType()
Returns message type

return

        return Handshake.CERTIFICATE_VERIFY;
    
public voidsend(org.apache.harmony.xnet.provider.jsse.HandshakeIODataStream out)
Sends message

param
out

        if (signedHash.length != 0) {
            out.writeUint16(signedHash.length);
            out.write(signedHash);
        }