class PSSLCertificate

Certificate for SSL.

Inheritance:


Public Methods

[more] PSSLCertificate ()
Create an empty certificate
[more] PSSLCertificate ( const PFilePath & certFile, PSSLFileTypes fileType = PSSLFileTypeDEFAULT )
Create a new certificate given the file.
[more] PSSLCertificate ( const BYTE* certData, PINDEX certSize )
Create certificate from the binary ASN1 DER encoded data specified.
[more] PSSLCertificate ( const PBYTEArray & certData )
Create certificate from the binary ASN1 DER encoded data specified.
[more] PSSLCertificate ( const PString & certString )
Create certificate from the ASN1 DER base64 encoded data specified.
[more] PSSLCertificate ( const PSSLCertificate & cert )
Create a copy of the certificate
[more]PSSLCertificate& operator= ( const PSSLCertificate & cert )
Create a copy of the certificate
[more] ~PSSLCertificate ()
Destroy and release storage for certificate
[more] operator x509_st * () const
Get internal OpenSSL X509 structure
[more]BOOL CreateRoot ( const PString & subject, const PSSLPrivateKey & key )
Create a new root certificate.
[more]PBYTEArray GetData () const
Get the certificate as binary ASN1 DER encoded data
[more]PString AsString () const
Get the certificate as ASN1 DER base64 encoded data
[more]BOOL Load ( const PFilePath & certFile, PSSLFileTypes fileType = PSSLFileTypeDEFAULT )
Load certificate from file.
[more]BOOL Save ( const PFilePath & keyFile, BOOL append = FALSE, PSSLFileTypes fileType = PSSLFileTypeDEFAULT )
Save certificate to file.


Inherited from PObject:

Public Methods

Run Time Type functions

I/O functions

Public Members

Comparison functions


Documentation

Certificate for SSL. This class embodies a common environment for all certificates used by the PSSLContext and PSSLChannel classes.
o PSSLCertificate()
Create an empty certificate

o PSSLCertificate( const PFilePath & certFile, PSSLFileTypes fileType = PSSLFileTypeDEFAULT )
Create a new certificate given the file. The type of the certificate 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:
certFile - Certificate file
fileType - Type of file to read

o PSSLCertificate( const BYTE* certData, PINDEX certSize )
Create certificate from the binary ASN1 DER encoded data specified.
Parameters:
certData - Certificate data
certSize - Size of certificate data

o PSSLCertificate( const PBYTEArray & certData )
Create certificate from the binary ASN1 DER encoded data specified.
Parameters:
certData - Certificate data

o PSSLCertificate( const PString & certString )
Create certificate from the ASN1 DER base64 encoded data specified.
Parameters:
certString - Certificate data as string

o PSSLCertificate( const PSSLCertificate & cert )
Create a copy of the certificate

oPSSLCertificate& operator=( const PSSLCertificate & cert )
Create a copy of the certificate

o ~PSSLCertificate()
Destroy and release storage for certificate

o operator x509_st *() const
Get internal OpenSSL X509 structure

oBOOL CreateRoot( const PString & subject, const PSSLPrivateKey & key )
Create a new root certificate. The subject name is a string of the form "/name=value/name=value" where name is a short name for the field and value is a string value for the field for example: "/C=ZA/SP=Western Cape/L=Cape Town/O=Thawte Consulting cc" "/OU=Certification Services Division/CN=Thawte Server CA" "/Email=server-certs@thawte.com"
Parameters:
- subject Subject name for certificate
- key Key to sign certificate with

oPBYTEArray GetData() const
Get the certificate as binary ASN1 DER encoded data

oPString AsString() const
Get the certificate as ASN1 DER base64 encoded data

oBOOL Load( const PFilePath & certFile, PSSLFileTypes fileType = PSSLFileTypeDEFAULT )
Load certificate from file. The type of the certificate 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:
certFile - Certificate file
fileType - Type of file to read

oBOOL Save( const PFilePath & keyFile, BOOL append = FALSE, PSSLFileTypes fileType = PSSLFileTypeDEFAULT )
Save certificate to file. The type of the certificate 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:
keyFile - Certificate key file
append - Append to file
fileType - Type of file to write


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.