# PSSLDiffieHellman Class Reference

Diffie-Hellman parameters for SSL. More...

`#include <pssl.h>`

Inheritance diagram for PSSLDiffieHellman:

List of all members.

## Public Member Functions

| PSSLDiffieHellman ()
| Create an empty set of Diffie-Hellman parameters.
| PSSLDiffieHellman (const PFilePath &dhFile, PSSLFileTypes fileType=PSSLFileTypeDEFAULT)
| Create a new set of Diffie-Hellman parameters given the file.
| PSSLDiffieHellman (const BYTE *pData, PINDEX pSize, const BYTE *gData, PINDEX gSize)
| Create a set of Diffie-Hellman parameters.
| PSSLDiffieHellman (const PSSLDiffieHellman &dh)
| Create a copy of the Diffie-Hellman parameters.
PSSLDiffieHellman & | operator= (const PSSLDiffieHellman &dh)
| Create a copy of the Diffie-Hellman parameters.
| ~PSSLDiffieHellman ()
| Destroy and release storage for Diffie-Hellman parameters.
| operator dh_st * () const
| Get internal OpenSSL DH structure.
PBoolean | Load (const PFilePath &dhFile, PSSLFileTypes fileType=PSSLFileTypeDEFAULT)
| Load Diffie-Hellman parameters from file.

## Protected Attributes

dh_st * | dh

## Detailed Description

Diffie-Hellman parameters for SSL.

This class embodies a set of Diffie Helman parameters as used by PSSLContext and PSSLChannel classes.

## Constructor & Destructor Documentation

PSSLDiffieHellman::PSSLDiffieHellman | ( |  | ) |

Create an empty set of Diffie-Hellman parameters.

PSSLDiffieHellman::PSSLDiffieHellman | ( | const PFilePath & | dhFile,
|  | PSSLFileTypes | fileType = `PSSLFileTypeDEFAULT` |
| ) |  |  |

Create a new set of Diffie-Hellman parameters given the file.

The type of the file 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:

  dhFile | Diffie-Hellman parameters file
  fileType | Type of file to read

PSSLDiffieHellman::PSSLDiffieHellman | ( | const BYTE * | pData,
|  | PINDEX | pSize,
|  | const BYTE * | gData,
|  | PINDEX | gSize |
| ) |  |  |

Create a set of Diffie-Hellman parameters.

Parameters:

  pData | P data
  pSize | Size of P data
  gData | G data
  gSize | Size of G data

PSSLDiffieHellman::PSSLDiffieHellman | ( | const PSSLDiffieHellman & | dh | ) |

Create a copy of the Diffie-Hellman parameters.

PSSLDiffieHellman::~PSSLDiffieHellman | ( |  | ) |

Destroy and release storage for Diffie-Hellman parameters.

## Member Function Documentation

PBoolean PSSLDiffieHellman::Load | ( | const PFilePath & | dhFile,
|  | PSSLFileTypes | fileType = `PSSLFileTypeDEFAULT` |
| ) |  |  |

Load Diffie-Hellman parameters from file.

The type of the file 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:

  dhFile | Diffie-Hellman parameters file
  fileType | Type of file to read

PSSLDiffieHellman::operator dh_st * | ( |  | ) | const`[inline]`

Get internal OpenSSL DH structure.

PSSLDiffieHellman& PSSLDiffieHellman::operator= | ( | const PSSLDiffieHellman & | dh | ) |

Create a copy of the Diffie-Hellman parameters.

## Member Data Documentation

dh_st* PSSLDiffieHellman::dh `[protected]`

The documentation for this class was generated from the following file:

- pssl.h