Public Member Functions | |
cache_dsign_algo_impl () | |
~cache_dsign_algo_impl () | |
int | operator() (X509 *cert, std::string &dst) |
Private Attributes | |
EVP_PKEY * | pkey_ |
RSA * | rsa_ |
EC_KEY * | ec_ |
Definition at line 350 of file Certificate.cpp.
OpenDDS::Security::SSL::cache_dsign_algo_impl::cache_dsign_algo_impl | ( | ) | [inline] |
Definition at line 352 of file Certificate.cpp.
OpenDDS::Security::SSL::cache_dsign_algo_impl::~cache_dsign_algo_impl | ( | ) | [inline] |
int OpenDDS::Security::SSL::cache_dsign_algo_impl::operator() | ( | X509 * | cert, | |
std::string & | dst | |||
) | [inline] |
Definition at line 360 of file Certificate.cpp.
References ec_, LM_WARNING, OPENDDS_SSL_LOG_ERR, pkey_, and rsa_.
00361 { 00362 if (!cert) { 00363 ACE_ERROR((LM_WARNING, 00364 "(%P|%t) SSL::Certificate::cache_dsign_algo: WARNING, failed to " 00365 "get pubkey from X509 cert\n")); 00366 return 1; 00367 } 00368 00369 pkey_ = X509_get_pubkey(cert); 00370 if (!pkey_) { 00371 OPENDDS_SSL_LOG_ERR("cache_dsign_algo_impl::operator(): x509_get_pubkey failed"); 00372 return 1; 00373 } 00374 00375 rsa_ = EVP_PKEY_get1_RSA(pkey_); 00376 if (rsa_) { 00377 dst = "RSASSA-PSS-SHA256"; 00378 return 0; 00379 } 00380 00381 ec_ = EVP_PKEY_get1_EC_KEY(pkey_); 00382 if (ec_) { 00383 dst = "ECDSA-SHA256"; 00384 return 0; 00385 } 00386 00387 ACE_ERROR((LM_WARNING, 00388 "(%P|%t) SSL::Certificate::cache_dsign_algo: WARNING, only RSASSA-PSS-SHA256 or " 00389 "ECDSA-SHA256 are currently supported signature/verification algorithms\n")); 00390 00391 return 1; 00392 }
EC_KEY* OpenDDS::Security::SSL::cache_dsign_algo_impl::ec_ [private] |
Definition at line 397 of file Certificate.cpp.
Referenced by operator()(), and ~cache_dsign_algo_impl().
Definition at line 395 of file Certificate.cpp.
Referenced by operator()(), and ~cache_dsign_algo_impl().
RSA* OpenDDS::Security::SSL::cache_dsign_algo_impl::rsa_ [private] |
Definition at line 396 of file Certificate.cpp.
Referenced by operator()(), and ~cache_dsign_algo_impl().