/* gc-libgcrypt.c --- Crypto wrappers around Libgcrypt for GC.
- * Copyright (C) 2002, 2003, 2004, 2005 Simon Josefsson
+ * Copyright (C) 2002, 2003, 2004, 2005, 2006 Simon Josefsson
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
return;
}
+#ifdef GC_USE_RANDOM
+
/* Randomness. */
Gc_rc
return GC_OK;
}
+#endif
+
/* Memory allocation. */
void
Gc_rc rc = GC_OK;
ctx = calloc (sizeof (*ctx), 1);
+ if (!ctx)
+ return GC_MALLOC_ERROR;
ctx->alg = hash;
ctx->mode = mode;