Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion baseproxy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ class baseProxy : public epoll_handler, public Proxy
inline bool pollroot() const { return pollroot_; };
inline void pollroot(bool b) { pollroot_ = b; };

// overide to create custom context objects
// override to create custom context objects
virtual baseHostCX* new_cx(int);
virtual baseHostCX* new_cx(const char*, const char*);

Expand Down
2 changes: 1 addition & 1 deletion common/base64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ namespace libbase64 {
}
#endif

//characters used in convertions
//characters used in conversions
namespace libbase64_characters {
template<typename T>
inline static const T * getChar64(void){
Expand Down
8 changes: 4 additions & 4 deletions common/internet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ namespace inet {
/// @param url 'url' full resource URL
/// @param buf 'buf' buffer where to save the content. Note: buffer doesn't have to be pre-allocated.
/// @param ipv 'ipv' specify IP version. Can be 4 or 6. Anything else implies IPv4.
/// @param timout 'timeout' timeout of the operation
/// @param timeout 'timeout' timeout of the operation

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change. Is it OK to change this parameter, since version 1.0.0 has not been released yet?

/// @return returns the size of retrieved content bytes (not size of data received on socket). Negative on error.
int download(const std::string& url, buffer& buf, int timout, int ipv = 4);
int download(const std::string& url, buffer& buf, int timeout, int ipv = 4);

/// @brief Opens a socket to IP address and sends raw bytes. Expects HTTP response.
/// @param request 'request' raw string with request body
/// @param port 'port' port number to connect to
/// @param buf 'buf' buffer where to save the content. Note: buffer doesn't have to be pre-allocated.
/// @param timout 'timeout' timeout of the operation
/// @param timeout 'timeout' timeout of the operation
/// @return returns the size of retrieved content bytes (not size of data received on socket). Negative on error.
int http_get(const std::string& request, const std::string& ip_address, int port, buffer& buf, int timout=10);
int http_get(const std::string& request, const std::string& ip_address, int port, buffer& buf, int timeout=10);

/// @brief is it IPv4?
bool is_ipv4_address(const std::string& str);
Expand Down
4 changes: 2 additions & 2 deletions common/log/logan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ class logan_lite {

private:
mutable std::shared_mutex lock_;
// loging name in catalogue
// logging name in catalogue
std::string topic_;

// loging message prefix in log line
// logging message prefix in log line
static thread_local inline std::string context_ {};

struct ContextFilter {
Expand Down
2 changes: 1 addition & 1 deletion common/log/logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class logger_profile {
//should we print also source with line, if loglevel >= DIA?
bool print_srcline_ = true;

//should we print it always, regarless of log level?
//should we print it always, regardless of log level?
bool print_srcline_always_ = false;


Expand Down
2 changes: 1 addition & 1 deletion common/mpdisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace mp {
* (in a single line of course)
*/

// there could be more precious implemenatation of this in the future
// there could be more precious implementation of this in the future
std::lock_guard<std::recursive_mutex> l(facility::lock());

unsigned char *p = data;
Expand Down
2 changes: 1 addition & 1 deletion common/shmbuffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class shared_buffer {
return false;
}

bool dettach() {
bool detach() {

auto const& log = get_log();
bool ret = true;
Expand Down
2 changes: 1 addition & 1 deletion hostcx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ int baseHostCX::write() {
if(rescan_out_flag_) {
rescan_out_flag_ = false;

// stop monitoring write which results in loop an unnecesary write() calls
// stop monitoring write which results in loop an unnecessary write() calls
com()->change_monitor(socket(), EPOLLIN);
}
}
Expand Down
4 changes: 2 additions & 2 deletions hostcx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ bool operator==(const Host& h, const Host& hh);
* and as such they can be removed from @ref readbuf_ - we call it they can he **finished**, see @ref finish().
*
* Default implementation of @ref process() returns size of readbuf_ -- when also [auto_finish](@ref auto_finish) returns true, this case consecutive calls of read()
* will just auto- finish() received bytes and new bytes will be copied into @ref readbuf_ . It's clear that @ref process() is good candidate for overiding. Process
* will just auto- finish() received bytes and new bytes will be copied into @ref readbuf_ . It's clear that @ref process() is good candidate for overriding. Process
* received data and return how much of bytes you've processed and you don't need anymore.
*
* This is happening regardless of [auto_finish] (@ref auto_finish()) feature, since
Expand Down Expand Up @@ -459,7 +459,7 @@ class baseHostCX : public Host
ssize_t io_write(unsigned char* data, size_t tx_size, int flags) const;


//overide this, and return number of bytes to be possible to passed to application/another hostcx
//override this, and return number of bytes to be possible to passed to application/another hostcx
//
virtual std::size_t process_in();
virtual std::size_t process_out();
Expand Down
6 changes: 3 additions & 3 deletions sslcertstore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ SSL_CTX* SSLFactory::client_ctx_setup(const char* ciphers) {
exit(3);
}

ciphers == nullptr ? SSL_CTX_set_cipher_list(ctx,"ALL:!ADH:!LOW:!aNULL:!EXP:!MD5:@STRENGTH") : SSL_CTX_set_cipher_list(ctx,ciphers);
ciphers == nullptr ? SSL_CTX_set_cipher_list(ctx,"ALL:!ADH:!LOW:!annul:!EXP:!MD5:@STRENGTH") : SSL_CTX_set_cipher_list(ctx,ciphers);

auto ctx_options = def_cl_options;
#ifdef USE_OPENSSL300
Expand Down Expand Up @@ -425,7 +425,7 @@ SSL_CTX* SSLFactory::client_dtls_ctx_setup(const char* ciphers) {
exit(3);
}

ciphers == nullptr ? SSL_CTX_set_cipher_list(ctx,"ALL:!ADH:!LOW:!aNULL:!EXP:!MD5:@STRENGTH") : SSL_CTX_set_cipher_list(ctx,ciphers);
ciphers == nullptr ? SSL_CTX_set_cipher_list(ctx,"ALL:!ADH:!LOW:!annul:!EXP:!MD5:@STRENGTH") : SSL_CTX_set_cipher_list(ctx,ciphers);

SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_NO_INTERNAL);

Expand Down Expand Up @@ -1511,7 +1511,7 @@ std::string SSLFactory::print_cert(X509* x, int indent, bool add_cr) {

} else {
num_of_exts = 0;
s << pref << " Extensions: <no extenstions in the certificate> \n");
s << pref << " Extensions: <no extensions in the certificate> \n");
}

for (int i=0; i < num_of_exts; i++) {
Expand Down
4 changes: 2 additions & 2 deletions sslcertval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ namespace inet {
timer_ = ::time(nullptr);


// cound be init in previous iteration
// could be init in previous iteration
if(conn_bio) {
_err("OcspQuery::do_prepare_target[0x%lx]: removing old connection", ref_id);
BIO_free(conn_bio);
Expand Down Expand Up @@ -998,4 +998,4 @@ namespace inet {
return true;
}
}
}
}
2 changes: 1 addition & 1 deletion sslcertval.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ namespace inet {
bool do_send_request ();

int timeout_request = 5;
// proces received response
// process received response
bool do_process_response ();

[[nodiscard]] int state() const { return state_; }
Expand Down
6 changes: 3 additions & 3 deletions sslcom.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ struct SSLComOptionsCert {

struct SSLComOptionsOcsp {
bool stapling_enabled = false; // should we insist on OCSP response?
int stapling_mode = 0; // 0 - allow all, log unverified. 1 - allow all, but don't allow unverified. 2 - as 1. but require all connections to have stapling reponse
int stapling_mode = 0; // 0 - allow all, log unverified. 1 - allow all, but don't allow unverified. 2 - as 1. but require all connections to have stapling response
bool enforce_in_verify = false; // stapling was not able to get status, we need use OCSP at the end of verify
int mode = 0;
};
Expand Down Expand Up @@ -361,7 +361,7 @@ class baseSSLCom : public L4Proto, public virtual baseCom {
std::shared_ptr<std::vector<std::string>> sni_filter_to_bypass_;
bool sni_filter_to_bypass_matched = false;

//try to set peer's key/certificate from cache (succeeds if peer haven't yet started ssl handhake and if there is cert in the cache).
//try to set peer's key/certificate from cache (succeeds if peer haven't yet started ssl handshake and if there is cert in the cache).
//For server side only.
bool enforce_peer_cert_from_cache(std::string & subj);
//it's set to true if we used cached cert
Expand Down Expand Up @@ -644,7 +644,7 @@ struct ec_point_st {
BIGNUM Y;
BIGNUM Z; /* Jacobian projective coordinates: (X, Y, Z)
* represents (X/Z^2, Y/Z^3) if Z != 0 */
int Z_is_one; /* enable optimized point arithmetics for
int Z_is_one; /* enable optimized point arithmetic for
* special case */
} /* EC_POINT */ ;

Expand Down
4 changes: 2 additions & 2 deletions threadedreceiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ int ThreadedReceiver<Worker>::add_first_datagrams(int sock, SocketInfo& pinfo) {
_err("ThreadedReceiver::add_first_datagrams[%d]: cannot enqueue data of size %d", sock, red);
}

// crate sockets only for new entries
// create sockets only for new entries
if(new_entry) {
entry->socket_left = pinfo.create_socket_left(com()->l4_proto());
hint_push_all(session_key);
Expand Down Expand Up @@ -561,4 +561,4 @@ int ThreadedReceiverProxy<SubWorker>::handle_sockets_once(baseCom* xcom) {



#endif
#endif
2 changes: 1 addition & 1 deletion udpcom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ ssize_t UDPCom::write_to_pool(int _fd, const void* _buf, size_t _n, int _flags)
if(record->socket_left.has_value()) {
da_socket = record->socket_left.value();
} else {
_deb("Constucting IPv6 pktinfo");
_deb("Constructing IPv6 pktinfo");

cmsg->cmsg_level = IPPROTO_IPV6;
cmsg->cmsg_type = IPV6_PKTINFO;
Expand Down
4 changes: 2 additions & 2 deletions uxcom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ int UxCom::connect(const char* host, const char* noop_port) {

if (::connect(sfd, (struct sockaddr *) &server, sizeof(struct sockaddr_un)) < 0) {
if ( errno == EINPROGRESS ) {
_deb("UxCom::connect[%s:%s]: socket[%d]: connnect errno: EINPROGRESS", host, port, sfd);
_deb("UxCom::connect[%s:%s]: socket[%d]: connect errno: EINPROGRESS", host, port, sfd);

} else {
close(sfd);
sfd = 0;
_not("UxCom::connect[%s:%s]: socket[%d]: connnect errno: %s", host, port, sfd, string_error().c_str());
_not("UxCom::connect[%s:%s]: socket[%d]: connect errno: %s", host, port, sfd, string_error().c_str());
}

}
Expand Down