18#ifndef _DECAF_INTERNAL_NET_SSL_OPENSSL_OPENSSLSOCKET_H_
19#define _DECAF_INTERNAL_NET_SSL_OPENSSL_OPENSSLSOCKET_H_
60 OpenSSLSocket(
const OpenSSLSocket&);
61 OpenSSLSocket& operator=(
const OpenSSLSocket&);
82 virtual void connect(
const std::string& host,
int port,
int timeout);
216 int read(
unsigned char* buffer,
int size,
int offset,
int length);
234 void write(
const unsigned char* buffer,
int size,
int offset,
int length);
249 void verifyServerCert(
const std::string& serverName);
Container class for parameters that are Common to OpenSSL socket classes.
Definition OpenSSLParameters.h:41
virtual decaf::net::ssl::SSLParameters getSSLParameters() const
Returns an SSLParameters object for this SSLSocket instance.The cipherSuites and protocols vectors in...
virtual void setOOBInline(bool value)
Sets the value of the OOBINLINE for this socket, by default this option is disabled....
virtual void connect(const std::string &host, int port, int timeout)
Connects to the specified destination, with a specified timeout value.If a connection to the remote h...
virtual void setEnabledProtocols(const std::vector< std::string > &protocols)
Sets the Protocols that are to be enabled on the SSL Socket connection.Each of the named Protocols mu...
void write(const unsigned char *buffer, int size, int offset, int length)
Writes the specified data in the passed in buffer to the Socket.
virtual void setWantClientAuth(bool value)
Sets the Socket to request that a client authenticate itself by sending a valid Certificate that is t...
OpenSSLSocket(OpenSSLParameters *parameters)
virtual void close()
Closes the Socket.Once closed a Socket cannot be connected or otherwise operated upon,...
int available()
Gets the number of bytes in the Socket buffer that can be read without blocking.
virtual decaf::io::InputStream * getInputStream()
Gets the InputStream for this socket if its connected.The pointer returned is the property of the ass...
virtual void sendUrgentData(int data)
Sends on byte of urgent data to the Socket.
int read(unsigned char *buffer, int size, int offset, int length)
Reads the requested data from the Socket and write it into the passed in buffer.
virtual decaf::io::OutputStream * getOutputStream()
Gets the OutputStream for this socket if it is connected.The pointer returned is the property of the ...
virtual void setEnabledCipherSuites(const std::vector< std::string > &suites)
Sets the Cipher Suites that are to be enabled on the SSL Socket connection.Each of the named Cipher S...
virtual void setNeedClientAuth(bool value)
Sets the Socket to require that a client authenticate itself by sending a valid Certificate that is t...
virtual bool getUseClientMode() const
Gets whether this Socket is in Client or Server mode, true indicates that the mode is set to Client....
virtual void shutdownInput()
Shuts down the InputStream for this socket essentially marking it as EOF.The stream returns EOF for a...
virtual void setUseClientMode(bool value)
Determines the mode that the socket uses when a handshake is initiated, client or server....
virtual void shutdownOutput()
Shuts down the OutputStream for this socket, any data already written to the socket will be sent,...
virtual std::vector< std::string > getSupportedCipherSuites() const
Gets a vector containing the names of all the cipher suites that are supported by this SSLSocket....
virtual bool getNeedClientAuth() const
Returns if this socket is configured to require client authentication, true means that is has and tha...
virtual void setSSLParameters(const decaf::net::ssl::SSLParameters &value)
Sets the SSLParameters for this SSLSocket using the supplied SSLParameters instance....
virtual bool getWantClientAuth() const
Returns if this socket is configured to request client authentication, true means that is has and tha...
virtual std::vector< std::string > getEnabledCipherSuites() const
Returns a vector containing the names of all the currently enabled Cipher Suites for this SSL Socket....
OpenSSLSocket(OpenSSLParameters *parameters, const std::string &host, int port, const decaf::net::InetAddress *localAddress, int localPort)
virtual void startHandshake()
Initiates a handshake for this SSL Connection, this can be necessary for several reasons such as usin...
OpenSSLSocket(OpenSSLParameters *parameters, const decaf::net::InetAddress *address, int port)
OpenSSLSocket(OpenSSLParameters *parameters, const std::string &host, int port)
virtual std::vector< std::string > getEnabledProtocols() const
Returns a vector containing the names of all the currently enabled Protocols for this SSL Socket....
virtual std::vector< std::string > getSupportedProtocols() const
Gets a vector containing the names of all the protocols that could be enabled for this SSLSocket inst...
OpenSSLSocket(OpenSSLParameters *parameters, const decaf::net::InetAddress *address, int port, const decaf::net::InetAddress *localAddress, int localPort)
Base interface for any class that wants to represent an output stream of bytes.
Definition OutputStream.h:39
Represents an IP address.
Definition InetAddress.h:33
virtual void connect(const std::string &host, int port)
Connects to the specified destination.
Definition SSLParameters.h:30
Definition SSLSocket.h:34
#define DECAF_API
Definition Config.h:29
Definition OpenSSLContextSpi.h:29
Definition DefaultSSLContext.h:28
Definition DefaultServerSocketFactory.h:27
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25