Public Member Functions | |
dh_constructor () | |
~dh_constructor () | |
EVP_PKEY * | operator() () |
Private Attributes | |
EVP_PKEY * | result |
EVP_PKEY * | params |
EVP_PKEY_CTX * | keygen_ctx |
DH * | dh_2048_256 |
Definition at line 59 of file DiffieHellman.cpp.
OpenDDS::Security::SSL::dh_constructor::dh_constructor | ( | ) | [inline] |
Definition at line 62 of file DiffieHellman.cpp.
00063 : result(NULL), params(NULL), keygen_ctx(NULL), dh_2048_256(NULL) 00064 { 00065 }
OpenDDS::Security::SSL::dh_constructor::~dh_constructor | ( | ) | [inline] |
Definition at line 66 of file DiffieHellman.cpp.
References dh_2048_256, keygen_ctx, and params.
00067 { 00068 EVP_PKEY_free(params); 00069 EVP_PKEY_CTX_free(keygen_ctx); 00070 DH_free(dh_2048_256); 00071 }
EVP_PKEY* OpenDDS::Security::SSL::dh_constructor::operator() | ( | void | ) | [inline] |
Definition at line 73 of file DiffieHellman.cpp.
References dh_2048_256, keygen_ctx, OPENDDS_SSL_LOG_ERR, params, and result.
00074 { 00075 if (!(params = EVP_PKEY_new())) { 00076 OPENDDS_SSL_LOG_ERR("EVP_PKEY_new failed"); 00077 return NULL; 00078 } 00079 00080 if (NULL == (dh_2048_256 = DH_get_2048_256())) { 00081 OPENDDS_SSL_LOG_ERR("DH_get_2048_256 failed"); 00082 return NULL; 00083 } 00084 00085 if (1 != EVP_PKEY_set1_DH(params, dh_2048_256)) { 00086 OPENDDS_SSL_LOG_ERR("EVP_PKEY_set1_DH failed"); 00087 return NULL; 00088 } 00089 00090 if (!(keygen_ctx = EVP_PKEY_CTX_new(params, NULL))) { 00091 OPENDDS_SSL_LOG_ERR("EVP_PKEY_CTX_new failed"); 00092 return NULL; 00093 } 00094 00095 if (1 != EVP_PKEY_keygen_init(keygen_ctx)) { 00096 OPENDDS_SSL_LOG_ERR("EVP_PKEY_keygen_init failed"); 00097 return NULL; 00098 } 00099 00100 if (1 != EVP_PKEY_keygen(keygen_ctx, &result)) { 00101 OPENDDS_SSL_LOG_ERR("EVP_PKEY_keygen failed"); 00102 return NULL; 00103 } 00104 00105 return result; 00106 }
DH* OpenDDS::Security::SSL::dh_constructor::dh_2048_256 [private] |
Definition at line 112 of file DiffieHellman.cpp.
Referenced by operator()(), and ~dh_constructor().
EVP_PKEY_CTX* OpenDDS::Security::SSL::dh_constructor::keygen_ctx [private] |
Definition at line 111 of file DiffieHellman.cpp.
Referenced by operator()(), and ~dh_constructor().
Definition at line 110 of file DiffieHellman.cpp.
Referenced by operator()(), and ~dh_constructor().
Definition at line 109 of file DiffieHellman.cpp.
Referenced by operator()().