70 void (*callback)(
int,
int,
void *) = NULL,
115 operator evp_pkey_st *()
const {
return key; }
121 void (*callback)(
int,
int,
void *) = NULL,
185 const BYTE * certData,
318 operator dh_st *()
const {
return dh; }
357 const void * sessionId = NULL,
362 const void * sessionId = NULL,
372 operator ssl_ctx_st *()
const {
return context; }
529 #endif // PTLIB_PSSL_H
PSSLPrivateKey & operator=(const PSSLPrivateKey &privKay)
Create a copy of the private key.
VerifyMode
Definition: pssl.h:497
Definition: channel.h:569
x509_st * certificate
Definition: pssl.h:265
PBoolean SetCipherList(const PString &ciphers)
Set the available ciphers to those listed.
virtual PString GetErrorText(ErrorGroup group=NumErrorGroups) const
Get error message description.
void Construct(Method method, const void *sessionId, PINDEX idSize)
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:1049
Method
Definition: pssl.h:342
~PSSLCertificate()
Destroy and release storage for certificate.
PBoolean UseCertificate(const PSSLCertificate &certificate)
Use the certificate specified.
PBoolean Create(unsigned modulus, void(*callback)(int, int, void *)=NULL, void *cb_arg=NULL)
Create a new private key.
PBoolean SetCAPath(const PDirectory &caPath)
Set the path to locate CA certificates.
Error during other operation, eg Open()
Definition: channel.h:568
PSSLContext(const void *sessionId=NULL, PINDEX idSize=0)
Create a new context for SSL channels.
PBoolean UsePrivateKey(const PSSLPrivateKey &key)
Use the private key file specified.
Certificate for SSL.
Definition: pssl.h:164
PBoolean autoDeleteContext
Definition: pssl.h:525
virtual PBoolean ConvertOSError(int error, ErrorGroup group=LastGeneralError)
Convert an operating system error into platform independent error.
This class describes a full description for a file on the particular platform.
Definition: filepath.h:65
PBoolean UsePrivateKey(const PSSLPrivateKey &key)
Use the private key specified.
PString AsString() const
Get the certificate as ASN1 DER base64 encoded data.
~PSSLPrivateKey()
Destroy and release storage for private key.
PBoolean Load(const PFilePath &certFile, PSSLFileTypes fileType=PSSLFileTypeDEFAULT)
Load certificate from file.
This is a channel that operates indirectly through another channel(s).
Definition: indchan.h:49
ssl_st * ssl
Definition: pssl.h:526
PBoolean UseCertificate(const PSSLCertificate &certificate)
Use the certificate specified.
PBYTEArray GetData() const
Get the certificate as binary ASN1 DER encoded data.
ShutdownValue
Definition: channel.h:433
Private key for SSL.
Definition: pssl.h:58
PBoolean Save(const PFilePath &keyFile, PBoolean append=false, PSSLFileTypes fileType=PSSLFileTypeDEFAULT)
Save private key to file.
PBYTEArray GetData() const
Get the certificate as binary ASN1 DER encoded data.
BOOL PBoolean
Definition: object.h:102
Class to represent a directory in the operating system file system.
Definition: pdirect.h:182
dh_st * dh
Definition: pssl.h:331
PBoolean CreateRoot(const PString &subject, const PSSLPrivateKey &key)
Create a new root certificate.
PSSLChannel(PSSLContext *context=NULL, PBoolean autoDeleteContext=false)
Create a new channel given the context.
virtual PBoolean RawSSLRead(void *buf, PINDEX &len)
Array of unsigned characters.
Definition: array.h:670
PBoolean UseDiffieHellman(const PSSLDiffieHellman &dh)
Use the Diffie-Hellman parameters specified.
PBoolean Load(const PFilePath &keyFile, PSSLFileTypes fileType=PSSLFileTypeDEFAULT)
Load private key from file.
Abstract class defining I/O channel semantics.
Definition: channel.h:107
PBoolean Connect()
Connect to remote server.
~PSSLChannel()
Close and clear the SSL channel.
The character string class.
Definition: pstring.h:108
~PSSLDiffieHellman()
Destroy and release storage for Diffie-Hellman parameters.
Context for SSL channels.
Definition: pssl.h:340
PSSLDiffieHellman & operator=(const PSSLDiffieHellman &dh)
Create a copy of the Diffie-Hellman parameters.
evp_pkey_st * key
Definition: pssl.h:156
This class will start a secure SSL based channel.
Definition: pssl.h:418
virtual PBoolean OnOpen()
This callback is executed when the Open() function is called with open channels.
PString AsString() const
Get the certificate as ASN1 DER base64 encoded data.
ErrorGroup
Error groups.
Definition: channel.h:565
void SetVerifyMode(VerifyMode mode)
PBoolean Load(const PFilePath &dhFile, PSSLFileTypes fileType=PSSLFileTypeDEFAULT)
Load Diffie-Hellman parameters from file.
PSSLCertificate()
Create an empty certificate.
virtual PBoolean Shutdown(ShutdownValue)
Close one or both of the data streams associated with a channel.
Definition: pssl.h:441
virtual PBoolean Write(const void *buf, PINDEX len)
Low level write to the channel.
PBoolean Accept()
Accept a new inbound connection (server).
virtual PBoolean Read(void *buf, PINDEX len)
Low level read from the channel.
virtual PBoolean Close()
Close the channel.
PSSLCertificate & operator=(const PSSLCertificate &cert)
Create a copy of the certificate.
PBoolean Save(const PFilePath &keyFile, PBoolean append=false, PSSLFileTypes fileType=PSSLFileTypeDEFAULT)
Save certificate to file.
PSSLPrivateKey()
Create an empty private key.
Diffie-Hellman parameters for SSL.
Definition: pssl.h:273
PSSLContext * context
Definition: pssl.h:524
PBoolean SetCAFile(const PFilePath &caFile)
Set the CA certificate file.
PSSLContext * GetContext() const
Definition: pssl.h:507
Ultimate parent class for all objects in the class library.
Definition: object.h:1118
ssl_ctx_st * context
Definition: pssl.h:412
PSSLDiffieHellman()
Create an empty set of Diffie-Hellman parameters.
~PSSLContext()
Clean up the SSL context.
PSSLFileTypes
Definition: pssl.h:47