mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-14 04:10:06 +01:00
Check for required minumum gcrypt version.
(also ensure that gcrypt global init is called, see http://lists.gnupg.org/pipermail/gcrypt-devel/2003-August/000458.html) git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@176 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
2010-01-10 Milan Broz <mbroz@redhat.com>
|
2010-01-10 Milan Broz <mbroz@redhat.com>
|
||||||
* Fix initialisation of gcrypt duting luksFormat.
|
* Fix initialisation of gcrypt duting luksFormat.
|
||||||
* Convert hash name to lower case in header (fix sha1 backward comatible header)
|
* Convert hash name to lower case in header (fix sha1 backward comatible header)
|
||||||
|
* Check for minimum required gcrypt version.
|
||||||
|
|
||||||
2009-12-30 Milan Broz <mbroz@redhat.com>
|
2009-12-30 Milan Broz <mbroz@redhat.com>
|
||||||
* Fix key slot iteration count calculation (small -i value was the same as default).
|
* Fix key slot iteration count calculation (small -i value was the same as default).
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <errno.h>
|
||||||
#include <gcrypt.h>
|
#include <gcrypt.h>
|
||||||
|
|
||||||
#include "libcryptsetup.h"
|
#include "libcryptsetup.h"
|
||||||
@@ -12,8 +13,8 @@
|
|||||||
int init_crypto(void)
|
int init_crypto(void)
|
||||||
{
|
{
|
||||||
if (!gcry_control (GCRYCTL_INITIALIZATION_FINISHED_P)) {
|
if (!gcry_control (GCRYCTL_INITIALIZATION_FINISHED_P)) {
|
||||||
//if (!gcry_check_version (GCRYPT_VERSION))
|
if (!gcry_check_version (GCRYPT_REQ_VERSION))
|
||||||
// return -ENOSYS;
|
return -ENOSYS;
|
||||||
gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN);
|
gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN);
|
||||||
gcry_control (GCRYCTL_INIT_SECMEM, 16384, 0);
|
gcry_control (GCRYCTL_INIT_SECMEM, 16384, 0);
|
||||||
gcry_control (GCRYCTL_RESUME_SECMEM_WARN);
|
gcry_control (GCRYCTL_RESUME_SECMEM_WARN);
|
||||||
|
|||||||
Reference in New Issue
Block a user