X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=ssl.h;h=f62f9735790e07f452efa121073611de498eb6e0;hp=33ab33a168c526322e051f1f5930bd102c712174;hb=1205368cff93804e75a130fb92891328f443f766;hpb=2ce0e12445718fed0b44598b70dd18525fb6620b diff --git a/ssl.h b/ssl.h index 33ab33a1..f62f9735 100644 --- a/ssl.h +++ b/ssl.h @@ -34,9 +34,9 @@ /* * Values for flag determining certificate validity. * These values are compatible with return value of function - * mbedtls_ssl_get_verify_result. There is not value for invalid - * certificate, this value is setted by function - * mbedtls_ssl_get_verify_result. + * mbedtls_ssl_get_verify_result(). There is no value for + * "invalid certificate", this value is set by the function + * mbedtls_ssl_get_verify_result(). */ #define SSL_CERT_VALID 0 #define SSL_CERT_NOT_VERIFIED 0xFFFFFFFF @@ -46,16 +46,18 @@ static mbedtls_ctr_drbg_context ctr_drbg; static mbedtls_entropy_context entropy; static int rng_seeded; -/* Boolean functions to get informations about TLS/SSL connections */ +/* Boolean functions to get information about TLS/SSL connections */ extern int client_use_ssl(const struct client_state *csp); extern int server_use_ssl(const struct client_state *csp); extern size_t is_ssl_pending(mbedtls_ssl_context *ssl); -extern int tunnel_established_successfully(const char * response, unsigned int response_len); +extern int tunnel_established_successfully(const char *response, unsigned int response_len); /* Functions for sending and receiving data over TLS/SSL connections */ -extern int ssl_send_data(mbedtls_ssl_context * ssl, const unsigned char * buf, size_t len); -extern int ssl_recv_data(mbedtls_ssl_context * ssl, unsigned char * buf, size_t maxLen); -extern long ssl_flush_socket(mbedtls_ssl_context * ssl, struct iob *iob); +extern int ssl_send_data(mbedtls_ssl_context *ssl, const unsigned char *buf, size_t len); +extern int ssl_send_data_delayed(mbedtls_ssl_context *ssl, const unsigned char *buf, + size_t len, unsigned int delay); +extern int ssl_recv_data(mbedtls_ssl_context *ssl, unsigned char *buf, size_t maxLen); +extern long ssl_flush_socket(mbedtls_ssl_context *ssl, struct iob *iob); extern void ssl_send_certificate_error(struct client_state *csp); /* Functions for opening and closing TLS/SSL connections */