ssl_socket.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _SSL_SOCKET_H_
00023 #define _SSL_SOCKET_H_
00024
00025 #include <vector>
00026 #include <string>
00027
00028 #include <dcl/socket.h>
00029
00030 namespace dbp {
00031
00032 class ssl_socket_impl;
00033
00035
00038 class ssl_socket: public socket {
00039 public:
00041 ssl_socket();
00043 ssl_socket(const socket &src);
00045 ssl_socket& operator=(const ssl_socket &src);
00047 virtual ~ssl_socket();
00049 virtual int handle() const;
00051 virtual int read(int bytes_to_read, char *buffer);
00053 virtual int write(int bytes_to_write, const char *buffer);
00055 virtual void shutdown();
00057 void load_certificates(
00058 const std::string &ca,
00059 const std::string &cert, const std::string &key,
00060 const std::string &crl);
00061 private:
00062 ssl_socket_impl *pimpl;
00063 };
00064
00065 }
00066
00067 #endif
00068