245 if(*test_err_ctr >= 0){
247 if(*test_err_ctr < 0){
304 return calloc(nelem, elsize);
320 return close(fildes);
334 const struct sockaddr *address,
335 socklen_t address_len){
337 errno = ECONNREFUSED;
340 return connect(socket, address, address_len);
424 const unsigned char *d,
427 unsigned int *md_len){
431 return HMAC(evp_md, key, key_len, d, n, md, md_len);
517 size_t bytes_inject_len;
525 assert(bytes_inject_len < length && bytes_inject_len < LONG_MAX);
527 return (
long)bytes_inject_len;
532 return recv(socket, buffer, length, flags);
556 struct timeval *timeout){
561 return select(nfds, readfds, writefds, errorfds, timeout);
580 size_t bytes_to_send;
587 bytes_to_send = length;
591 sent_bytes =
send(socket, buffer, bytes_to_send, flags);
613 return socket(domain, type, protocol);
729 size_t bytes_inject_len;
734 assert(bytes_inject_len < (
size_t)num && bytes_inject_len < INT_MAX);
736 return (
int)bytes_inject_len;
772 const char *format, ...){
780 va_start(ap, format);
781 rc = vsprintf(s, format, ap);
int g_smtp_test_err_fclose_ctr
int g_smtp_test_err_ssl_read_ctr
unsigned long smtp_test_seam_err_peek_error(void)
int smtp_test_seam_ssl_write(SSL *ssl, const void *buf, int num)
SSL * smtp_test_seam_ssl_new(SSL_CTX *ctx)
int g_smtp_test_err_err_peek_error_ctr
int g_smtp_test_err_recv_rc
SSL_CTX * smtp_test_seam_ssl_ctx_new(const SSL_METHOD *method)
int smtp_test_seam_ssl_connect(SSL *ssl)
BIO * smtp_test_seam_bio_new_socket(int sock, int close_flag)
unsigned char * smtp_test_seam_hmac(const EVP_MD *evp_md, const void *key, int key_len, const unsigned char *d, size_t n, unsigned char *md, unsigned int *md_len)
int smtp_test_seam_socket(int domain, int type, int protocol)
X509 * smtp_test_seam_ssl_get_peer_certificate(const SSL *ssl)
Test the smtp-client library.
int g_smtp_test_err_close_ctr
int g_smtp_test_err_ssl_ctx_new_ctr
int g_smtp_test_err_hmac_ctr
int g_smtp_test_err_ssl_new_ctr
int smtp_test_seam_connect(int socket, const struct sockaddr *address, socklen_t address_len)
int g_smtp_test_err_mktime_ctr
int g_smtp_test_err_localtime_r_ctr
int g_smtp_test_err_ssl_connect_ctr
int g_smtp_test_strlen_custom_ret
time_t smtp_test_seam_mktime(struct tm *timeptr)
int g_smtp_test_err_ssl_get_peer_certificate_ctr
int g_smtp_test_err_recv_ctr
#define SSL_get_peer_certificate
struct tm * smtp_test_seam_gmtime_r(const time_t *timep, struct tm *result)
int g_smtp_test_err_realloc_ctr
int g_smtp_test_err_x509_check_host_ctr
int g_smtp_test_err_ssl_write_ctr
int g_smtp_test_err_sprintf_ctr
int g_smtp_test_err_si_sub_size_t_ctr
int smtp_test_seam_ssl_read(SSL *ssl, void *buf, int num)
int g_smtp_test_err_bio_should_retry_rc
int smtp_test_seam_x509_check_host(X509 *cert, const char *name, size_t namelen, unsigned int flags, char **peername)
int g_smtp_test_err_ferror_ctr
void * smtp_test_seam_realloc(void *ptr, size_t size)
int g_smtp_test_err_gmtime_r_ctr
size_t g_smtp_test_strlen_ret_value
int smtp_test_seam_ferror(FILE *stream)
int g_smtp_test_err_bio_new_socket_ctr
void * smtp_test_seam_calloc(size_t nelem, size_t elsize)
int smtp_test_seam_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout)
int smtp_test_seam_sprintf(char *s, const char *format,...)
int g_smtp_test_send_one_byte
char g_smtp_test_err_recv_bytes[90]
struct tm * smtp_test_seam_localtime_r(const time_t *timep, struct tm *result)
int g_smtp_test_err_si_add_size_t_ctr
int g_smtp_test_err_malloc_ctr
int smtp_test_seam_close(int fildes)
int g_smtp_test_time_custom_ret
int smtp_test_seam_fclose(FILE *stream)
long smtp_test_seam_recv(int socket, void *buffer, size_t length, int flags)
int g_smtp_test_err_select_ctr
size_t smtp_test_seam_strlen(const char *s)
int g_smtp_test_err_connect_ctr
int g_smtp_test_err_si_mul_size_t_ctr
int smtp_test_seam_dec_err_ctr(int *const test_err_ctr)
time_t smtp_test_seam_time(time_t *tloc)
int g_smtp_test_err_sprintf_rc
void * smtp_test_seam_malloc(size_t size)
ssize_t smtp_test_seam_send(int socket, const void *buffer, size_t length, int flags)
int g_smtp_test_err_send_ctr
int g_smtp_test_err_bio_should_retry_ctr
int g_smtp_test_err_ssl_do_handshake_ctr
int g_smtp_test_err_socket_ctr
int smtp_test_seam_bio_should_retry(BIO *bio)
int smtp_test_seam_ssl_do_handshake(SSL *ssl)
time_t g_smtp_test_time_ret_value
int g_smtp_test_err_calloc_ctr