bugGNUstep - Bugs: bug #42645, Use libgcrypt only if needed

Group
 
 

bug #42645: Use libgcrypt only if needed

Submitter:  Yavor Doganov <yavor>
Submitted:  Sun 29 Jun 2014 06:36:19 PM UTC
   
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 30 Jun 2014 06:30:07 AM UTC, comment #1: 

Thanks very much, I missed that change in gnutls.
I have applied your patch to svn trunk.

Richard Frith-Macdonald <CaS>
Group Member
Sun 29 Jun 2014 06:36:19 PM UTC, original submission:  

Currently, +[GSTLSObject initialize] calls uncoditionally gcry_control, which is superfluous with recent (~4 years old) GnuTLS releases.
As of version 2.11 GnuTLS does not depend on gcrypt initialization, as its NEWS file indicates:

** libgnutls: Added gnutls_global_set_mutex() to allow setting
alternative locking procedures. By default the system available
locking is used. In *NIX pthreads are used and in windows the
critical section API. This follows a different approach than the
previous versions that depended on libgcrypt initialization. The
locks are now set by default in systems that support it. Programs
that used gcry_control() to set thread locks should insert it into a block of
#if GNUTLS_VERSION_NUMBER <= 0x020b00
        gcry_control(...)
#endif


Version 2.11.1 switched to nettle as the default crypto backend, and support for libgcrypt was removed entirely in 2.99.2.

Proposed patch attached.

(P.S.  The AC_MSG_WARN call if gcrypt is not found is redundant since there is AC_MSG_ERROR a few lines below.  As a side (minor) issue, it is considered poor practice to nest AC_MSG_CHECKING/AC_MSG_RESULT because it leads to ugly and/or confusing output like:

checking gnutls support... checking for gcry_control in -lgcrypt... yes
yes
checking for gnutls_transport_set_errno... yes

It is not immediately clear to the user what the lone "yes" is for.  It is even more confusing if there are mixed "yes" and "no" results.)

Yavor Doganov <yavor>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #31636:  use-gcrypt-if-needed.patch added by yavor (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by yavor (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-06-30 CaS StatusNone Fixed
        Open/ClosedOpen Closed
    2014-06-29 yavor Attached File- Added use-gcrypt-if-needed.patch, #31636

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code