#include <pssl.h>
Public Types | |
SSLv23 | |
SSLv2 | |
SSLv3 | |
TLSv1 | |
enum | Method { SSLv23, SSLv2, SSLv3, TLSv1 } |
Public Member Functions | |
PSSLContext (const void *sessionId=NULL, PINDEX idSize=0) | |
PSSLContext (Method method, const void *sessionId=NULL, PINDEX idSize=0) | |
~PSSLContext () | |
operator ssl_ctx_st * () const | |
PBoolean | SetCAPath (const PDirectory &caPath) |
PBoolean | SetCAFile (const PFilePath &caFile) |
PBoolean | UseCertificate (const PSSLCertificate &certificate) |
PBoolean | UsePrivateKey (const PSSLPrivateKey &key) |
PBoolean | UseDiffieHellman (const PSSLDiffieHellman &dh) |
PBoolean | SetCipherList (const PString &ciphers) |
Protected Member Functions | |
void | Construct (Method method, const void *sessionId, PINDEX idSize) |
Protected Attributes | |
ssl_ctx_st * | context |
enum PSSLContext::Method |
PSSLContext::PSSLContext | ( | const void * | sessionId = NULL , |
|
PINDEX | idSize = 0 | |||
) |
Create a new context for SSL channels. An optional session ID may be provided in the context. This is used to identify sessions across multiple channels in this context. The session ID is a completely arbitrary block of data. If sessionId is non NULL and idSize is zero, then sessionId is assumed to be a pointer to a C string. The default SSL method is SSLv23
sessionId | Pointer to session ID |
idSize | Size of session ID |
PSSLContext::PSSLContext | ( | Method | method, | |
const void * | sessionId = NULL , |
|||
PINDEX | idSize = 0 | |||
) |
method | SSL connection method |
sessionId | Pointer to session ID |
idSize | Size of session ID |
PSSLContext::~PSSLContext | ( | ) |
Clean up the SSL context.
void PSSLContext::Construct | ( | Method | method, | |
const void * | sessionId, | |||
PINDEX | idSize | |||
) | [protected] |
PSSLContext::operator ssl_ctx_st * | ( | ) | const [inline] |
Get the internal SSL context structure.
Set the CA certificate file.
caFile | CA certificate file |
PBoolean PSSLContext::SetCAPath | ( | const PDirectory & | caPath | ) |
Set the path to locate CA certificates.
caPath | Directory for CA certificates |
Set the available ciphers to those listed.
ciphers | List of cipher names. |
PBoolean PSSLContext::UseCertificate | ( | const PSSLCertificate & | certificate | ) |
Use the certificate specified.
PBoolean PSSLContext::UseDiffieHellman | ( | const PSSLDiffieHellman & | dh | ) |
Use the Diffie-Hellman parameters specified.
PBoolean PSSLContext::UsePrivateKey | ( | const PSSLPrivateKey & | key | ) |
Use the private key specified.
ssl_ctx_st* PSSLContext::context [protected] |