DefaultChooser extends Chooser { @Override public List<ClientCertificateType> getClientCertificateTypes() { if (context.getClientCertificateTypes() != null) { return context.getClientCertificateTypes(); } else { return config.getClientCertificateTypes(); } } DefaultChooser(TlsContext context, Config config); @Override CertificateType getSelectedClientCertificateType(); @Override CertificateType getSelectedServerCertificateType(); @Override List<ECPointFormat> getClientSupportedPointFormats(); @Override SignatureAndHashAlgorithm getSelectedSigHashAlgorithm(); @Override List<NamedGroup> getClientSupportedNamedGroups(); @Override List<NamedGroup> getServerSupportedNamedGroups(); @Override List<ECPointFormat> getServerSupportedPointFormats(); @Override List<SignatureAndHashAlgorithm> getClientSupportedSignatureAndHashAlgorithms(); @Override List<SNIEntry> getClientSNIEntryList(); @Override ProtocolVersion getLastRecordVersion(); @Override byte[] getDistinguishedNames(); @Override List<ClientCertificateType> getClientCertificateTypes(); @Override MaxFragmentLength getMaxFragmentLength(); @Override HeartbeatMode getHeartbeatMode(); @Override boolean isUseExtendedMasterSecret(); @Override List<CompressionMethod> getClientSupportedCompressions(); @Override List<CipherSuite> getClientSupportedCiphersuites(); @Override List<SignatureAndHashAlgorithm> getServerSupportedSignatureAndHashAlgorithms(); @Override ProtocolVersion getSelectedProtocolVersion(); @Override ProtocolVersion getHighestClientProtocolVersion(); @Override ConnectionEndType getTalkingConnectionEnd(); @Override byte[] getMasterSecret(); @Override CipherSuite getSelectedCipherSuite(); @Override SSL2CipherSuite getSSL2CipherSuite(); @Override byte[] getPreMasterSecret(); @Override byte[] getClientRandom(); @Override byte[] getClientExtendedRandom(); @Override byte[] getServerExtendedRandom(); @Override byte[] getServerRandom(); @Override CompressionMethod getSelectedCompressionMethod(); @Override byte[] getClientSessionId(); @Override byte[] getServerSessionId(); @Override byte[] getDtlsCookie(); @Override TransportHandler getTransportHandler(); @Override PRFAlgorithm getPRFAlgorithm(); @Override byte[] getSessionTicketTLS(); @Override byte[] getSignedCertificateTimestamp(); @Override TokenBindingVersion getTokenBindingVersion(); @Override List<TokenBindingKeyParameters> getTokenBindingKeyParameters(); @Override BigInteger getServerDhModulus(); @Override BigInteger getServerDhGenerator(); @Override BigInteger getClientDhModulus(); @Override BigInteger getClientDhGenerator(); @Override BigInteger getDhServerPrivateKey(); @Override BigInteger getSRPModulus(); @Override byte[] getPSKIdentity(); @Override byte[] getPSKIdentityHint(); @Override BigInteger getPSKModulus(); @Override BigInteger getPSKServerPrivateKey(); @Override BigInteger getPSKServerPublicKey(); @Override BigInteger getPSKGenerator(); @Override BigInteger getSRPGenerator(); @Override BigInteger getSRPServerPrivateKey(); @Override BigInteger getSRPServerPublicKey(); @Override BigInteger getSRPClientPrivateKey(); @Override BigInteger getSRPClientPublicKey(); @Override byte[] getSRPPassword(); @Override byte[] getSRPIdentity(); @Override byte[] getSRPServerSalt(); @Override BigInteger getDhClientPrivateKey(); @Override BigInteger getDhServerPublicKey(); @Override BigInteger getDhClientPublicKey(); @Override BigInteger getServerEcPrivateKey(); @Override GOSTCurve getSelectedGostCurve(); @Override BigInteger getClientEcPrivateKey(); @Override NamedGroup getSelectedNamedGroup(); @Override NamedGroup getEcCertificateCurve(); @Override Point getClientEcPublicKey(); @Override Point getServerEcPublicKey(); @Override EllipticCurveType getEcCurveType(); @Override BigInteger getServerRsaModulus(); @Override BigInteger getClientRsaModulus(); @Override BigInteger getServerRSAPublicKey(); @Override BigInteger getClientRSAPublicKey(); @Override byte[] getCertificateRequestContext(); @Override byte[] getServerHandshakeTrafficSecret(); @Override byte[] getClientHandshakeTrafficSecret(); @Override byte[] getClientApplicationTrafficSecret(); @Override byte[] getServerApplicationTrafficSecret(); @Override RecordLayerType getRecordLayerType(); @Override BigInteger getClientRSAPrivateKey(); @Override BigInteger getServerRSAPrivateKey(); @Override Connection getConnection(); @Override ConnectionEndType getMyConnectionPeer(); @Override ProtocolVersion getHighestProtocolVersion(); @Override boolean isClientAuthentication(); @Override byte[] getLastHandledApplicationMessageData(); @Override byte[] getPsk(); @Override String getHttpsCookieValue(); @Override String getHttpsCookieName(); @Override List<PskSet> getPskSets(); @Override CipherSuite getEarlyDataCipherSuite(); @Override byte[] getClientEarlyTrafficSecret(); @Override byte[] getEarlySecret(); @Override byte[] getEarlyDataPsk(); @Override ConnectionEndType getConnectionEndType(); @Override List<KeyShareStoreEntry> getClientKeyShares(); @Override KeyShareStoreEntry getServerKeyShare(); @Override BigInteger getDsaClientPrivateKey(); @Override BigInteger getDsaClientPublicKey(); @Override BigInteger getDsaClientPrimeP(); @Override BigInteger getDsaClientPrimeQ(); @Override BigInteger getDsaClientGenerator(); @Override BigInteger getDsaServerPrivateKey(); @Override BigInteger getDsaServerPublicKey(); @Override BigInteger getDsaServerPrimeP(); @Override BigInteger getDsaServerPrimeQ(); @Override BigInteger getDsaServerGenerator(); @Override byte[] getHandshakeSecret(); @Override String getClientPWDUsername(); @Override byte[] getServerPWDSalt(); @Override String getPWDPassword(); @Override byte[] getEsniClientNonce(); @Override byte[] getEsniServerNonce(); @Override byte[] getEsniRecordBytes(); @Override EsniDnsKeyRecordVersion getEsniRecordVersion(); @Override byte[] getEsniRecordChecksum(); @Override List<KeyShareStoreEntry> getEsniServerKeyShareEntries(); @Override List<CipherSuite> getEsniServerCiphersuites(); @Override Integer getEsniPaddedLength(); @Override Long getEsniNotBefore(); @Override Long getEsniNotAfter();  }
@Test public void testGetClientCertificateTypes() { List<ClientCertificateType> typeList = new LinkedList<>(); typeList.add(ClientCertificateType.DSS_EPHEMERAL_DH_RESERVED); typeList.add(ClientCertificateType.DSS_FIXED_DH); typeList.add(ClientCertificateType.DSS_SIGN); typeList.add(ClientCertificateType.FORTEZZA_DMS_RESERVED); typeList.add(ClientCertificateType.RSA_EPHEMERAL_DH_RESERVED); typeList.add(ClientCertificateType.RSA_FIXED_DH); typeList.add(ClientCertificateType.RSA_SIGN); config.setClientCertificateTypes(typeList); assertTrue(config.getClientCertificateTypes().size() == 7); assertTrue(chooser.getClientCertificateTypes().size() == 7); context.setClientCertificateTypes(new LinkedList<ClientCertificateType>()); assertTrue(chooser.getClientCertificateTypes().isEmpty()); }