[FFmpeg-devel] [PATCH] rtmpdh: Initialize gcrypt before using it

Timothy Gu timothygu99 at gmail.com
Tue Jan 12 06:05:34 CET 2016


On Sun, Jan 10, 2016 at 10:04:34PM +0000, Ricardo Constantino wrote:

> Either disabling or init'ing secure memory is required after the use
> of gcry_check_version. From a look at the functions rtmpdh uses, I
> noticed none require the use of secure memory, so we disable it [1][2].
> 
> This resolves some errors returned by rtmpdh code with uninitialized
> gcrypt, especifically:
> Fatal: failed to create the RNG lock: Invalid argument
> FATAL: failed to acquire the FSM lock in libgrypt: Invalid argument
> 
> Version "1.5.4" was arbitrarily chosen. An older version probably works
> as well, but I couldn't compile older versions to test on my machine.
> 
> [1]
> https://gnupg.org/documentation/manuals/gcrypt/Initializing-the-library.html
> [2]
> https://www.gnupg.org/documentation/manuals/gcrypt/Controlling-the-library.html

Sorry for being late to the party, but [1] above says:

> It is important that these initialization steps are not done by a
> library but by the actual application. A library using Libgcrypt might
> want to check for finished initialization

Are you sure you want to initialize libgcrypt unconditionally as you are
doing here?

Timothy


More information about the ffmpeg-devel mailing list