byte[] rec = readHandshake();
handshakes = concat(new byte[][] { handshakes, rec });
- DataInputStream stream = new DataInputStream(new ByteArrayInputStream(rec, 4, rec.length - 4));
switch(rec[0]) {
case 2: // ServerHello
if (server_cert == null) {
server_cert = this_cert;
TBSCertificateStructure tbs = server_cert.getTBSCertificate();
- X509Name subject = tbs.getSubject();
// gross hack to extract the Common Name so we can compare it to the server hostname
String CN = tbs.getSubject().toString() + " ";