irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

sslSockComm.cpp File Reference
#include "rodsClient.h"
#include "sslSockComm.h"
#include "irods_client_server_negotiation.hpp"
#include "rcGlobalExtern.h"
#include "packStruct.h"
Include dependency graph for sslSockComm.cpp:

Go to the source code of this file.

Macros

#define ASN1_STRING_get0_data   ASN1_STRING_data
 
#define DH_set0_pqg(dh_, p_, q_, g_)
 

Functions

static SSL_CTX * sslInit (char *certfile, char *keyfile)
 
static SSL * sslInitSocket (SSL_CTX *ctx, int sock)
 
static void sslLogError (char *msg)
 
static DH * get_dh2048 ()
 
static int sslLoadDHParams (SSL_CTX *ctx, char *file)
 
static int sslVerifyCallback (int ok, X509_STORE_CTX *store)
 
static int sslPostConnectionCheck (SSL *ssl, char *peer)
 
int sslStart (rcComm_t *rcComm)
 
int sslEnd (rcComm_t *rcComm)
 
int sslAccept (rsComm_t *rsComm)
 
int sslShutdown (rsComm_t *rsComm)
 
int sslReadMsgHeader (int sock, msgHeader_t *myHeader, struct timeval *tv, SSL *ssl)
 
int sslReadMsgBody (int sock, msgHeader_t *myHeader, bytesBuf_t *inputStructBBuf, bytesBuf_t *bsBBuf, bytesBuf_t *errorBBuf, irodsProt_t irodsProt, struct timeval *tv, SSL *ssl)
 
int sslWriteMsgHeader (msgHeader_t *myHeader, SSL *ssl)
 
int sslSendRodsMsg (char *msgType, bytesBuf_t *msgBBuf, bytesBuf_t *byteStreamBBuf, bytesBuf_t *errorBBuf, int intInfo, irodsProt_t irodsProt, SSL *ssl)
 
int sslRead (int sock, void *buf, int len, int *bytesRead, struct timeval *tv, SSL *ssl)
 
int sslWrite (void *buf, int len, int *bytesWritten, SSL *ssl)
 

Macro Definition Documentation

◆ ASN1_STRING_get0_data

#define ASN1_STRING_get0_data   ASN1_STRING_data

Definition at line 17 of file sslSockComm.cpp.

◆ DH_set0_pqg

#define DH_set0_pqg (   dh_,
  p_,
  q_,
  g_ 
)
Value:
dh_->p = p_; \
dh_->q = q_; \
dh_->g = g_;

Definition at line 18 of file sslSockComm.cpp.

Function Documentation

◆ get_dh2048()

static DH * get_dh2048 ( )
static

Definition at line 723 of file sslSockComm.cpp.

References DH_set0_pqg, NULL, and pid_age::p.

Referenced by sslLoadDHParams().

◆ sslAccept()

int sslAccept ( rsComm_t rsComm)

Definition at line 142 of file sslSockComm.cpp.

References irods::CS_NEG_USE_SSL(), getRodsEnv(), LOG_DEBUG, LOG_ERROR, rsComm_t::negotiation_results, NULL, rodsLog(), rsComm_t::sock, rsComm_t::ssl, rsComm_t::ssl_ctx, SSL_HANDSHAKE_ERROR, SSL_INIT_ERROR, rsComm_t::ssl_on, sslInit(), sslInitSocket(), sslLoadDHParams(), sslLogError(), and irods.pypyodbc::status.

Referenced by agentMain().

Here is the call graph for this function:

◆ sslEnd()

int sslEnd ( rcComm_t rcComm)

Definition at line 95 of file sslSockComm.cpp.

References irods::CS_NEG_USE_TCP(), LOG_DEBUG, LOG_ERROR, rcComm_t::negotiation_results, NULL, rcSslEnd(), rodsLog(), rodsLogError(), rcComm_t::ssl, rcComm_t::ssl_ctx, rcComm_t::ssl_on, SSL_SHUTDOWN_ERROR, sslLogError(), irods.pypyodbc::status, and USER__NULL_INPUT_ERR.

Referenced by clientLoginPam(), pam_auth_client_request(), rsPamAuthRequest(), and sslStart().

Here is the call graph for this function:

◆ sslInit()

static SSL_CTX * sslInit ( char *  certfile,
char *  keyfile 
)
static

Definition at line 600 of file sslSockComm.cpp.

References getRodsEnv(), LOG_ERROR, NULL, rodsLog(), SSL_CIPHER_LIST, sslLogError(), sslVerifyCallback(), and irods.pypyodbc::status.

Referenced by sslAccept(), and sslStart().

Here is the call graph for this function:

◆ sslInitSocket()

static SSL * sslInitSocket ( SSL_CTX *  ctx,
int  sock 
)
static

Definition at line 681 of file sslSockComm.cpp.

References NULL, and sslLogError().

Referenced by sslAccept(), and sslStart().

Here is the call graph for this function:

◆ sslLoadDHParams()

static int sslLoadDHParams ( SSL_CTX *  ctx,
char *  file 
)
static

Definition at line 767 of file sslSockComm.cpp.

References update_schema_ids_for_cmake::file, get_dh2048(), LOG_ERROR, NULL, rodsLog(), and sslLogError().

Referenced by sslAccept().

Here is the call graph for this function:

◆ sslLogError()

static void sslLogError ( char *  msg)
static

Definition at line 702 of file sslSockComm.cpp.

References buf, LOG_ERROR, and rodsLog().

Referenced by sslAccept(), sslEnd(), sslInit(), sslInitSocket(), sslLoadDHParams(), sslShutdown(), and sslStart().

Here is the call graph for this function:

◆ sslPostConnectionCheck()

static int sslPostConnectionCheck ( SSL *  ssl,
char *  peer 
)
static

Definition at line 818 of file sslSockComm.cpp.

References ASN1_STRING_get0_data, getRodsEnv(), LOG_ERROR, match(), generate_iadmin_commands_for_41_to_42_upgrade::name, NULL, rodsLog(), and irods.pypyodbc::status.

Referenced by sslStart().

Here is the call graph for this function:

◆ sslRead()

int sslRead ( int  sock,
void *  buf,
int  len,
int bytesRead,
struct timeval *  tv,
SSL *  ssl 
)

◆ sslReadMsgBody()

int sslReadMsgBody ( int  sock,
msgHeader_t myHeader,
bytesBuf_t inputStructBBuf,
bytesBuf_t bsBBuf,
bytesBuf_t errorBBuf,
irodsProt_t  irodsProt,
struct timeval *  tv,
SSL *  ssl 
)

Definition at line 296 of file sslSockComm.cpp.

References msgHeader::bsLen, BytesBuf::buf, msgHeader::errorLen, getRodsLogLevel(), BytesBuf::len, LOG_DEBUG8, LOG_NOTICE, msgHeader::msgLen, NULL, rodsLog(), sslRead(), SYS_HEADER_READ_LEN_ERR, SYS_READ_MSG_BODY_INPUT_ERR, SYS_READ_MSG_BODY_LEN_ERR, and XML_PROT.

Here is the call graph for this function:

◆ sslReadMsgHeader()

int sslReadMsgHeader ( int  sock,
msgHeader_t myHeader,
struct timeval *  tv,
SSL *  ssl 
)

Definition at line 226 of file sslSockComm.cpp.

References getRodsLogLevel(), LOG_DEBUG8, LOG_ERROR, MAX_NAME_LEN, NULL, rodsLog(), rodsLogError(), RodsPackTable, sslRead(), irods.pypyodbc::status, SYS_HEADER_READ_LEN_ERR, unpackStruct(), and XML_PROT.

Here is the call graph for this function:

◆ sslSendRodsMsg()

int sslSendRodsMsg ( char *  msgType,
bytesBuf_t msgBBuf,
bytesBuf_t byteStreamBBuf,
bytesBuf_t errorBBuf,
int  intInfo,
irodsProt_t  irodsProt,
SSL *  ssl 
)

Definition at line 444 of file sslSockComm.cpp.

References msgHeader::bsLen, BytesBuf::buf, msgHeader::errorLen, getRodsLogLevel(), HEADER_TYPE_LEN, msgHeader::intInfo, BytesBuf::len, LOG_DEBUG8, msgHeader::msgLen, NULL, rstrcpy(), sslWrite(), sslWriteMsgHeader(), irods.pypyodbc::status, msgHeader::type, and XML_PROT.

Here is the call graph for this function:

◆ sslShutdown()

int sslShutdown ( rsComm_t rsComm)

Definition at line 194 of file sslSockComm.cpp.

References irods::CS_NEG_USE_TCP(), LOG_DEBUG, rsComm_t::negotiation_results, NULL, rodsLog(), rsComm_t::ssl, rsComm_t::ssl_ctx, rsComm_t::ssl_on, SSL_SHUTDOWN_ERROR, sslLogError(), and irods.pypyodbc::status.

Referenced by agentMain().

Here is the call graph for this function:

◆ sslStart()

int sslStart ( rcComm_t rcComm)

◆ sslVerifyCallback()

static int sslVerifyCallback ( int  ok,
X509_STORE_CTX *  store 
)
static

Definition at line 796 of file sslSockComm.cpp.

References LOG_NOTICE, and rodsLog().

Referenced by sslInit().

Here is the call graph for this function:

◆ sslWrite()

int sslWrite ( void *  buf,
int  len,
int bytesWritten,
SSL *  ssl 
)

Definition at line 563 of file sslSockComm.cpp.

References buf, and NULL.

Referenced by _cliGetCollOprStat(), sslSendRodsMsg(), sslWriteMsgHeader(), and svrSendZoneCollOprStat().

◆ sslWriteMsgHeader()

int sslWriteMsgHeader ( msgHeader_t myHeader,
SSL *  ssl 
)

Definition at line 393 of file sslSockComm.cpp.

References BytesBuf::buf, freeBBuf(), getRodsLogLevel(), BytesBuf::len, LOG_DEBUG8, LOG_ERROR, NULL, packStruct(), rodsLog(), rodsLogError(), RodsPackTable, sslWrite(), irods.pypyodbc::status, SYS_HEADER_WRITE_LEN_ERR, and XML_PROT.

Referenced by sslSendRodsMsg().

Here is the call graph for this function: