#include <openssl/base.h>
#include <string>
#include <vector>
#include <errno.h>
#include <limits.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <unistd.h>
#include <openssl/err.h>
#include <openssl/ssl.h>
#include <openssl/x509.h>
#include "../crypto/internal.h"
#include "internal.h"
#include "transport_common.h"
Go to the source code of this file.
Classes | |
class | SocketLineReader |
class | SocketWaiter |
Macros | |
#define | _SCL_SECURE_NO_WARNINGS |
Typedefs | |
using | socket_result_t = ssize_t |
Enumerations | |
enum | StdinWait { StdinWait::kStdinRead, StdinWait::kSocketWrite } |
Functions | |
static int | closesocket (int sock) |
bool | Connect (int *out_sock, const std::string &hostname_and_port) |
bool | DoHTTPTunnel (int sock, const std::string &hostname_and_port) |
bool | DoSMTPStartTLS (int sock) |
static std::string | GetLastSocketErrorString () |
bool | InitSocketLibrary () |
void | PrintConnectionInfo (BIO *bio, const SSL *ssl) |
static void | PrintSocketError (const char *function) |
void | PrintSSLError (FILE *file, const char *msg, int ssl_err, int ret) |
static bool | SendAll (int sock, const char *data, size_t data_len) |
bool | SocketSetNonBlocking (int sock, bool is_non_blocking) |
static void | SplitHostPort (std::string *out_hostname, std::string *out_port, const std::string &hostname_and_port) |
bool | TransferData (SSL *ssl, int sock) |
bool | VersionFromString (uint16_t *out_version, const std::string &version) |
#define _SCL_SECURE_NO_WARNINGS |
Definition at line 20 of file transport_common.cc.
using socket_result_t = ssize_t |
Definition at line 73 of file transport_common.cc.
|
strong |
Enumerator | |
---|---|
kStdinRead | |
kSocketWrite |
Definition at line 378 of file transport_common.cc.
Definition at line 74 of file transport_common.cc.
Definition at line 142 of file transport_common.cc.
Definition at line 958 of file transport_common.cc.
Definition at line 901 of file transport_common.cc.
|
static |
Definition at line 112 of file transport_common.cc.
bool InitSocketLibrary | ( | ) |
Definition at line 79 of file transport_common.cc.
Definition at line 284 of file transport_common.cc.
|
static |
Definition at line 132 of file transport_common.cc.
Definition at line 659 of file transport_common.cc.
Definition at line 881 of file transport_common.cc.
Definition at line 354 of file transport_common.cc.
|
static |
Definition at line 91 of file transport_common.cc.
Definition at line 682 of file transport_common.cc.
Definition at line 267 of file transport_common.cc.