diff options
author | Ted Zlatanov <tzz@lifelogs.com> | 2011-04-24 20:30:51 -0500 |
---|---|---|
committer | Ted Zlatanov <tzz@lifelogs.com> | 2011-04-24 20:30:51 -0500 |
commit | e061a11b5a59f02fac66184e991f01a433f6dc8d (patch) | |
tree | ccff6a6012dbc1ed4ce247b9e4e84a38c5eb34af /src/w32.h | |
parent | 33630d51504adc5b2a0289f356c0a1a49f0bd10a (diff) | |
download | emacs-e061a11b5a59f02fac66184e991f01a433f6dc8d.tar.gz |
Add GnuTLS support for W32 and certificate and hostname verification in GnuTLS.
* src/gnutls.c: Renamed global_initialized to
gnutls_global_initialized. Added internals for the
:verify-hostname-error, :verify-error, and :verify-flags
parameters of `gnutls-boot' and documented those parameters in the
docstring. Start callback support.
(emacs_gnutls_handshake): Add Woe32 support. Retry handshake
unless a fatal error occured. Call gnutls_alert_send_appropriate
on error. Return error code.
(emacs_gnutls_write): Call emacs_gnutls_handle_error.
(emacs_gnutls_read): Likewise.
(Fgnutls_boot): Return handshake error code.
(emacs_gnutls_handle_error): New function.
(wsaerror_to_errno): Likewise.
* src/gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
callbacks stage.
* src/w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
(emacs_gnutls_push): Likewise.
* src/w32.h (emacs_gnutls_pull): Add prototype.
(emacs_gnutls_push): Likewise.
Diffstat (limited to 'src/w32.h')
-rw-r--r-- | src/w32.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/w32.h b/src/w32.h index 9279ddbe579..4086c4190e1 100644 --- a/src/w32.h +++ b/src/w32.h @@ -143,5 +143,17 @@ extern void syms_of_fontset (void); extern int _sys_read_ahead (int fd); extern int _sys_wait_accept (int fd); +#ifdef HAVE_GNUTLS +#include <gnutls/gnutls.h> + +/* GnuTLS pull (read from remote) interface. */ +extern ssize_t emacs_gnutls_pull (gnutls_transport_ptr_t p, + void* buf, size_t sz); + +/* GnuTLS push (write to remote) interface. */ +extern ssize_t emacs_gnutls_push (gnutls_transport_ptr_t p, + const void* buf, size_t sz); +#endif /* HAVE_GNUTLS */ + #endif /* EMACS_W32_H */ |