Adjusted for use with current libgcrypt (1.1.42).