diff --git a/baseproxy.hpp b/baseproxy.hpp index 67ac484..6a93d1a 100644 --- a/baseproxy.hpp +++ b/baseproxy.hpp @@ -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*); diff --git a/common/base64.hpp b/common/base64.hpp index b3e07a1..253d575 100644 --- a/common/base64.hpp +++ b/common/base64.hpp @@ -67,7 +67,7 @@ namespace libbase64 { } #endif - //characters used in convertions + //characters used in conversions namespace libbase64_characters { template inline static const T * getChar64(void){ diff --git a/common/internet.hpp b/common/internet.hpp index bbe94fa..0b03f95 100644 --- a/common/internet.hpp +++ b/common/internet.hpp @@ -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 /// @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); diff --git a/common/log/logan.hpp b/common/log/logan.hpp index 02ed6d5..998311d 100644 --- a/common/log/logan.hpp +++ b/common/log/logan.hpp @@ -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 { diff --git a/common/log/logger.hpp b/common/log/logger.hpp index 7f24824..c54df38 100644 --- a/common/log/logger.hpp +++ b/common/log/logger.hpp @@ -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; diff --git a/common/mpdisplay.cpp b/common/mpdisplay.cpp index 9e8e64a..3357c13 100644 --- a/common/mpdisplay.cpp +++ b/common/mpdisplay.cpp @@ -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 l(facility::lock()); unsigned char *p = data; diff --git a/common/shmbuffer.hpp b/common/shmbuffer.hpp index 9cfb065..c7a5f02 100644 --- a/common/shmbuffer.hpp +++ b/common/shmbuffer.hpp @@ -183,7 +183,7 @@ class shared_buffer { return false; } - bool dettach() { + bool detach() { auto const& log = get_log(); bool ret = true; diff --git a/hostcx.cpp b/hostcx.cpp index eff8c7f..c63dd4d 100644 --- a/hostcx.cpp +++ b/hostcx.cpp @@ -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); } } diff --git a/hostcx.hpp b/hostcx.hpp index 30e18a0..1f24050 100644 --- a/hostcx.hpp +++ b/hostcx.hpp @@ -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 @@ -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(); diff --git a/sslcertstore.cpp b/sslcertstore.cpp index d8eb5a0..eb01136 100644 --- a/sslcertstore.cpp +++ b/sslcertstore.cpp @@ -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 @@ -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); @@ -1511,7 +1511,7 @@ std::string SSLFactory::print_cert(X509* x, int indent, bool add_cr) { } else { num_of_exts = 0; - s << pref << " Extensions: \n"); + s << pref << " Extensions: \n"); } for (int i=0; i < num_of_exts; i++) { diff --git a/sslcertval.cpp b/sslcertval.cpp index 21187a6..2f2ce6f 100644 --- a/sslcertval.cpp +++ b/sslcertval.cpp @@ -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); @@ -998,4 +998,4 @@ namespace inet { return true; } } -} \ No newline at end of file +} diff --git a/sslcertval.hpp b/sslcertval.hpp index c7d5f14..49d8789 100644 --- a/sslcertval.hpp +++ b/sslcertval.hpp @@ -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_; } diff --git a/sslcom.hpp b/sslcom.hpp index af244ef..586f280 100644 --- a/sslcom.hpp +++ b/sslcom.hpp @@ -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; }; @@ -361,7 +361,7 @@ class baseSSLCom : public L4Proto, public virtual baseCom { std::shared_ptr> 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 @@ -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 */ ; diff --git a/threadedreceiver.cpp b/threadedreceiver.cpp index 84a0f78..52e38a6 100644 --- a/threadedreceiver.cpp +++ b/threadedreceiver.cpp @@ -228,7 +228,7 @@ int ThreadedReceiver::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); @@ -561,4 +561,4 @@ int ThreadedReceiverProxy::handle_sockets_once(baseCom* xcom) { -#endif \ No newline at end of file +#endif diff --git a/udpcom.cpp b/udpcom.cpp index 10271e2..03ebbc5 100644 --- a/udpcom.cpp +++ b/udpcom.cpp @@ -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; diff --git a/uxcom.cpp b/uxcom.cpp index 1bcce6a..e9ed043 100644 --- a/uxcom.cpp +++ b/uxcom.cpp @@ -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()); } }