OpenDDS::Security::SSL::DiffieHellman Class Reference

#include <DiffieHellman.h>

Collaboration diagram for OpenDDS::Security::SSL::DiffieHellman:
Collaboration graph
[legend]

List of all members.

Public Types

typedef DCPS::unique_ptr
< DiffieHellman
unique_ptr

Public Member Functions

 DiffieHellman (DHAlgorithm *algorithm)
 ~DiffieHellman ()
void load ()
int pub_key (DDS::OctetSeq &dst)
int gen_shared_secret (const DDS::OctetSeq &pub_key)
const DDS::OctetSeqget_shared_secret ()
bool cmp_shared_secret (const DiffieHellman &other)
const char * kagree_algo () const

Static Public Member Functions

static DiffieHellmanfactory (const DDS::OctetSeq &kagree_algo)

Private Attributes

DHAlgorithm::unique_ptr algo_

Detailed Description

Definition at line 97 of file DiffieHellman.h.


Member Typedef Documentation

Definition at line 100 of file DiffieHellman.h.


Constructor & Destructor Documentation

OpenDDS::Security::SSL::DiffieHellman::DiffieHellman ( DHAlgorithm algorithm  )  [inline]

Definition at line 104 of file DiffieHellman.h.

Referenced by factory().

00104 : algo_(algorithm) {}

Here is the caller graph for this function:

OpenDDS::Security::SSL::DiffieHellman::~DiffieHellman (  )  [inline]

Definition at line 106 of file DiffieHellman.h.

00106 {}


Member Function Documentation

bool OpenDDS::Security::SSL::DiffieHellman::cmp_shared_secret ( const DiffieHellman other  )  [inline]

Definition at line 131 of file DiffieHellman.h.

References algo_.

00132     {
00133       return algo_->cmp_shared_secret(*other.algo_);
00134     }

DiffieHellman * OpenDDS::Security::SSL::DiffieHellman::factory ( const DDS::OctetSeq kagree_algo  )  [static]

Definition at line 431 of file DiffieHellman.cpp.

References ACE_TEXT(), DiffieHellman(), and LM_ERROR.

Referenced by OpenDDS::Security::AuthenticationBuiltInImpl::begin_handshake_reply().

00432   {
00433     if (0 == std::memcmp(kagree_algo.get_buffer(), "DH+MODP-2048-256",
00434                          kagree_algo.length())) {
00435       return new DiffieHellman(new DH_2048_MODP_256_PRIME);
00436 
00437     } else if (0 == std::memcmp(kagree_algo.get_buffer(),
00438                                 "ECDH+prime256v1-CEUM",
00439                                 kagree_algo.length())) {
00440       return new DiffieHellman(new ECDH_PRIME_256_V1_CEUM);
00441 
00442     } else {
00443       ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) SSL::DiffieHellman::factory: ERROR, unknown kagree_algo\n")));
00444       return NULL;
00445     }
00446   }

Here is the call graph for this function:

Here is the caller graph for this function:

int OpenDDS::Security::SSL::DiffieHellman::gen_shared_secret ( const DDS::OctetSeq pub_key  )  [inline]
Returns:
int 0 on success; 1 on failure.

Definition at line 121 of file DiffieHellman.h.

00122     {
00123       return algo_->gen_shared_secret(pub_key);
00124     }

const DDS::OctetSeq& OpenDDS::Security::SSL::DiffieHellman::get_shared_secret (  )  [inline]

Definition at line 126 of file DiffieHellman.h.

00127     {
00128       return algo_->get_shared_secret();
00129     }

const char* OpenDDS::Security::SSL::DiffieHellman::kagree_algo (  )  const [inline]

Definition at line 136 of file DiffieHellman.h.

Referenced by OpenDDS::Security::CredentialHash::operator()().

00136 { return algo_->kagree_algo(); }

Here is the caller graph for this function:

void OpenDDS::Security::SSL::DiffieHellman::load (  )  [inline]

Definition at line 108 of file DiffieHellman.h.

00109     {
00110       if (algo_) algo_->init();
00111     }

int OpenDDS::Security::SSL::DiffieHellman::pub_key ( DDS::OctetSeq dst  )  [inline]
Returns:
int 0 on success; 1 on failure.

Definition at line 116 of file DiffieHellman.h.

00116 { return algo_->pub_key(dst); }


Member Data Documentation

Definition at line 139 of file DiffieHellman.h.

Referenced by cmp_shared_secret().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1