#include <sslsocket.h>
Public Types | |
typedef ConexusPointer< SSLSocket > | pointer |
Public Member Functions | |
virtual | ~SSLSocket () throw () |
virtual void | open () throw (open_exception) |
virtual size_t | input_available () throw () |
bool | set_option (int32_t option, bool on=true) |
bool | is_option_set (int32_t option) |
bool | enable_cipher (int32_t cipher, bool enable=true) |
bool | is_cipher_enabled (int32_t cipher) |
bool | configure_as_server (Certificate::pointer cert, PrivateKey::pointer key, KEA kea_type) |
bool | set_url (const std::string &url) |
std::string | url () |
bool | set_pkcs11_pin_arg (void *arg) |
void * | pkcs11_pin_arg () |
bool | invalidate_session () |
SECURITY_STATUS | security_status () |
std::string | cipher () |
int | session_key_size () |
int | secret_key_size () |
std::string | issuer () |
std::string | subject () |
SECItem * | session_id () |
bool | set_peer_id (const std::string &peer_id) |
Certificate::pointer | peer_certificate () |
bool | force_handshake () |
bool | rehandshake (bool flush_cache=true) |
bool | reset_handshake (bool as_server=false) |
void | set_authenticate_certificate_callback (sigc::slot< bool, bool, bool > slot) |
void | unset_authenticate_certificate_callback () |
void | set_bad_certificate_callback (sigc::slot< bool > slot) |
void | unset_bad_certificate_callback () |
void | set_client_authentication_callback (sigc::slot< bool, struct CERTDistNamesStr *, struct CERTCertificateStr **, struct SECKEYPrivateKeyStr ** > slot) |
void | set_default_client_authentication_callback (char *nickname) |
void | unset_client_authentication_callback () |
sigc::signal< void > | signal_handshake_complete () |
Static Public Member Functions | |
static pointer | create (Conexus::NSPR::Socket::pointer socket, SSLSocket::pointer model=SSLSocket::pointer()) |
Protected Member Functions | |
SSLSocket (Conexus::NSPR::Socket::pointer socket, SSLSocket::pointer model=SSLSocket::pointer()) | |
virtual bool | on_authenticate_certificate (bool checksig, bool isServer) |
Authenticates the peer certificate obtained through the peer_certificate() method. | |
virtual bool | on_bad_certificate () |
virtual bool | on_client_authentication (struct CERTDistNamesStr *ca_names, struct CERTCertificateStr **ret_cert, struct SECKEYPrivateKeyStr **ret_key) |
Protected Attributes | |
sigc::slot< bool, bool, bool > | m_authenticate_certificate_slot |
sigc::slot< bool > | m_bad_certificate_slot |
sigc::slot< bool, struct CERTDistNamesStr *, struct CERTCertificateStr **, struct SECKEYPrivateKeyStr ** > | m_client_authentication_slot |
sigc::signal< void > | m_signal_handshake_complete |
Static Private Member Functions | |
static SECStatus | SSL_AuthCertificateHook_proxy (void *arg, PRFileDesc *socket, PRBool checksig, PRBool isServer) |
static SECStatus | SSL_BadCertHook_proxy (void *arg, PRFileDesc *socket) |
static void | SSL_HandshakeCallback_proxy (PRFileDesc *socket, void *arg) |
static SECStatus | SSL_GetClientAuthDataHook_proxy (void *arg, PRFileDesc *socket, struct CERTDistNamesStr *caNames, struct CERTCertificateStr **pRetCert, struct SECKEYPrivateKeyStr **pRetKey) |
typedef ConexusPointer<SSLSocket> Conexus::NSS::SSLSocket::pointer |
Reimplemented from Conexus::NSPR::Socket.
Conexus::NSS::SSLSocket::SSLSocket | ( | Conexus::NSPR::Socket::pointer | socket, | |
SSLSocket::pointer | model = SSLSocket::pointer() | |||
) | [protected] |
Conexus::NSS::SSLSocket::~SSLSocket | ( | ) | throw () [virtual] |
std::string Conexus::NSS::SSLSocket::cipher | ( | ) |
References Conexus::NSPR::FileDescriptor::m_fd.
bool Conexus::NSS::SSLSocket::configure_as_server | ( | Certificate::pointer | cert, | |
PrivateKey::pointer | key, | |||
KEA | kea_type | |||
) |
References Conexus::NSPR::FileDescriptor::m_fd.
SSLSocket::pointer Conexus::NSS::SSLSocket::create | ( | Conexus::NSPR::Socket::pointer | socket, | |
SSLSocket::pointer | model = SSLSocket::pointer() | |||
) | [static] |
Referenced by peer_certificate().
bool Conexus::NSS::SSLSocket::enable_cipher | ( | int32_t | cipher, | |
bool | enable = true | |||
) |
References Conexus::NSPR::FileDescriptor::m_fd.
bool Conexus::NSS::SSLSocket::force_handshake | ( | ) |
References Conexus::NSPR::FileDescriptor::m_fd.
size_t Conexus::NSS::SSLSocket::input_available | ( | ) | throw () [virtual] |
bool Conexus::NSS::SSLSocket::invalidate_session | ( | ) |
References Conexus::NSPR::FileDescriptor::m_fd.
bool Conexus::NSS::SSLSocket::is_cipher_enabled | ( | int32_t | cipher | ) |
References Conexus::NSPR::FileDescriptor::m_fd.
bool Conexus::NSS::SSLSocket::is_option_set | ( | int32_t | option | ) |
References Conexus::NSPR::FileDescriptor::m_fd.
std::string Conexus::NSS::SSLSocket::issuer | ( | ) |
References Conexus::NSPR::FileDescriptor::m_fd.
bool Conexus::NSS::SSLSocket::on_authenticate_certificate | ( | bool | checksig, | |
bool | isServer | |||
) | [protected, virtual] |
Authenticates the peer certificate obtained through the peer_certificate() method.
on_authenticate_certificate()
: Note that if you subclass this virtual method you will be responsible for checking authenticate_certificate_slot and deciding whether you want to call it. References m_authenticate_certificate_slot, and Conexus::NSPR::FileDescriptor::m_fd.
Referenced by SSL_AuthCertificateHook_proxy().
bool Conexus::NSS::SSLSocket::on_bad_certificate | ( | ) | [protected, virtual] |
bool Conexus::NSS::SSLSocket::on_client_authentication | ( | struct CERTDistNamesStr * | ca_names, | |
struct CERTCertificateStr ** | ret_cert, | |||
struct SECKEYPrivateKeyStr ** | ret_key | |||
) | [protected, virtual] |
void Conexus::NSS::SSLSocket::open | ( | ) | throw (open_exception) [virtual] |
Implements Conexus::Endpoint.
Certificate::pointer Conexus::NSS::SSLSocket::peer_certificate | ( | ) |
References create(), and Conexus::NSPR::FileDescriptor::m_fd.
void * Conexus::NSS::SSLSocket::pkcs11_pin_arg | ( | ) |
References Conexus::NSPR::FileDescriptor::m_fd.
bool Conexus::NSS::SSLSocket::rehandshake | ( | bool | flush_cache = true |
) |
References Conexus::NSPR::FileDescriptor::m_fd.
bool Conexus::NSS::SSLSocket::reset_handshake | ( | bool | as_server = false |
) |
References Conexus::NSPR::FileDescriptor::m_fd.
int Conexus::NSS::SSLSocket::secret_key_size | ( | ) |
References Conexus::NSPR::FileDescriptor::m_fd.
SECURITY_STATUS Conexus::NSS::SSLSocket::security_status | ( | ) |
References Conexus::NSPR::FileDescriptor::m_fd.
SECItem * Conexus::NSS::SSLSocket::session_id | ( | ) |
References Conexus::NSPR::FileDescriptor::m_fd.
int Conexus::NSS::SSLSocket::session_key_size | ( | ) |
References Conexus::NSPR::FileDescriptor::m_fd.
void Conexus::NSS::SSLSocket::set_authenticate_certificate_callback | ( | sigc::slot< bool, bool, bool > | slot | ) |
References m_authenticate_certificate_slot.
void Conexus::NSS::SSLSocket::set_bad_certificate_callback | ( | sigc::slot< bool > | slot | ) |
References m_bad_certificate_slot, Conexus::NSPR::FileDescriptor::m_fd, and SSL_BadCertHook_proxy().
void Conexus::NSS::SSLSocket::set_client_authentication_callback | ( | sigc::slot< bool, struct CERTDistNamesStr *, struct CERTCertificateStr **, struct SECKEYPrivateKeyStr ** > | slot | ) |
void Conexus::NSS::SSLSocket::set_default_client_authentication_callback | ( | char * | nickname | ) |
References Conexus::NSPR::FileDescriptor::m_fd.
bool Conexus::NSS::SSLSocket::set_option | ( | int32_t | option, | |
bool | on = true | |||
) |
References Conexus::NSPR::FileDescriptor::m_fd.
bool Conexus::NSS::SSLSocket::set_peer_id | ( | const std::string & | peer_id | ) |
References Conexus::NSPR::FileDescriptor::m_fd.
bool Conexus::NSS::SSLSocket::set_pkcs11_pin_arg | ( | void * | arg | ) |
References Conexus::NSPR::FileDescriptor::m_fd.
bool Conexus::NSS::SSLSocket::set_url | ( | const std::string & | url | ) |
References Conexus::NSPR::FileDescriptor::m_fd.
sigc::signal< void > Conexus::NSS::SSLSocket::signal_handshake_complete | ( | ) |
References m_signal_handshake_complete.
SECStatus Conexus::NSS::SSLSocket::SSL_AuthCertificateHook_proxy | ( | void * | arg, | |
PRFileDesc * | socket, | |||
PRBool | checksig, | |||
PRBool | isServer | |||
) | [static, private] |
SECStatus Conexus::NSS::SSLSocket::SSL_BadCertHook_proxy | ( | void * | arg, | |
PRFileDesc * | socket | |||
) | [static, private] |
SECStatus Conexus::NSS::SSLSocket::SSL_GetClientAuthDataHook_proxy | ( | void * | arg, | |
PRFileDesc * | socket, | |||
struct CERTDistNamesStr * | caNames, | |||
struct CERTCertificateStr ** | pRetCert, | |||
struct SECKEYPrivateKeyStr ** | pRetKey | |||
) | [static, private] |
void Conexus::NSS::SSLSocket::SSL_HandshakeCallback_proxy | ( | PRFileDesc * | socket, | |
void * | arg | |||
) | [static, private] |
std::string Conexus::NSS::SSLSocket::subject | ( | ) |
References Conexus::NSPR::FileDescriptor::m_fd.
void Conexus::NSS::SSLSocket::unset_authenticate_certificate_callback | ( | ) |
References m_authenticate_certificate_slot.
void Conexus::NSS::SSLSocket::unset_bad_certificate_callback | ( | ) |
References m_bad_certificate_slot, and Conexus::NSPR::FileDescriptor::m_fd.
void Conexus::NSS::SSLSocket::unset_client_authentication_callback | ( | ) |
References m_client_authentication_slot, and Conexus::NSPR::FileDescriptor::m_fd.
std::string Conexus::NSS::SSLSocket::url | ( | ) |
References Conexus::NSPR::FileDescriptor::m_fd.
sigc::slot<bool,bool,bool> Conexus::NSS::SSLSocket::m_authenticate_certificate_slot [protected] |
sigc::slot<bool> Conexus::NSS::SSLSocket::m_bad_certificate_slot [protected] |
Referenced by on_bad_certificate(), set_bad_certificate_callback(), and unset_bad_certificate_callback().
sigc::slot<bool,struct CERTDistNamesStr*, struct CERTCertificateStr**, struct SECKEYPrivateKeyStr**> Conexus::NSS::SSLSocket::m_client_authentication_slot [protected] |
sigc::signal<void> Conexus::NSS::SSLSocket::m_signal_handshake_complete [protected] |
Referenced by signal_handshake_complete(), and SSL_HandshakeCallback_proxy().