#ifdef DO_MAIL
#ifndef DONE_SSLTRACK
#define DONE_SSLTRACK 1
BIO *TBIO_new_fp(FILE *stream, int close_flag, char *src, int line);
BIO *TBIO_new_socket(int sock, int close_flag, char *src, int line);
BIO *TBIO_new_mem_buf(const void *buf, int len, char *src, int line);
void TBIO_free_all(BIO *b, char *src, int line);
void TBIO_free(BIO *b, char *src, int line);
void TSSL_set_bio(SSL *a, BIO *r, BIO *w);
BIO *	TBIO_new(BIO_METHOD *type, char *src, int line);

void TSSL_free(SSL *ssl);
SSL *TSSL_new(SSL_CTX *ctx);

SSL_CTX *TSSL_CTX_new(const SSL_METHOD *meth, char *file, int line);
void TSSL_CTX_free(SSL_CTX *x);

EVP_PKEY * TEVP_PKEY_new(void);
EVP_PKEY *TPEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x,pem_password_cb *cb, void *u);
void TEVP_PKEY_free(EVP_PKEY *pkey);

X509 *TPEM_read_bio_X509(BIO *bp, X509 **x, pem_password_cb *cb, void *u);
X509 *TX509_new(void);
void TX509_free(X509 *a);

void TRSA_free(RSA *rsa);
RSA * TRSA_new(void);

int tssl_count_ssl(void);

#define BIO_new(a) TBIO_new(a,__FILE__,__LINE__)
#define BIO_new_fp(a,b) TBIO_new_fp(a,b,__FILE__,__LINE__)
#define BIO_new_socket(a,b) TBIO_new_socket(a,b,__FILE__,__LINE__)
#define BIO_new_mem_buf(a,b) TBIO_new_mem_buf(a,b,__FILE__,__LINE__)
#define BIO_free_all(x) TBIO_free_all(x,__FILE__,__LINE__)
#define BIO_free(x) TBIO_free(x,__FILE__,__LINE__)
#define SSL_set_bio TSSL_set_bio

#define SSL_free TSSL_free
#define SSL_new TSSL_new

#define SSL_CTX_new(aa) TSSL_CTX_new(aa,__FILE__,__LINE__)
#define SSL_CTX_free TSSL_CTX_free

#define PEM_read_bio_PrivateKey TPEM_read_bio_PrivateKey
#define EVP_PKEY_new TEVP_PKEY_new
#define EVP_PKEY_free TEVP_PKEY_free

#define PEM_read_bio_X509 TPEM_read_bio_X509

#define X509_new TX509_new
#define X509_free TX509_free

#define RSA_free TRSA_free
#define RSA_new TRSA_new


#endif
#endif
