1. 15 Jul, 2011 1 commit
  2. 13 Jul, 2011 1 commit
  3. 05 Jul, 2011 1 commit
  4. 04 Jul, 2011 1 commit
  5. 28 Jun, 2011 1 commit
  6. 24 Jun, 2011 2 commits
  7. 30 May, 2011 1 commit
    • Paul Eggert's avatar
      * gnutls.c: Use Emacs's memory allocators. · 9cf9f756
      Paul Eggert authored
      Without this change, the gnutls library would invoke malloc etc.
      directly, which causes problems on non-SYNC_INPUT hosts, and which
      runs afoul of improving memory_full behavior.
      (fn_gnutls_global_set_mem_functions): New macro or function pointer.
      (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
      xfree instead of the default malloc, realloc, free.
      (Fgnutls_boot): No need to check for memory allocation failure,
      since xmalloc does that for us.
      9cf9f756
  8. 23 May, 2011 1 commit
    • Paul Eggert's avatar
      * gnutls.c: Remove unused macros. · 7400048f
      Paul Eggert authored
      (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
      (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
      Remove macros that are defined and never used.
      Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
      7400048f
  9. 06 May, 2011 1 commit
  10. 05 May, 2011 2 commits
  11. 04 May, 2011 3 commits
    • Juanma Barranquero's avatar
      src/gnutls.c: Remove unused parameter `fildes'. · e968f4f3
      Juanma Barranquero authored
      * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
      * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
        Remove unused parameter `fildes'.
      * process.c (read_process_output, send_process): Don't pass it.
      e968f4f3
    • Juanma Barranquero's avatar
      Implement dynamic loading of GnuTLS on Windows. · 0898ca10
      Juanma Barranquero authored
      * lisp/term/w32-win.el (dynamic-library-alist): Add `gnutls'.
      
      * nt/INSTALL: Clarify GnuTLS support.
      
      * src/callproc.c, src/emacs.c: Include lisp.h before src/w32.h, not after.
      
      * src/gnutls.c (Qgnutls_dll): Define.
        (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
        (gnutls_*): Declare function pointers.
        (init_gnutls_functions): New function to initialize function pointers.
        (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
        (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
        (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
        Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
        (emacs_gnutls_write, emacs_gnutls_read)
        (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
        (Fgnutls_available_p): New function.
        (Fgnutls_boot): Call Fgnutls_available_p.  Use function pointers.
        (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
        (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
      
      * src/gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
        (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
        (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
        Declare.
      
      * src/w32.c (QCloaded_from, Vlibrary_cache): Define.
        (w32_delayed_load): Move from image.c.  When loading a library, record
        its filename in the :loaded-from property of the library id.
        (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
        Initialize and staticpro them.
        (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
      
      * src/image.c: Include w32.h.
        (Vimage_type_cache): Delete.
        (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
        (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
        (w32_delayed_load): Move to w32.c.
      
      * src/process.c: Include lisp.h before src/w32.h, not after.
        (wait_reading_process_output): Call emacs_gnutls_record_check_pending
        instead of gnutls_record_check_pending.
      
      * src/w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
      0898ca10
    • Ted Zlatanov's avatar
      Support :keylist and :crlfiles options to `gnutls-boot' and use them. · ff4de4aa
      Ted Zlatanov authored
      * src/gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
      instead of :keyfiles.  Give GnuTLS the keylist and the CRL lists
      as passed in.
      ff4de4aa
  12. 02 May, 2011 1 commit
  13. 26 Apr, 2011 6 commits
  14. 25 Apr, 2011 2 commits
    • Eli Zaretskii's avatar
      Avoid compilation warnings in gnutls.c on 64-bit hosts. · fb11d64d
      Eli Zaretskii authored
       src/gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
       "cast to pointer from integer of different size".
      fb11d64d
    • Ted Zlatanov's avatar
      Add GnuTLS support for W32 and certificate and hostname verification in GnuTLS. · e061a11b
      Ted Zlatanov authored
      * 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.
      e061a11b
  15. 19 Apr, 2011 1 commit
  16. 16 Apr, 2011 1 commit
  17. 15 Apr, 2011 1 commit
  18. 13 Apr, 2011 1 commit
    • Paul Eggert's avatar
      emacs_write: Return size_t, not ssize_t, to avoid overflow issues. · 273a5f82
      Paul Eggert authored
      * gnutls.c, gnutls.h (emacs_gnutls_write): Return size_t, not ssize_t.
      * sysdep.c, lisp.h (emacs_write): Likewise.
      Without the above change, emacs_gnutls_write and emacs_write had
      undefined behavior and would typically mistakenly report an error
      when writing a buffer whose size exceeds SSIZE_MAX.
      (emacs_read, emacs_write): Remove check for negative size, as the
      Emacs source code has been audited now.
      (emacs_write): Adjust to new signature, making the code look more
      like that of emacs_gnutls_write.
      * process.c (send_process): Adjust to the new signatures of
      emacs_write and emacs_gnutls_write.  Do not attempt to store
      a byte offset into an 'int'; it might overflow.
      273a5f82
  19. 10 Apr, 2011 1 commit
    • Jim Meyering's avatar
      use ssize_t and size_t for read- and write-like emacs_gnutls_* functions · 368f4090
      Jim Meyering authored
      * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
      return ssize_t not "int", and use size_t as the buffer length.
      (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
      * gnutls.h: Update declarations.
      * process.c (read_process_output): Use ssize_t, to match.
      (send_process): Likewise.
      368f4090
  20. 25 Jan, 2011 1 commit
  21. 23 Jan, 2011 1 commit
  22. 15 Jan, 2011 1 commit
  23. 18 Oct, 2010 1 commit
  24. 10 Oct, 2010 1 commit
  25. 09 Oct, 2010 2 commits
  26. 03 Oct, 2010 3 commits
  27. 29 Sep, 2010 1 commit