summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f86a5f1)
Otherwise libgcrypt does it automatically, but only after we drop
privileges. This requires calling mlock(), which kills the sandboxed
process on OpenBSD.
If this is not enough, libgcrypt will resize the pool without calling
mlock().
--- /dev/null
+#include "../system.h"
+
+#include <gcrypt.h>
+
+#include "../crypto.h"
+
+void crypto_init(void) {
+ gcry_control(GCRYCTL_INIT_SECMEM, 32 * 1024, 0);
+ gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0);
+}
src_lib_crypto = files(
'cipher.c',
src_lib_crypto = files(
'cipher.c',
'digest.c',
'pem.c',
'prf.c',
'digest.c',
'pem.c',
'prf.c',
-if opt_crypto != 'openssl'
- src_lib_crypto += 'crypto.c'
-endif
-
if opt_crypto != 'nolegacy'
src_lib_crypto += ['cipher.c', 'digest.c']
endif
if opt_crypto != 'nolegacy'
src_lib_crypto += ['cipher.c', 'digest.c']
endif
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
// No-op for those cryptographic libraries that
// do not require any additional initialization.
// No-op for those cryptographic libraries that
// do not require any additional initialization.
-src_lib_crypto = files('prf.c')
+src_lib_crypto = files(
+ 'crypto.c',
+ 'prf.c',
+)
dep_crypto = dependency('', required: false)
dep_crypto = dependency('', required: false)