Skip to content

Commit

Permalink
tlsopenssl: deleted an unused map for psk server context
Browse files Browse the repository at this point in the history
  • Loading branch information
franku committed Aug 30, 2018
1 parent 051657f commit 85bd139
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
8 changes: 0 additions & 8 deletions core/src/lib/tls_openssl_private.cc
Expand Up @@ -33,7 +33,6 @@
#include <openssl/ssl.h>

/* static private */
std::map<const SSL_CTX *, PskCredentials> TlsOpenSslPrivate::psk_server_credentials;
std::map<const SSL_CTX *, PskCredentials> TlsOpenSslPrivate::psk_client_credentials;

TlsOpenSslPrivate::TlsOpenSslPrivate()
Expand All @@ -46,7 +45,6 @@ TlsOpenSslPrivate::~TlsOpenSslPrivate() // FreeTlsContext
{
Dmsg0(100, "Destruct TlsOpenSslPrivate\n");
if (openssl_ctx_) {
psk_server_credentials.erase(openssl_ctx_);
psk_client_credentials.erase(openssl_ctx_);
SSL_CTX_free(openssl_ctx_);
}
Expand Down Expand Up @@ -231,12 +229,6 @@ void TlsOpenSslPrivate::ClientContextInsertCredentials(const PskCredentials &cre
std::pair<const SSL_CTX *, PskCredentials>(openssl_ctx_, credentials));
}

void TlsOpenSslPrivate::ServerContextInsertCredentials(const PskCredentials &credentials)
{
TlsOpenSslPrivate::psk_server_credentials.insert(
std::pair<const SSL_CTX *, PskCredentials>(openssl_ctx_, credentials));
}

unsigned int TlsOpenSslPrivate::psk_server_cb(SSL *ssl,
const char *identity,
unsigned char *psk_output,
Expand Down
3 changes: 2 additions & 1 deletion core/src/lib/tls_openssl_private.h
Expand Up @@ -58,10 +58,11 @@ class TlsOpenSslPrivate {
SSL_CTX *openssl_ctx_;

/* psk attributes list for all connections */
static std::map<const SSL_CTX *, PskCredentials> psk_server_credentials;
static std::map<const SSL_CTX *, PskCredentials> psk_client_credentials;
/* *************** */



/* cert attributes */
int tcp_file_descriptor_;
std::string ca_certfile_;
Expand Down

0 comments on commit 85bd139

Please sign in to comment.