OpenDDS::Security::SSL::cache_dsign_algo_impl Struct Reference

List of all members.

Public Member Functions

 cache_dsign_algo_impl ()
 ~cache_dsign_algo_impl ()
int operator() (X509 *cert, std::string &dst)

Private Attributes

EVP_PKEYpkey_
RSA * rsa_
EC_KEY * ec_

Detailed Description

Definition at line 350 of file Certificate.cpp.


Constructor & Destructor Documentation

OpenDDS::Security::SSL::cache_dsign_algo_impl::cache_dsign_algo_impl (  )  [inline]

Definition at line 352 of file Certificate.cpp.

00352 : pkey_(NULL), rsa_(NULL), ec_(NULL) {}

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

Definition at line 353 of file Certificate.cpp.

References ec_, pkey_, and rsa_.

00354     {
00355       EVP_PKEY_free(pkey_);
00356       RSA_free(rsa_);
00357       EC_KEY_free(ec_);
00358     }


Member Function Documentation

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     }


Member Data Documentation

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().

Definition at line 396 of file Certificate.cpp.

Referenced by operator()(), and ~cache_dsign_algo_impl().


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

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1