[vlc-devel] RFC: Expose gcrypt through vlc_crypto.h ?

Rémi Denis-Courmont remi at remlab.net
Mon May 27 20:52:18 CEST 2019

Le maanantaina 27. toukokuuta 2019, 21.26.41 EEST Francois Cartegnie a écrit :
> As we have gcrypt in the core if updates are enabled,
> wouldn't it make sense to expose generic hash/crypto API instead of
> linking gcrypt in every module needing it ?

It's not used directly that often. RemoteOSD was ripped out. GnuTLS no longer 
uses it. VLC-SRTP is not actually used by anybody. And then we anyway need to 
handle the craptastic global lock manually for underlying libraries that link 
libgcrypt behind our back.

But  libgcrypt API is crap, Nettle should be used in new code. If you only 
need a small set of algos, that's much smaller, thread-safe and error-free. If 
you need a large set of algos, you are reinventing TLS and that's a not a good 
idea anyway.

Writing a wrapper around libgcrypt will end up bad, like libxml.


More information about the vlc-devel mailing list