src/java.base/share/classes/sun/security/ssl/HandshakeMessage.java

Print this page
rev 10521 : 8055723[core]: Replace concat String to append in StringBuilder parameters
Contributed-by: Otavio Santana <otaviojava@java.net>


1461                   case cct_ecdsa_sign:
1462                     s.print("ECDSA"); break;
1463                   case cct_rsa_fixed_ecdh:
1464                     s.print("Fixed ECDH (RSA sig)"); break;
1465                   case cct_ecdsa_fixed_ecdh:
1466                     s.print("Fixed ECDH (ECDSA sig)"); break;
1467                   default:
1468                     s.print("Type-" + (types[i] & 0xff)); break;
1469                 }
1470                 if (i != types.length - 1) {
1471                     s.print(", ");
1472                 }
1473             }
1474             s.println();
1475 
1476             if (protocolVersion.v >= ProtocolVersion.TLS12.v) {
1477                 StringBuilder sb = new StringBuilder();
1478                 boolean opened = false;
1479                 for (SignatureAndHashAlgorithm signAlg : algorithms) {
1480                     if (opened) {
1481                         sb.append(", " + signAlg.getAlgorithmName());
1482                     } else {
1483                         sb.append(signAlg.getAlgorithmName());
1484                         opened = true;
1485                     }
1486                 }
1487                 s.println("Supported Signature Algorithms: " + sb);
1488             }
1489 
1490             s.println("Cert Authorities:");
1491             if (authorities.length == 0) {
1492                 s.println("<Empty>");
1493             } else {
1494                 for (int i = 0; i < authorities.length; i++) {
1495                     authorities[i].print(s);
1496                 }
1497             }
1498         }
1499     }
1500 }
1501 




1461                   case cct_ecdsa_sign:
1462                     s.print("ECDSA"); break;
1463                   case cct_rsa_fixed_ecdh:
1464                     s.print("Fixed ECDH (RSA sig)"); break;
1465                   case cct_ecdsa_fixed_ecdh:
1466                     s.print("Fixed ECDH (ECDSA sig)"); break;
1467                   default:
1468                     s.print("Type-" + (types[i] & 0xff)); break;
1469                 }
1470                 if (i != types.length - 1) {
1471                     s.print(", ");
1472                 }
1473             }
1474             s.println();
1475 
1476             if (protocolVersion.v >= ProtocolVersion.TLS12.v) {
1477                 StringBuilder sb = new StringBuilder();
1478                 boolean opened = false;
1479                 for (SignatureAndHashAlgorithm signAlg : algorithms) {
1480                     if (opened) {
1481                         sb.append(", ").append(signAlg.getAlgorithmName());
1482                     } else {
1483                         sb.append(signAlg.getAlgorithmName());
1484                         opened = true;
1485                     }
1486                 }
1487                 s.println("Supported Signature Algorithms: " + sb);
1488             }
1489 
1490             s.println("Cert Authorities:");
1491             if (authorities.length == 0) {
1492                 s.println("<Empty>");
1493             } else {
1494                 for (int i = 0; i < authorities.length; i++) {
1495                     authorities[i].print(s);
1496                 }
1497             }
1498         }
1499     }
1500 }
1501