6 #ifndef OPENDDS_DCPS_SECURITY_SSL_DIFFIEHELLMAN_H 7 #define OPENDDS_DCPS_SECURITY_SSL_DIFFIEHELLMAN_H 12 #include "dds/DdsDcpsCoreC.h" 14 #include <openssl/evp.h> 33 virtual int init() = 0;
38 return compute_shared_secret(pub_key) || hash_shared_secret();
43 return shared_secret_;
46 virtual bool cmp_shared_secret(
const DHAlgorithm& other)
const;
47 virtual const char* kagree_algo()
const = 0;
50 virtual int compute_shared_secret(
const DDS::OctetSeq& pub_key) = 0;
51 int hash_shared_secret();
115 if (algo_) algo_->init();
128 return algo_->gen_shared_secret(pub_key);
133 return algo_->get_shared_secret();
138 return algo_->cmp_shared_secret(*other.
algo_);
int pub_key(DDS::OctetSeq &dst)
virtual int gen_shared_secret(const DDS::OctetSeq &pub_key)
bool(* factory)(CORBA::TCKind, TAO_InputCDR &, CORBA::TypeCode_ptr &, TC_Info_List &, TC_Info_List &)
DCPS::unique_ptr< DHAlgorithm > unique_ptr
const char DH_2048_MODP_256_PRIME_STR[]
DCPS::unique_ptr< DiffieHellman > unique_ptr
struct evp_pkey_st EVP_PKEY
DDS::OctetSeq shared_secret_
const char * kagree_algo() const
bool cmp_shared_secret(const DiffieHellman &other)
sequence< octet > OctetSeq
DiffieHellman(DHAlgorithm *algorithm)
const DDS::OctetSeq & get_shared_secret()
const char * kagree_algo() const
const char * kagree_algo() const
DHAlgorithm::unique_ptr algo_
#define OpenDDS_Security_Export
int gen_shared_secret(const DDS::OctetSeq &pub_key)
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
const char ECDH_PRIME_256_V1_CEUM_STR[]
The Internal API and Implementation of OpenDDS.
virtual const DDS::OctetSeq & get_shared_secret() const