diff options
| author | Ted Zlatanov | 2012-04-09 08:46:16 -0400 |
|---|---|---|
| committer | Ted Zlatanov | 2012-04-09 08:46:16 -0400 |
| commit | a18ecafa99e7e7c3caa35ed68dd8a7b9b5d2b8e3 (patch) | |
| tree | 51714f1203b0b06d44591f57f245ca7c94acde48 /src/process.c | |
| parent | b4d3bc10dc84f6b01a2b6b215d0e489555aa6edd (diff) | |
| download | emacs-a18ecafa99e7e7c3caa35ed68dd8a7b9b5d2b8e3.tar.gz emacs-a18ecafa99e7e7c3caa35ed68dd8a7b9b5d2b8e3.zip | |
Limit number of GnuTLS handshakes per connection.
* gnutls.c (gnutls_log_function2i): Convenience log function.
(emacs_gnutls_read): Use new log functions,
`gnutls_handshakes_tried' process member, and
`GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
attempts per process (connection).
* gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit. Add
convenience `GNUTLS_LOG2i' macro.
* process.c (make_process):
* process.h: Add integer `gnutls_handshakes_tried' member to
process struct.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/process.c b/src/process.c index f2f33a9eafc..dc43191ebef 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -640,7 +640,10 @@ make_process (Lisp_Object name) | |||
| 640 | 640 | ||
| 641 | #ifdef HAVE_GNUTLS | 641 | #ifdef HAVE_GNUTLS |
| 642 | p->gnutls_initstage = GNUTLS_STAGE_EMPTY; | 642 | p->gnutls_initstage = GNUTLS_STAGE_EMPTY; |
| 643 | /* Default log level. */ | ||
| 643 | p->gnutls_log_level = 0; | 644 | p->gnutls_log_level = 0; |
| 645 | /* GnuTLS handshakes attempted for this connection. */ | ||
| 646 | p->gnutls_handshakes_tried = 0; | ||
| 644 | p->gnutls_p = 0; | 647 | p->gnutls_p = 0; |
| 645 | p->gnutls_state = NULL; | 648 | p->gnutls_state = NULL; |
| 646 | p->gnutls_x509_cred = NULL; | 649 | p->gnutls_x509_cred = NULL; |