Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

PSSLPrivateKey Class Reference

#include <pssl.h>

Inheritance diagram for PSSLPrivateKey:

PObject List of all members.

Public Methods

 PSSLPrivateKey ()
 PSSLPrivateKey (unsigned modulus, void(*callback)(int, int, void *)=NULL, void *cb_arg=NULL)
 PSSLPrivateKey (const PFilePath &keyFile, PSSLFileTypes fileType=PSSLFileTypeDEFAULT)
 PSSLPrivateKey (const BYTE *keyData, PINDEX keySize)
 PSSLPrivateKey (const PBYTEArray &keyData)
 PSSLPrivateKey (const PSSLPrivateKey &privKey)
PSSLPrivateKey & operator= (const PSSLPrivateKey &privKay)
 ~PSSLPrivateKey ()
 operator evp_pkey_st * () const
BOOL Create (unsigned modulus, void(*callback)(int, int, void *)=NULL, void *cb_arg=NULL)
PBYTEArray GetData () const
PString AsString () const
BOOL Load (const PFilePath &keyFile, PSSLFileTypes fileType=PSSLFileTypeDEFAULT)
BOOL Save (const PFilePath &keyFile, BOOL append=FALSE, PSSLFileTypes fileType=PSSLFileTypeDEFAULT)

Protected Attributes

evp_pkey_st * key

Detailed Description

Private key for SSL. This class embodies a common environment for all private keys used by the PSSLContext and PSSLChannel classes.


Constructor & Destructor Documentation

PSSLPrivateKey::PSSLPrivateKey  
 

Create an empty private key.

PSSLPrivateKey::PSSLPrivateKey unsigned    modulus,
void(*    callback)(int, int, void *) = NULL,
void *    cb_arg = NULL
 

Create a new RSA private key.

Parameters:
callback  Number of bits
cb_arg  Progress callback function Argument passed to callback

PSSLPrivateKey::PSSLPrivateKey const PFilePath   keyFile,
PSSLFileTypes    fileType = PSSLFileTypeDEFAULT
 

Create a new private key given the file. The type of the private key can be specified explicitly, or if PSSLFileTypeDEFAULT it will be determined from the file extension, ".pem" is a text file, anything else eg ".der" is a binary ASN1 file.

Parameters:
fileType  Private key file Type of file to read

PSSLPrivateKey::PSSLPrivateKey const BYTE *    keyData,
PINDEX    keySize
 

Create private key from the binary ASN1 DER encoded data specified.

Parameters:
keySize  Private key data Size of private key data

PSSLPrivateKey::PSSLPrivateKey const PBYTEArray   keyData
 

Create private key from the binary ASN1 DER encoded data specified.

Parameters:
keyData  Private key data

PSSLPrivateKey::PSSLPrivateKey const PSSLPrivateKey &    privKey
 

Create a copy of the private key.

PSSLPrivateKey::~PSSLPrivateKey  
 

Destroy and release storage for private key.


Member Function Documentation

PString PSSLPrivateKey::AsString  
 

Get the certificate as ASN1 DER base64 encoded data.

BOOL PSSLPrivateKey::Create unsigned    modulus,
void(*    callback)(int, int, void *) = NULL,
void *    cb_arg = NULL
 

Create a new private key.

Parameters:
callback  Number of bits
cb_arg  Progress callback function Argument passed to callback

PBYTEArray PSSLPrivateKey::GetData  
 

Get the certificate as binary ASN1 DER encoded data.

BOOL PSSLPrivateKey::Load const PFilePath   keyFile,
PSSLFileTypes    fileType = PSSLFileTypeDEFAULT
 

Load private key from file. The type of the private key can be specified explicitly, or if PSSLFileTypeDEFAULT it will be determined from the file extension, ".pem" is a text file, anything else eg ".der" is a binary ASN1 file.

Parameters:
fileType  Private key file Type of file to read

PSSLPrivateKey::operator evp_pkey_st *   const [inline]
 

Get internal OpenSSL private key structure.

PSSLPrivateKey& PSSLPrivateKey::operator= const PSSLPrivateKey &    privKay
 

Create a copy of the private key.

BOOL PSSLPrivateKey::Save const PFilePath   keyFile,
BOOL    append = FALSE,
PSSLFileTypes    fileType = PSSLFileTypeDEFAULT
 

Save private key to file. The type of the private key can be specified explicitly, or if PSSLFileTypeDEFAULT it will be determined from the file extension, ".pem" is a text file, anything else eg ".der" is a binary ASN1 file.

Parameters:
append  Private key file
fileType  Append to file Type of file to write


Member Data Documentation

evp_pkey_st* PSSLPrivateKey::key [protected]
 


The documentation for this class was generated from the following file:
Generated on Fri Aug 13 15:50:10 2004 for PWLib by doxygen1.2.18