1 /*****************************************************************************
8 Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved.
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of either: 1) the GNU General Public License
13 as published by the Free Software Foundation; either version 2 of the
14 License, or (at your option) any later version; or 2) Ruby's License.
16 See the file COPYING for complete licensing information.
18 *****************************************************************************/
36 SslContext_t (bool is_server, const string &privkeyfile, const string &certchainfile);
37 virtual ~SslContext_t();
40 static bool bLibraryInitialized;
49 friend class SslBox_t;
60 SslBox_t (bool is_server, const string &privkeyfile, const string &certchainfile, bool verify_peer, const unsigned long binding);
63 int PutPlaintext (const char*, int);
64 int GetPlaintext (char*, int);
66 bool PutCiphertext (const char*, int);
67 bool CanGetCiphertext();
68 int GetCiphertext (char*, int);
69 bool IsHandshakeCompleted() {return bHandshakeCompleted;}
76 SslContext_t *Context;
79 bool bHandshakeCompleted;
88 extern "C" int ssl_verify_wrapper(int, X509_STORE_CTX*);
93 #endif // __SslBox__H_