protected void checkReceivedChangeCipherSpec(boolean expected) throws IOException { if (expected != receivedChangeCipherSpec) { throw new TlsFatalAlert(AlertDescription.unexpected_message); } }
public byte[] generatePremasterSecret() throws IOException { if (this.premasterSecret == null) { throw new TlsFatalAlert(AlertDescription.internal_error); } byte[] tmp = this.premasterSecret; this.premasterSecret = null; return tmp; }
public TlsAuthentication getAuthentication() throws IOException { /* * Note: This method is not called unless a server certificate is sent, which may be the * case e.g. for SRP_DSS or SRP_RSA key exchange. */ throw new TlsFatalAlert(AlertDescription.internal_error); }
protected TlsSignerCredentials getRSASignerCredentials() throws IOException { throw new TlsFatalAlert(AlertDescription.internal_error); }
public void skipServerCredentials() throws IOException { if (keyExchange != KeyExchangeAlgorithm.ECDH_anon) { throw new TlsFatalAlert(AlertDescription.unexpected_message); } }
public void notifySecureRenegotiation(boolean secureRenegotiation) throws IOException { if (!secureRenegotiation) { /* * RFC 5746 3.4/3.6. In this case, some clients/servers may want to terminate the handshake instead * of continuing; see Section 4.1/4.3 for discussion. */ throw new TlsFatalAlert(AlertDescription.handshake_failure); } }
public void notifyClientCertificate(Certificate clientCertificate) throws IOException { throw new TlsFatalAlert(AlertDescription.internal_error); }
public TlsCipher createCipher(TlsContext context, int encryptionAlgorithm, int macAlgorithm) throws IOException { throw new TlsFatalAlert(AlertDescription.internal_error); } }
public TlsAuthentication getAuthentication() throws IOException { /* * Note: This method is not called unless a server certificate is sent, which may be the * case e.g. for RSA_PSK key exchange. */ throw new TlsFatalAlert(AlertDescription.internal_error); }
public void skipServerCredentials() throws IOException { if (keyExchange == KeyExchangeAlgorithm.RSA_PSK) { throw new TlsFatalAlert(AlertDescription.unexpected_message); } }
public TlsAuthentication getAuthentication() throws IOException { /* * Note: This method is not called unless a server certificate is sent, which may be the * case e.g. for SRP_DSS or SRP_RSA key exchange. */ throw new TlsFatalAlert(AlertDescription.internal_error); }
void finaliseHandshake() throws IOException { if (readCompression != pendingCompression || writeCompression != pendingCompression || readCipher != pendingCipher || writeCipher != pendingCipher) { throw new TlsFatalAlert(AlertDescription.handshake_failure); } this.pendingCompression = null; this.pendingCipher = null; }
private static void checkLength(int length, int limit, short alertDescription) throws IOException { if (length > limit) { throw new TlsFatalAlert(alertDescription); } }
public void processClientSupplementalData(Vector clientSupplementalData) throws IOException { if (clientSupplementalData != null) { throw new TlsFatalAlert(AlertDescription.unexpected_message); } }
public void notifyClientCertificate(Certificate clientCertificate) throws IOException { throw new TlsFatalAlert(AlertDescription.internal_error); }
protected TlsSignerCredentials getDSASignerCredentials() throws IOException { throw new TlsFatalAlert(AlertDescription.internal_error); }
protected TlsSignerCredentials getECDSASignerCredentials() throws IOException { throw new TlsFatalAlert(AlertDescription.internal_error); }
protected TlsSignerCredentials getRSASignerCredentials() throws IOException { throw new TlsFatalAlert(AlertDescription.internal_error); }
public void processClientKeyExchange(InputStream input) throws IOException { // Key exchange implementation MUST support client key exchange throw new TlsFatalAlert(AlertDescription.internal_error); } }
public void skipServerCredentials() throws IOException { throw new TlsFatalAlert(AlertDescription.unexpected_message); }