#include <DiffieHellman.h>
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::OctetSeq & | get_shared_secret () |
bool | cmp_shared_secret (const DiffieHellman &other) |
const char * | kagree_algo () const |
Static Public Member Functions | |
static DiffieHellman * | factory (const DDS::OctetSeq &kagree_algo) |
Private Attributes | |
DHAlgorithm::unique_ptr | algo_ |
Definition at line 97 of file DiffieHellman.h.
Definition at line 100 of file DiffieHellman.h.
OpenDDS::Security::SSL::DiffieHellman::DiffieHellman | ( | DHAlgorithm * | algorithm | ) | [inline] |
Definition at line 104 of file DiffieHellman.h.
Referenced by factory().
00104 : algo_(algorithm) {}
OpenDDS::Security::SSL::DiffieHellman::~DiffieHellman | ( | ) | [inline] |
Definition at line 106 of file DiffieHellman.h.
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 }
int OpenDDS::Security::SSL::DiffieHellman::gen_shared_secret | ( | const DDS::OctetSeq & | pub_key | ) | [inline] |
Definition at line 121 of file DiffieHellman.h.
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(); }
void OpenDDS::Security::SSL::DiffieHellman::load | ( | ) | [inline] |
Definition at line 108 of file DiffieHellman.h.
int OpenDDS::Security::SSL::DiffieHellman::pub_key | ( | DDS::OctetSeq & | dst | ) | [inline] |
Definition at line 116 of file DiffieHellman.h.
00116 { return algo_->pub_key(dst); }
Definition at line 139 of file DiffieHellman.h.
Referenced by cmp_shared_secret().